The most important issues to be solved in web Foundation development

Source: Internet
Author: User
Tags yii

The problem that the Web Foundation develops to solve, often also is the purpose that the framework appears-to solve the problem.

1. Convenient DB operation;

2. Efficient form processing;

3. Flexible URL routing;

4. Reasonable code organization structure;

5. Schema extension cache, security, DB extension, etc.

6. A rich library of classes;

The philosophy of each framework determines its ultimate user base.

One of the most complex and time-consuming processes in development is the processing of forms, which involves both front-and back-end coding.

As a result, many people have managed to encapsulate the front-end form validation rules and even form controls to reduce cumbersome and repetitive coding. Common solutions are:

1. Pear Quickform

2. Zebra from

3. Yii Model

4. Various other frameworks built-in form processing

The 122 is an integrated scheme that constructs form elements and their corresponding validation rules entirely through PHP-and, of course, the ability to customize the front-end display scheme, one-time coding, and the front-end universal, is already a great design.

But sensory 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 typically used for DB operations. When the form is processed, it does not mean that it can be used directly in the DB operation.

This scheme of Yii, especially its AR scheme, is the starting point of the database end of the future, and backward pushing the usage scene. With its GII tool, the DB model is generated from the database structure, and the various rules of DB are automatically mapped to the model class. The field validation rule is combined with the corresponding ActiveForm pendant to achieve both front-and back-end synchronization verification, and the coupling is very low, and the front-end interface is fully customizable. The underlying validation rules are self-expandable according to uniform specifications, while ensuring that each validation rule has a high degree of reusability.

It should be said that this is the most reasonable solution I have seen at the moment.

Others no longer say, mainly to do a summary of ideas.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.