Symfony and phalcon have been used. I have just used codeigniter to understand the PHP framework. However, I always feel that I am still at a very low level of use. how can I gain a deep understanding of these frameworks or write a framework by myself? Used
symfony
,
phalcon
. I just used
codeigniter
You have some knowledge about the PHP framework. However, I always feel that I am still at a very low level of use. how can I gain a deep understanding of these frameworks or write a framework by myself?
Reply content:
Usedsymfony
,phalcon
. I just usedcodeigniter
You have some knowledge about the PHP framework. However, I always feel that I am still at a very low level of use. how can I gain a deep understanding of these frameworks or write a framework by myself?
A set of frameworks is a set of specifications. no matter what components, plug-ins, and tools are used in the framework, this is a "technical" layer. how to transfer data is the "channel" layer of the framework, download the example, write the example by yourself, configure your IDE, X-Debug, etc, and break the breakpoint to figure out how the process works, speculate on how the author thinks and what problems he tries to solve.
The framework is: let us go, and let us go. Find out how to adapt to the author's ideas and the boundary of the problems that he can adapt to, and you will be thoroughly studied.
Nothing is better than reading source code.
There is no shortcut to read more code
First, let's look at how the framework runs from the entrance file.
How does the framework load the global configuration file?
How does the framework implement routing?
The framework encapsulates the database factory.
It is recommended that you complete two different types of projects without using the framework, and then you will find that:
The framework usually solves the problem that is irrelevant to the business logic during project development.
It seems a simple sentence, but in fact many people do not understand it. although many people have heard that the framework is used to allow developers to put more energy into business logic rather than building a wheel.
In a project, there are business logic (such as placing an order) and non-business logic (such as data storage ), there are variable links (such as two different user reviews, maybe two or four) and immutable links in each link of the specific business logic (the review steps are mandatory ), and so on. these are not only the basis for selecting the framework, but also the basis for extending the framework.
It's a bit confusing. I don't know if you can understand it.
In fact, this is not a good idea. you should have a deep understanding of php. The framework may be a little more useful than the native php, but the framework changes faster than you. Therefore, instead of having a deep understanding of the framework, it is better to have a deep understanding of php and basic things. in this way, you can quickly learn any framework in the future.
I recently wrote my own framework and developed a multi-device intelligent interaction system. the practice of developing a framework is very simple. if we follow a variety of conventions as usual, we will find a principle when we really decide to do what we want: how can this problem be solved. don't think about it too complicated.
This framework is similar to building houses with bricks. Sand, bricks, and tiles are neatly stacked and ideas are clear. The rest is hard work.
I also have questions! You can use the framework, but do you have a deep understanding of the framework? I don't think so!