文章来自于:http://mashable.com/2014/04/04/php-frameworks-build-applications/
Building software applications can be a complex, time consuming process, however utilizing a framework can help you develop projects faster (by reusing generic components and modules), and work better (building on one unified structural foundation). Using a framework also facilitates scalability and long-term maintenance by complying with development standards, keeping your code organized and allowing your application to evolve and grow over time.
By removing the time and effort required to build generic components, you can dedicate more time to specific tasks and functionality, and focus on sustainable, high-quality code. We've identified 13 of the best PHP frameworks to help you build interoperable, agile applications.
1. Laravel
Laravel is a PHP web application framework with expressive, elegant syntax, aiming to take the pain out of web development by easing common tasks, such as authentication, routing, sessions and caching. It provides, accessible, powerful tools needed to build, large robust applications, with an inversion control container, expressive migration system, and tightly integrated unit testing support. Laravel can be used for huge enterprise level applications, or simple JSON APIs, meaning it's perfectly suited to all types and sizes of projects. It's built on top of several Symfony components, providing a solid foundation of well-tested, reliable code. With Composer you can manage all your application's third-party packages, and works great on MySQL, Postgres, SQL Server, and SQLite.
2. CodeIgniter
CodeIgniter is a powerful PHP framework with a small footprint, built for those who required a simple, yet elegant toolkit to build fully-featured web applications. It requires nearly zero configuration, with no restrictive coding rules, and offers simple solutions to complex application requirements. CodeIgniter features a rich set of libraries for commonly needed tasks, as well as a simple interface and logical structure to access these libraries. It's exceptionally fast, as its core system only requires a few small libraries, with additional libraries loaded dynamically upon requests, based on your needs for a given process. This means the base system is both lean and agile. As CodeIgniter uses the MVC controller approach, it allows for great separation between logic and presentation, particularly useful for projects in which designers are working on template files.
3. CakePHP
CakePHP enables you to build web applications faster, using code generation features to rapidly build prototypes. There is no complicated configuration, just setup your database and you're ready to go. Translations, database access, caching, validation, authentication and more are all built into the framework. It comes packaged with clean MVC conventions, to guide you in developing your application. CakePHP can handle every aspect of your application, from the user's initial request all the way to the final rendering of a web page. The framework provides a basic organizational structure, from filenames to database table names, to keep your entire application consistent and logical. CakePHP also comes with built-in tools for validation and protection against SQL injection, form tampering and more, to help keep your application safe and secure.
4. Symfony
Symfony is a PHP framework to speed up the creation and maintenance of your web applications. By using existing 'de facto' standards of PHP, such as PHPUnit, and naming conventions for classes, you're not confined within the Symfony environment, but instead have the freedom to choose the software components that you want to use. It provides a set of prefabricated components that can be rapidly integrated into your application, combined with a clear methodology to help you work both efficiently and effectively on the most complex tasks. The use of Best Practices guarantees the stability, maintainability and upgradeability of any application you develop. You can choose the Full Stack (complete) version if you want to develop a complex application, or Brick by Brick, to build your own framework according to the functionality you need, or Microframework, as a standalones used to develop specific functionality in your project.
5. Zend Framework 2
Zend Framework 2 is an open-source framework for developing web applications, using object-oriented code. The components in the standard library form a powerful an extensible framework when combined, offering a robust, high performance MVC implementation. It's easily extensible, adapting to your needs, with a modular base so you can use building blocks in combination with other applications or frameworks. Using the ZendService you can implement client libraries to access the most popular web services available. As Zend is a collection of classes, you can just load the components you need, to take advantage of the components as individual libraries, instead of the framework as a whole, cutting down on unnecessary project bloat. With no model implementation you are free to implement the framework and components in whatever way you need, free of predefined restraints.
6. Phalcon
Phalcon is a PHP 5 framework that is implemented as a C extension to offer lower resource consumption and high performance. There's no need to learn or use the C Language, as the functionality is exposed as PHP classes ready to use. As Phalcon is loosely coupled, you're free to use the full framework, or just specific parts of it as glue components. Rather than download an archive, extracting it to a directory like you do with most frameworks, Phalcon can be downloaded and installed as a PHP module. By creating a rich, fully featured framework written entirely in C and packaged as a PHP extension, Phalcon is able to save processor time and boost overall performance. While it is just under two years old, the Phalcon documentation, community and development rival that of many of the more mature frameworks available.
7. Yii
Yii is a high-performance PHP framework which has powerful caching support and is explicitly designed to work efficiently with AJAX. Security is important, and that's why Yii includes input validation, output filtering, SQL injection and Cross-site scripting prevention. As Yii follows the MVC pattern, it helps you develop clean and reusable code, ensuring a clear separation of logic and presentation. You can model database data in terms of objects and avoid the complexity and tedious nature of writing repetitive SQL statements. Collecting form input is both safe and easy, as Yii comes with a set of validators as well as numerous helper methods and widgets. There is support for writing and running unit tests and functionality tests, along with efficient error handling, and log messages can be categorized, filtered and routed to different destinations. As Yii is designed to work well with third-party code, you can integrate other frameworks data into your Yii powered application.
8. Aura
Aura provides clean, fully decoupled libraries and independent libraries for PHP 5.4+ that can be used in any database, alone, in concert with each other, or into a full-stack framework of their own. It's the second major revision of Solar, rewritten as a library collection with dependency injection. It provides high-quality, well-tested, standards-compliant library packages that can be used in any codebase, with each library being self-contained and independently downloadable. There are enough libraries to form a full framework and be used for application development. As Aura is intended to take advantage of PHP5.4+, it features formal namespaces, anonymous functions, late static binding, short array syntax, traits, and more that aren't available in earlier versions of PHP.
9. Fat-Free
Fat-Free is a powerful, easy-to-use PHP micro-framework to help build dynamic and robust web applications. It's condensed into a single file (only 60kb), to give you a solid foundation and mature base code to get started quickly. It boasts an easy-to-use web development toolkit, a high performance URL routing and cache engine, built-in code highlighting and support for multilingual applications. There is no complex configuration required, with a well organized directory structure and support for both SQL and NoSQL databases. Fat-Free comes packaged with optional plug-ins to extend its capabilities, including; unit testing toolkit, template engine, markdown-to-HTML convertor, Geodata handler, custom logger, image processor and lots more. It takes a minimalistic approach to software architecture, avoiding un-necessary complication, aiming to strike a balance between code, performance and productivity.
10. PHP-MVC
PHP-MVC is an extremely simple but effective Model-View-Controller application structure which is clean, easy to learn, highly documented and features a self-explaining structure and optional Composer integration. It comes in two versions, a basic and advanced, with the advanced version featuring additional Twig support and automatic SASS compiling in pure PHP. It is not a fully featured framework but instead provides a bare-bone structure, aiming to be extremely slimmed down. It's as simple and readable as possible, with a skeleton structure for quick application building, especially useful for those new to PHP. The project encourages coders to work according to PSR 1/2 coding guidelines, promoting the usage of PFO, and the use of external libraries via Composer. As it only uses native PHP code, there's no need to re-learn a framework, so you can get started straight away.
11. Kohana
Kohana is a HMVC PHP5 framework that provides a rich set of common components to build web applications quickly, including translation tools, database access, code profiling, encryption, validation and lots more. Kohana has been carefully benchmarked to ensure it's both efficient and organized for real world usage. You can use specific libraries and tools, with simple tools to help identify bugs and solve performance issues. As Kohana is an OOP framework, it's built using strict PHP 5 classes and objects, with an easy setup as there are no code generators or complicated configuration files. With a simple routing structure and commented code, it's easy to understand and get started quickly. With an active community forum and IRC channel you have access to immediate support, along with the opportunity to contribute to Kohana on GitHub.
12. FuelPHP
FuelPHP is a simple, flexible MVC PHP 5.3+ framework, that was designed from the ground up to offer full support for HMVC as part of its architecture. With the added bonus of ViewModels (also known as presentation models), you have the option to add a powerful layer between the controller and the View. Almost every class in FuelPHP's core package can be extended without touching any code. You can also keep your application modular by dividing it into easily packaged modules so you can reuse code. Security is important so all of your output is encoded to make it secure and prevent XSS attacks. There is also support for CSRF prevention with tokens, input filtering and the Query Builder to assist you in preventing SQL injection attacks.
13. Slim
Often times a full-fledged framework can be overkill, micro-frameworks can enable rapid application development and prototyping without a steep learning curve, or any performance issues that can come with a large framework. Slim is a micro PHP framework to help you write simple, yet powerful web application and APIs, featuring standard and custom HTTP methods, route parameters, page templates and route redirects. The framework includes access to error handling and debugging, HTTP caching, Flash messages and secure cookies and AES-256 encryption. It's simple to configure and get started quickly, and the sophisticated URL router and middleware architecture make it ideal for rapid development or API prototyping. Slim isn't the only micro-framework available, other noteworthy choices include Silex, Limonade and Flight.
Have something to add to this story? Share it in the comments.
TOPICS: APPS, APPS AND SOFTWARE, CODE, DEV & DESIGN, INTEROPERABILITY, PHP FRAMEWORK,PROTOTYPE, TECH