Home > PHP Framework > YII > What is the difference between yii and tp?

What is the difference between yii and tp?

青灯夜游
Release: 2019-11-16 11:48:55
Original
4239 people have browsed it

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template