Yii Fast, secure, professional PHP framework, YII Professional PHP Framework _php Tutorial

Source: Internet
Author: User
Tags benchmark i18n php framework codeigniter shared hosting yii zend framework ruby on rails

Yii Fast, secure, professional PHP framework, YII Professional PHP framework


Yii is a high-performance PHP framework for developing WEB2.0 applications.
Yii comes with a wealth of features including mvc,dao/activerecord,i18n/l10n, caching, authentication and role-based access control, scaffolding, testing, etc. that can significantly shorten development time

Official website: http://www.yiiframework.com/

Yii Quick

Yii only loads the features you need. It has strong cache support. It's clearly designed to work with AJAX efficiently.

Yii Security

The standard of YII is safe. It includes input validation, output filtering, SQL injection, and cross-site scripting prevention.

Professional

YII helps you to develop clean and reusable code. It follows the MVC pattern, ensuring a clear separation of the logical and presentation layers.

The YII framework is a high-performance PHP framework for developing large Web applications based on components. Yii provides almost everything you need for today's Web 2.0 application development. Yii is one of the most efficient PHP frameworks. Yii was the founder of Manggold J's painstaking efforts, began development on January 1, 2008.

Yii is a high-performance, component-based PHP framework for developing large Web applications. Yii is written in strict OOP, with well-established library references and comprehensive tutorials. From mvc,dao/activerecord,widgets,caching, hierarchical Rbac,web services, to theming, i18n and l10n,yii provide almost everything you need for today's Web 2.0 application development. In fact, Yii is one of the most efficient PHP frameworks.
Yii is a high-performance PHP5 Web application Development framework. With a simple command-line tool, YIIC can quickly create a code framework for a Web application, and developers can add business logic based on the generated code framework to quickly complete application development.

Yii Advantages

Yii is easy to learn and use. You just need to know PHP and object-oriented programming to get started quickly without having to learn a new schema or template language in advance.
With Yii, the development speed is very fast, except for the framework itself, which requires very little coding to be written for the application. In fact, this is one of the most efficient development frameworks.
YII is highly reusable and extensible, and is purely object-oriented. Everything in Yii is a standalone, reusable, extensible component. More importantly, YII has an increasing number of expansion libraries. Components that are primarily contributed by the user, which can help greatly reduce your development time.
Yii has a wealth of functions. From MVC, Dao/activerecord, to theming, internationalization and localization, YII provides the functionality needed for almost all of today's Web 2.0 application development.
The Yii reference manual is a complete documentation of YII and has all the information you need to learn and master it.
Yii was designed from the outset to accommodate complex web application development. He is not a byproduct of some projects or third-party integration. It is a combination of the author's rich experience in Web application development and the crystallization of the best ideas of other popular web frameworks and applications.
Last but not least, yii is free and Yii follows the latest BSD license. It ensures that its third-party development is also sequential and BSD-compatible with the license. This means that you are free to use YII to develop any open source or proprietary application, both legally and financially.

Characteristics

Yii has almost all the features of today's Web 2.0 application development. The following is a short list of these features.
Model-View-controller (MVC) design pattern: Yii uses this sophisticated technology in web programming to better separate the logical and presentation layers.
Database Access Objects (DAO) and active Record:yii allow data objects in the developer model database, reducing their effort to write long and repetitive SQL statements.
Integration with jquery: As one of the most popular JavaScript frameworks, jquery can write efficient and flexible JavaScript interfaces.
Form input and validation: Yii makes it easy and safe to collect form inputs. Yii has a set of validators that ensure the validity of the data, and it also has auxiliary methods and components that show errors when validation fails.
Web 2 parts: Supported by jquery, Yii is equipped with a set of Web 2.0 components, such as auto-complete input fields, TreeView, and so on.
Authentication and Authorization: Yii has built-in authentication support. It also supports authorization through hierarchical role-based access control (RBAC).
Theme: It can instantly change the view of a yii application.
Web services: Yii supports automatic generation of complex WSDL service specifications and management of Web service request processing.
Internationalization (i18n) and Localization (L10N): YII supports message conversion, date and time formats, numeric formats, and interface localization.
Tiered caching scenarios: Yii supports data caching, page caching, fragment caching, and dynamic content. The cached storage media can be easily changed without touching the application code.
Error handling and Logging: error handling is well rendered, log information can be categorized, filtered and assigned to a different location.
Security: Yii is equipped with many security measures to help secure Web applications to prevent network attacks. These measures include cross-site scripting (XSS) prevention, cross-site request forgery (CSRF) prevention, cookie tampering prevention, and so on.
Code that conforms to XHTML:YII components and command-line tools conforms to the XHTML standard.
Automated code Generation: YII provides tools that can generate code automatically, depending on your needs, such as generating a skeleton of a program, crud applications, and so on.
Fully Object-oriented: The YII framework adheres to the strict object-oriented programming paradigm. It does not define any global functions or variables. Moreover, it defines a class hierarchy that allows for maximum reusability and customization.
Friendly use of third-party code: YII carefully designed to make it work very well with third-party code. For example, you can use the Pear or Zend Framework code in your YII application.
Detailed documentation: Every single method or property is very clearly documented. It also provides a comprehensive tutorial and some beginner tutorials.
Extension Library: Yii provides an extended library of user-supplied components, which makes the list of features above endless.

About Yii

Yii is a component-based, high-performance PHP framework for developing large WEB applications. In web development, YII can maximize the implementation of code reuse, greatly improve the speed of development. The name Yii (pronounced yee or [ji:], should be "easy" pronunciation) stands for easy, efficient (efficient) and extensible (extensible)
Environmental requirements
To run a Yii-driven Web application, you need to have a Web server that supports PHP 5.1.0 or later.
For developers who intend to use Yii, it can be very helpful to understand object-oriented programming (OOP). Because Yii is a purely OOP framework.
Scope of application
Yii is a common web programming framework that can be used to develop almost any Web application. Because it is lightweight and has a proven cache solution, it is ideal for developing high-traffic applications such as portals, forums, Content management systems (CMS), e-commerce systems, and more.
Compare with similar products
Like most PHP frameworks, Yii is a framework for MVC.
Yii wins other frameworks with its excellent performance, rich functionality and clear documentation. YII has been carefully designed from the outset to be suitable for rigorous WEB application development. It is neither a derivative of another project nor a combination of third-party work. It is the author's rich experience in Web application development and the results of research and thinking on most popular web programming frameworks and applications.

Performance

Yii Performance
Yii is a high-performance framework, and the chart below shows the efficiency of Yii compared to other popular PHP frameworks. In this diagram, RPS stands for "Requests per second", describing how many requests the framework executes per second. The larger the number, the higher the performance of this framework, and the more we can see that in this comparison Yii is better than the other frameworks. The performance advantage of YII is especially significant when the widely used APC extension are enabled.
Performance alone is not the whole stories (otherwise we should all use plain HTML or PHP). With such superior performance, Yii still provides a very rich feature setwhich can greatly improve your development effic Iency.
Why Yii is so fast
Yii is so fast because it uses lazy loading technology extensively. For example, it is not included until the first time the class is used, and it is not created until the object is first accessed. Other frameworks suffer from the performance hit because they would enable a functionality (e.g. DB connection, user Sessi ON) No matter it was used or not during a request.
Standard settings
Below we explain how to design a benchmark application and get the RPS results above.
Benchmark Request
Since Our goal are to compare the minimal overhead of each framework, the benchmark application for each framework should b E The simplest one. We choose to display a ' Hello world ' text string by placing an echo statement in the default action of each application. Any additional framework features (e.g session) is disabled to ensure fairness of the comparison. To obtain a copy of the benchmark applications, please check out the Phpmark project.
Why use "Hello world"
Our test of "Hello World" is primarily to achieve our goals, such as finding the minimum cost per frame. Many people complain that the application "Hello World" is meaningless, because applications in real worlds often need to involve more complex tasks, such as database queries. That's not right. In fact, especially in some large-scale web2.0 applications, we often encounter situations that are usually quite close to "Hello World". For example, the application responds to an AJAX request to return the current server's time. The page has most of the content in the cache, and the application only needs to crawl the cached content and display it.
Another reason for using "Hello World" is that when referencing features that are more complex (such as database queries), contrast clarity will be difficult to guarantee. For example, a framework can perform very efficiently in database queries, but lacks a caching scheme. While another framework is slightly slower on database queries, it has advanced caching features to mitigate system losses. In summary there are too many factors to make a clear comparison.
Standard tools and environments
Use the Apachebench tool's instruction "Ab–t 30-c URL" To obtain the RPS number (for example, run test 30 seconds in concurrent progression 10). To get the number of each frame, we stop and then start the Apache Web server to avoid interference. You also run the test program several times to "warm up" the test environment. In Phpmark project, there is a called benchmark. The shell script for SH automates the benchmarking program.

Credits

Many of Yii's ideas come from other well-known WEB programming frameworks and applications. The following is a short list.
Prado: This is the main thought source of Yii. YII employs a component-and event-driven programming model, a database abstraction layer, a modular application architecture, internationalization and localization, and many other features and functions of it.
Ruby on Rails:yii inherits the idea of its configuration. It also references the ORM design pattern of its Active record.
JQuery: This is an integrated JavaScript framework based on YII.
Symfony:yii references its filter design and plug-in architecture.
Joomla:yii references its modular design and information translation program.


How to get started quickly with the PHP yii framework

Let's see your level.

The frame is the best thing to look at.

Otherwise it's hard to really master

Look for some projects.

How the YII framework accesses the API

1. Yii

Yii is a component-based, high-performance PHP framework for developing large-scale Web applications. Yii is written in strict OOP, with well-established library references and comprehensive tutorials. From mvc,dao/activerecord,widgets,caching, hierarchical rbac,web services, to subjectivity, i18n and l10n,yii provide almost everything you need for today's Web 2.0 application development. And the price of the framework is not too high. In fact, Yii is one of the most efficient PHP frameworks.

2. CodeIgniter

CodeIgniter is an application development framework-a toolkit designed for people who build PHP websites. The goal is to develop projects quickly: it provides a rich library of libraries to accomplish common tasks, as well as a simple interface with a rich and rational architecture to access these libraries. Using CodeIgniter development can inject more creativity into previous projects because it saves a lot of coding time.

3. CakePHP

CakePHP is a fast-developing framework for PHP, which uses a number of common design patterns such as Activerecord,association Data Mapping,front Controller and MVC. The main goal is to provide a framework that allows any level of PHP developers to quickly develop Web applications, and this fast implementation does not sacrifice the resilience of the project.

4. Phpdevshell

Phpdevshell is an open source (GNU/LGPL) Rapid Application Development framework for the development of pure PHP without JavaScript. It has a full GUI admin background interface. The main goal is to develop management-based applications such as plug-ins, where speed, security, stability, and resiliency are top priorities. Its design creates a simple learning curve, and PHP developers don't need to learn complex new terminology. The arrival of the Phpdevshell meets the needs of developers for a lightweight but fully functional GUI that can be configured without restrictions.

5. Akelos

Akelos PHP Framework is a Web application development platform based on MVC design pattern. Based on good usage habits, you can use it to accomplish the following tasks:

Easy to write views using Ajax

Manage requests (request) and responses via controller (response)

Application of Management internationalization

Communicate with models and databases using a simple protocol

Your Akelos app can run on most shared hosting service providers, because the only requirement for Akelos to the server is to support PHP. Therefore, the Akelos PHP framework is the ideal framework for publishing a separate Web application because it does not require a nonstandard PHP configuration to run.

6. Symfony

Symfony is a Web application framework for developing PHP5 projects.

The purpose of this framework is to accelerate the development and maintenance of Web applications and to reduce duplication of coding efforts.

Symfony system requirements are not high, can be easily installed in any setting: You only need a UNIX or Windows, with a PHP5 installed network server. It is compatible with almost all databases. Symfony Price is not high, compared to the cost of the host is much lower.

For PHP developers, using symfony is a natural thing, and its learning curve is just one day. Clean design and code readability will shorten development time. Developers can apply the principles of agile development, such as Dry,kiss or XP, and focus on the application logic level without spending a lot of time writing endless XML configuration files.

Symfony is designed to build an enterprise-class, sophisticated application. In other words, you have control over the entire setting: from the path structure to the external library, almost everything can be customized. In order to comply with the enterprise Development Regulations, Symfony also bundled some additional tools to facilitate the testing, commissioning and archiving of the project.

7. Prado

The Prado team consists of some Prado fanatics ... Remaining full text >>

http://www.bkjia.com/PHPjc/874111.html www.bkjia.com true http://www.bkjia.com/PHPjc/874111.html techarticle Yii Fast, secure, professional PHP framework, YII Professional PHP framework Yii is a high-performance, PHP framework for developing WEB2.0 applications. Yii comes with a wealth of features, including mvc,dao/a ...

  • 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.