Home >Backend Development >PHP Tutorial >The core problems to be solved in basic web development, the core of basic web development_PHP tutorial
The problems to be solved in basic web development are often the purpose of those frameworks - to solve problems.
1. Convenient Db operation;
2. Efficient form processing;
3. Flexible Url routing;
4. Reasonable code organization structure;
5. Architecture extension: caching, security, DB extension, etc.
6. Rich class library;
The philosophy of each framework determines its ultimate user group.
Form processing, because it involves both front-end and back-end coding, is often the most complicated and time-consuming process in development.
Therefore, many people find ways to encapsulate front-end and back-end form validation rules and even form controls to reduce tedious and repetitive coding. Common solutions are:
1. Pear QuickForm
2. Zebra From
3. Yii Model
4. Built-in Form processing in various other frameworks
The first and second two are integrated solutions, which construct form elements and corresponding verification rules entirely through PHP - of course, you can also customize the front-end display solution by yourself, achieving one-time coding and universal front-end and back-end, which is already a great design.
But I feel that the degree of coupling is still a bit high, and form data is often collected to interact with the database, which means that the data in the form is generally used for DB operations. After the form data is processed, it does not mean that it can be used directly in DB operations.
Yii’s solution, especially its AR solution, uses the backend database as the starting point to work backwards on the usage scenario. Through its Gii tool, the DB model is generated according to the database structure, and various rules of the DB are automatically mapped to the model class. The field validation rules are combined with the corresponding ActiveForm pendant to achieve synchronous verification of the front and back ends, and the coupling degree is very low, and the front-end interface can be fully customized. Basic verification rules follow unified specifications and can be expanded by themselves, while ensuring that each verification rule is highly reusable.
It should be said that this is the most reasonable solution I have seen so far.
I won’t say much else, mainly to make a summary of ideas.
This book is awesome! It is the most awesome JAVA WEB I have ever seen, but it focuses on SERVLET and very little on JSP! Looking forward to the early publication of "In-depth Experience of Java Web Development - Advanced Features", which talks about filters and other advanced features
This learning is in order. You must learn first--In-depth experience of Java Web development insiders--Detailed explanation of core foundation and java web development--If you dare to get started, learn first--In-depth experience of Java Web development insiders-- Core basics - if you have some basics, learn first - detailed explanation of java web development - it is best to learn - in-depth experience of the inside story of Java web development - advanced features -
Recommended teacher -
Zhang Xiaoxiang's The book is more connotative - it is written in more detail... and goes deep into the inside...
Teacher Li Xinghua's book is more about speed...you can get started in the fastest time...but it cannot be in-depth...
Personally, I think Mr. Li Xinghua’s book is the best for beginners...