Why do you know each knowledge point or not use the framework well?

wedge

Many beginners, including me , focused on actual combat when I first learned the web back-end framework, completed the development process, and were excited to solve the problems they encountered one by one . It is easy to get lost in the details.

To understand a framework better, we need a system view, which is what we often call the learning of the system. If we want to understand the framework in depth and optimize the web framework, we need to have a global understanding of the overall framework and key modules of the framework, and then Go deeper into specific knowledge points.

What should a web framework contain

Before answering this question, let's first figure out another question, what the web framework is for.

We know that web development includes front-end development and back-end development. The front-end makes calls to the back-end, and the back-end calculates the result and returns it to the front-end. The front-end renders the data, and there are pages that everyone sees.

Obviously, in this process, the role of the back-end is to calculate and return the business results that users need. What exactly is the back-end to do? The front-end passes the parameters to the back-end through the network protocol stack, and the back-end needs to parse the data packet parameters. After the data packet parameters are obtained, data verification is required. After the verification is correct, the business logic is started. After processing, after processing, organize the data according to the structure agreed with the front end, and return the result to the front end.

Simply put, it is as follows:

 image.png

The specific knowledge points involved in each step are as follows:

 image.png

In other words, as long as the framework implements the functions shown in the figure, the framework can solve basic calculation tasks and return results. The functions attached to the framework, such as command line support, various external tools, various clients, format analysis functions, etc., Just to make the framework faster and more convenient, out of the box.

  Suppose, every time we develop a new project, we have to reinvent the wheels and rewrite these components. That is a laborious and time-consuming thing. From this perspective, the framework is born to solve component reuse.

How to learn the framework

With the framework, we can quickly develop our applications. Does that mean that we can use the framework directly without thinking about it. Such an idea is also undesirable. The role of the framework is for convenience. It saves time and effort, but after the application runs on the server, whether it is available and the performance is good enough to meet business needs and easy to expand, the framework is not guaranteed, which is the three high problems we often hear, high availability, high performance, Highly scalable.

The following figure is a panorama of web back-end development knowledge, and the red mark is the part of the Django web framework implementation:

 image.png

In the figure, we can see that the framework is only a small part of the implementation. Whether the project can continue to maintain an optimal state after the project is launched requires a long-term practice summary by developers. In addition to practice, it is also a good way to analyze the source code. .

We divide web development into two major dimensions, four main lines, namely system dimension and application dimension. When we classify, layer, and learn the framework of various knowledge points of web development, this structured way of thinking can help our system. Sexual mastery of the framework, that is to say, the process of mastering the framework is top-down. When we encounter specific problems, we can follow this idea to troubleshoot and solve problems.

In fact, you can follow this learning routine when learning any other system software. Readers may wish to give it a try, and it may get twice the result with half the effort.


Guess you like

Origin blog.51cto.com/13176208/2674607