2014年该选择哪个PHP框架?

jopen 10年前

作为一个PHP开发人员,我们经常希望有一个功能丰富的开发框架,可以实现开发人员编写的代码更快,更有条理。

2014年该选择哪个PHP框架?比较

Most of them implement certain design patters, of which MVC is by far the most popular. The main aim of MVC is to separate the database related code (Model) from application-specific code (Controller) from its html (View). It also features a URL-mapping system to create search engine friendly “clean url” and to separate the code-files from the actual urls. But there is a much discussion all around because some prefer performance, some prefer better documentation, some prefer amount of built-in functions etc. Today here in this article, I am going to discuss some featured PHP frameworks which surely help you to choose best for your next project.

 

Zend Framework

2014年该选择哪个PHP框架?比较

We all familiar with Zend framework which is a first choice of most of developers. It has a loosely coupled architecture which allows developers to use components individually. Actually the component structure of Zend Framework is somewhat unique and each component is designed with few dependencies on other components.

Zend Framework is still a choice of most of developers which offers a robust, high performance MVC implementation, a database abstraction that is simple to use, and a forms component that implements HTML form rendering, validation, and filtering so that developers can consolidate all of these operations using one easy-to-use, object oriented interface. Few other components, such as Zend_Auth and Zend_Acl, provide user authentication and authorization against all common credential stores. It also provides many useful component which you can use according to your application need to reduce development time.

CodeIgniter

2014年该选择哪个PHP框架?比较

Codeigniter is also a lightweight PHP framework with mvc pattern. It’s a choice of most of php developer. It’s relatively easy to learn. Feature wise, Codeigniter is powerful frameworks such as Zend and Cake. Its major goal is to enable you to develop projects much faster than you could, by providing a rich set of libraries for commonly needed tasks, as well as a simple interface and logical structure to access these libraries.

Symfony

2014年该选择哪个PHP框架?比较

Symfony is a recognized PHP Framework with some awesome feature. Symfony is aimed at building robust applications in an enterprise context, and aims to give developers full control over the configuration: from the directory structure to the foreign libraries, almost everything can be customized. To match enterprise development guidelines, Symfony is bundled with additional tools to help developers test, debug and document projects.

Many developers say that Symfony is slower for small websites because of the weight of the framework. A lot of code must be executed for each request. But I think it still be a best choice for large projects. It’s a stable open-source just like Zend, so you can go with it without any hesitation.

Yii Framework

2014年该选择哪个PHP框架?比较

Yii is a popular high-performance PHP framework best for developing Web 2.0 applications. Yii comes with rich features like MVC, DAO/ActiveRecord, I18N/L10N, caching, authentication and role-based access control, scaffolding, testing, etc. It can reduce your development time significantly.

Yii only loads the features that you need. It has powerful caching support. It is explicitly designed to work efficiently with AJAX. Security comes as standard with Yii. It includes input validation, output filtering, SQL injection and Cross-site scripting prevention. All features are encouraging, so yii also be a good choice.

Kohana

2014年该选择哪个PHP框架?比较

An elegant HMVC PHP5 framework that provides a rich set of components for building web applications. It’s a fork of Codeigniter. With Kohna, each website needs a different Kohana “installation”. However it is just a server setup check. Not difficult or special. Kohana works with the MVC-concept incl. mapping.Configuration is mainly in application/bootstrap.php and modules/…/database.php. It is lightweight and fast. It all seems nice and clean, so you can go with it.

Laravel

2014年该选择哪个PHP框架?比较

Laravel is a new name in web application framework with expressive, elegant syntax. It’s also worth checking as it aims to make the development process a pleasing one for the developer without sacrificing application functionality. It provides powerful tools needed for large, robust applications. It also give superb inversion of control container, expressive migration system, and tightly integrated unit testing support give you the tools you need to build any application with which you are tasked.

CakePHP

2014年该选择哪个PHP框架?比较

CakePHP is a popular framework for web application development. It’s a feature rich light weight PHP framework comes with a lot of features like code generation, translations, database access, caching, validation, authentication etc.