Yii Framework is a component-based, high-performance PHP framework for developing large-scale web applications. Yii provides almost everything needed for today's Web 2.0 application development. Yii is one of the most efficient PHP frameworks.
ThinkPHP is a fast, compatible and simple lightweight domestic PHP development framework. It was born in early 2006, formerly known as FCS, in 2007 On New Year's Day, it was officially renamed ThinkPHP. It was released under the Apache2 open source protocol. It was transplanted from the Struts structure and made improvements and improvements. It also learned from many excellent foreign frameworks and patterns, using object-oriented development structures and MVC patterns, and integrating Struts The idea and TagLib (tag library), RoR's ORM mapping and ActiveRecord mode.
ThinkPHP was born to simplify enterprise-level application development and agile WEB application development.
was first born in early 2006. It was officially renamed ThinkPHP on New Year's Day 2007, and was released under the Apache2 open source agreement. ThinkPHP has been adhering to the simple and practical design principle since its birth. While maintaining excellent performance and minimal code, it also focuses on ease of use.
And has many original functions and features. With the active participation of the community team, it is continuously optimized and improved in terms of ease of use, scalability and performance.
The difference between thinkphp and yii
Configuration: Yii multiple configuration files, overlay configuration, multiple environment configuration, local online environment configuration, more flexible; TP There is only one
page control: there are many page controls in Yii such as list/grid/detail, etc., which are convenient for typesetting and layout, and there are many targeted choices; tp has never been used;
scaffolding : The scaffolding of Yii is Gii, which can generate code, omit the development cycle, reduce complexity, and also facilitate code standardization;
tp Use the command line to generate the model: D:\phpStudy\PHPTutorial\WWW\fruit\public> ;php think make:model api/Image
get and post: TP has many ways, such as obtaining parameters in many ways; Yii is just one, TP’s ORM can be either character or array; YII can only be arrays
Verification layer: YII is the rule of the model, TP introduces classes for the verification layer
ORM: TP is used String or array, array used by Yii
Type conversion: Tp has a type conversion which is very convenient. The converter is very convenient with automatic completion
For more Thinkphp related technical articles, please Visit the Thinkphp tutorial section to learn!
The above is the detailed content of The difference between thinkphp and yii. For more information, please follow other related articles on the PHP Chinese website!