Home >PHP Framework >YII >What is the difference between yii and tp?
What is tp (ThinkPHP)?
ThinkPHP is a fast, compatible and simple lightweight domestic PHP development framework. It was born in early 2006, formerly known as FCS. It was officially renamed ThinkPHP on New Year's Day in 2007. It is released under the Apache2 open source agreement and is derived from Struts The structure was transplanted and improved and perfected. At the same time, it also learned from many excellent foreign frameworks and patterns, using object-oriented development structure and MVC pattern, integrating the ideas of Struts and TagLib (tag library), RoR's ORM mapping and ActiveRecord. model.
ThinkPHP was born to simplify enterprise-level application development and agile WEB application development. [Recommended tutorial: thinkphp tutorial]
What is yii?
yii is a high-performance component-based PHP framework for developing large-scale Web applications. Yii is written in strict OOP and has complete library references and comprehensive tutorials. From MVC, DAO/ActiveRecord, widgets, caching, hierarchical RBAC, web services, to theming, I18N and L10N, Yii provides almost everything needed for today's Web 2.0 application development. [Recommended tutorial: yii framework tutorial]
In fact, Yii is one of the most efficient PHP frameworks.
The difference between TP (ThinkPHP) and yii
Configuration: Yii multiple configuration files, coverage configuration, multiple environment configuration, local online environment configuration, more flexible; TP There is only one
page control: There are many page controls list/grid/detail in Yii, which are convenient for typesetting and layout, and the selection is more targeted; tp has not been used;
Scaffolding: Yii's The scaffolding is Gii, which can generate code, omit the development cycle, reduce complexity, and also facilitate code standardization;
tpGenerate the model using the command line: D:\phpStudy\PHPTutorial\WWW\fruit\public>php think make:model api/Image
get and post: TP has many ways, such as many ways to obtain parameters; Yii is just one, TP’s ORM can accept both characters and arrays; YII can only use arrays
Verification layer: YII is the rule of the model, TP introduces the class for the verification layer
ORM: string or array used by TP, array used by Yii
Type conversion: Tp has a very convenient converter for type conversion and autocomplete is very convenient
The above is the detailed content of What is the difference between yii and tp?. For more information, please follow other related articles on the PHP Chinese website!