I’ve started going through a SaaS application tutorial on Udemy and discovering that the structure of building an application with Flask is very confusing in the early stages. Especially depending on what tools you are using. In this example he is using Docker to contain the app, and this is my first time using Docker. Seems really cool but I will have to work through this tutorial to get a full understanding. One problem I am having with the tutorial is that you aren’t really writing the code as you go, he has everything in sections already written, and he just walks through and explains it. Which isn’t a huge problem but I plan to use this code as a base for what I am going to build later, so I guess I will just use each chapter and step to build my own product. More details on what that is going to be once I am more comfortable. A few things that are new to me:
- The MTV design pattern: https://djangobook.com/model-view-controller-design-pattern/
- Application Factories: http://flask.pocoo.org/docs/0.12/patterns/appfactories/
Prior to working with Flask, I was introduced to web development frameworks through PHP in the mid 2000’s with Codeigniter and CakePHP…which I really didn’t use a lot…but I gained an understanding of the MVC pattern…then I went on to complete a few tutorials on Rails. So the pattern I am familiar with…but the way in which most Flask tutorials and projects are structured seem to be more like Django, in that they are using the MTV pattern. I’ve linked the article above for further reading on my part to get an idea of how to “not get stuck” in the early stages of planning a project because the pattern is there to assist me.