For beginners, to find a good framework to learn or project development is very necessary, and when you have some development experience, you should choose the framework for the current business needs. I do not want to explore which framework is good and which is not good, this eternal topic is the same as exploring "which programming language in the world is the best".
analyze
In the face of a project demand, do not rush to develop, learn to control the development cost of the premise is to understand the technical difficulties may bring additional time consumption. For intermediate Python developers like me, there is no substantial project experience, no development of large-scale online projects, nothing more than crawlers write a bunch and a bunch, essentially with the beginner difference is not great, at best, even if a coding experienced coder only. So when encountering relatively difficult project requirements, often entangled in how to choose the framework, which will also waste a lot of time.
option
The so-called difficult project is either a wide range of business types and complex business logic. Either it involves some extended functions, such as the need to call the system shell commands, serial communications and so on. In the former case, there is no technical difficulty, just complex business, considering the later expansion of the project, may need a good system architecture. For the latter, there may be difficult to achieve the technical difficulties, to deal with all the technical difficulties, you need to re-learn the corresponding knowledge, including the back of the code test, environment simulation test and so on a series of operations, this time is very difficult to estimate.
The choice between Django and Flask, the better known Python web frameworks, is a headache.
When learning Python web for the first time, many veterans recommend learning Django, the reason is because Django is relatively sophisticated, very powerful, somewhat like the famous ThinkPHP framework. There's nothing wrong with what the old hands say, but getting started with a heavyweight framework like this might not be a good place to start.
The sheer power of the Django framework surely means that it is a heavyweight framework, and for beginners, this can be a disaster. If the beginner has no basic knowledge of other languages and no experience in back-end development, then this approach may lead directly to abandonment.
Python web is great to use to get started. It doesn't matter if it's Django or Flask, they're both designed with the same foundation. The difference is that Django is designed to be more complex, more like a well-decorated hard furnishings of the house, you only need to do a little bit of soft furnishings, arrange the furniture will be able to design the whole room is very beautiful.
Flask is not quite the same, it only helps you build a good house materials needed, how to build a house, how to decorate all rely on your own hands, so the same project, the use of Flask to do, different people may be designed out of the structure is completely different, and the use of Django framework to do out of the architecture of the structure may be more or less the same.
For developers who have used the MVC framework , to get started with Django is very fast , because Django is also the MVC pattern . Flask has no pattern to speak of , just provide a service only , to get into what all depends on their own. So if you want to design their own directory structure, the division of modules and other personalized design, recommended the use of Flask. the disadvantages are also very obvious, if you are not an experienced developer, you are likely to be the whole project architecture design mess.
For me, many times a project at the beginning does not feel like a big project, do more and more features to the back, more and more extensions, it becomes a big project, and the use of Flask is very easy to accomplish this task, small projects rapid development, large projects design flexibility.
Content Extension:
Django and flask version viewing
View Django version
To check if the installation was successful, you can view the Django version under dos.
1. Type python
2. Enter import django
3. enter django.get_version()
View flask version
To check if the installation was successful, you can check the flask version under dos.
1. Type python
2. Enter import flask
3. Enter flask.__version__.
to this article on django and flask which is worth studying the study of the article is introduced to this, more related django and flask to choose which content please search for my previous articles or continue to browse the following related articles I hope you will support me in the future more!