Modern PHP without frameworks. Which PHP framework should you choose to learn? Choosing a php framework


I will share my reasoning and insert my five cents. The article will not contain many numbers or graphs (any Google Trends), only personal observations.

So, with the release of the latest PHP versions and the appearance of new versions of popular PHP frameworks (Zend Framework 2, Yii2 (alpha), etc.), interest in the PHP language is growing. By the way, the language is extremely popular at the moment. Mainly among novice web developers (at the moment it is used by more than 80% of all websites), and among resources with average traffic.

There are, of course, examples of world-scale sites using PHP:

Let's return to the question of PHP frameworks and the choice of which one is now popular, in demand and which one should be studied. If we talk about the western market, then the undisputed leaders in terms of demand and frequency of mention are: Zend Framework, CodeIgniter and the rapidly gaining popularity Yii. In addition to these three, CakePHP and Symfony are often mentioned on the world's largest freelance exchanges oDesk and Elance.

In the open spaces of the post-Soviet space, they are popular in decreasing order:

  • Zend Framework
  • CodeInginter
  • Symfony
  • Kohana
  • CakePHP

To summarize, the most popular PHP frameworks in the world according to the preferences of programmers and requests of employers are Zend Framework, CodeIgniter and Yii... The latter is rapidly gaining popularity. Symfony and CakePHP are also common among freelance developers.

Despite the rise in popularity of other scripting languages ​​(like Python and Ruby), large corporations still opt for PHP for the most part. And when choosing a platform, they are guided by such criteria as mastability, the popularity of the framework and the availability of specialists on this platform on the market. In the HiLoad area, PHP is a bit inferior and has apparently reached its limit. But there are compiled solutions based on it like kPHP, HipHop, etc.

What to study and what to focus on?

If you have basic knowledge of PHP, you would like to develop in this direction and you want your skills to be useful for the employer - you should first take a closer look at the first three frameworks: Zend, CodeIgniter, Yii... Next, it is worth deciding which of them will be more "nice" and easier to learn for you. Finally, test them.

My personal relationship with frameworks is as follows:

- Zend Framework - popular but monstrous, there are performance issues. With the knowledge of this framework, you can easily find a job, the other question is whether you will be able to “easily enter” it. As for me, it is difficult to study and you should not start with it, IMHO.

- CodeIgniter is simple and fast. But in terms of functionality, it has lagged far behind its competitors. It is a very good place to start with to understand MVC and other intricacies. But over time, you will not get the functionality out of the box.

- Yii is something in between. Slightly less productive than CodeIgniter, but it contains much more functionality. There is good documentation, and overall is significantly more user-friendly than Zend.

- The rest of the frameworks mentioned above are also worthy of attention, but I had no personal contact with them, and therefore I will not muddy the waters.

I started out by learning CodeIgniter and loved it. Then I began to miss the functionality and I started looking for an alternative. At the moment I study and use Yii in my work. If the question which PHP framework to choose to learn to put it bluntly - then I would still lean towards learning Yii 1.1. And do not be confused by the active work on the backward-incompatible Yii2, before its release in production oh how far.

I hope I was helpful to you.

  • Translation
  • Tutorial

I have a difficult task for you. The next time you start a new project, try to avoid the PHP framework. I am not going to list the shortcomings of frameworks, and this is not a manifestation of the syndrome of rejection of other people's development: in this tutorial, we will use packages written by developers of several frameworks. I totally respect innovation in this area.


But this article is not about them. It's about you. About the opportunity to become a better developer.


Perhaps the main advantage of abandoning the framework will be knowing how everything works under the hood. You will see what is happening without relying on a framework that cares about you so much that you cannot debug or fully understand something.


Your next job may not allow you to enjoy starting a new project without a framework. Many important business-critical PHP tasks involve the use of existing applications. It doesn't matter if this application is built on a modern framework like Laravel or Symfony, on one of the old platforms like CodeIgniter or FuelPHP - or it's a depressingly widespread legacy PHP application with an "include-oriented architecture": if you are now developing without framework, you will be better prepared for any for a future PHP project.


Previously, they tried to create without frameworks because some systems forced to interpret and route HTTP requests, send HTTP responses, and manage dependencies. Lack of standards inevitably led to the fact that at least these the framework components were closely interconnected. So if you started developing a project without a framework, you ended up building your own framework.


But today, thanks to PHP-FIG's efforts at autoloading and interoperability, you can develop without a framework, without building it along the way. There are many great, interoperable packages out there, written by numerous developers. And collecting them into a single system is much easier than you think!

How does PHP work?

First of all, it is important to understand how PHP applications interact with the outside world.


PHP runs server applications in a request / response cycle. All interaction with the application - from the browser, command line, or REST API - comes to it as requests. When a request is received, the application loads, processes the request, and generates a response, which is passed back to the client, and the application is closed. And this happens when every handling.

Request controller

Armed with this knowledge, let's start with the front controller. It is a PHP file that handles all requests for your application. That is, it is the first PHP file that the request goes into, and (essentially) the last PHP file that the application's response goes through.


Let's use the classic example with Hello, world! served by PHP's built-in web server to check if everything is configured correctly. If you haven't already, make sure your environment has PHP 7.1 or higher installed.


Create a project directory, make a subdirectory public in it, and inside it an index.php file with the following code:


Note that we are declaring strong typing here - this should be done at the beginning of every PHP file in your application - because type hinting is important for debugging and clear understanding by those who will code after you.



php -S localhost: 8080 -t public /

Now let's open the address http: // localhost: 8080 / in the browser. Is displayed Hello, world! without mistakes?


Fine. Let's move on to the next step!

Autoloading and third-party packages

When you first started working with PHP, you probably used include or require statements to get functionality or configurations from other PHP files. In general, this is best avoided, because it will be much more difficult for other people to understand the code and understand where the dependencies are. This turns debugging into nightmare.


Exit - autoload. This means that when your application needs to use a class, PHP knows where to find it and automatically loads it when called. This feature has existed since PHP 5, but became actively used only with the advent of PSR-0 (autoloading standard, now replaced by PSR-4).


It would be possible to go through the burden of writing our own autoloader, but since we chose Composer to manage third-party dependencies, and it already has a very convenient autoloader, then we will use it.

Middleware

If we imagine an application in the form of an onion, in which requests go from the outside to the center, and responses go in the opposite direction, then the middleware is each layer of the onion that receives requests, probably does something with the responses and passes them to the bottom layer, or generates a response and sends it to the top layer. This happens when the middleware checks requests against conditions such as a request for a path that does not exist.


If the request goes to the end, the application will process it and turn it into a response. After that, each intermediate layer will receive a response in reverse order, possibly modify it and transfer it to the next layer.


Use cases for intermediate layers:

  • Debugging development problems.
  • Gradual exception handling in production.
  • Limiting the frequency of incoming requests.
  • Replies to requests for unsupported media types.
  • CORS handling.
  • Routing requests to the appropriate processing classes.

Is middleware the only way to implement tools to handle all of these situations? Not at all. But middleware implementations make the request / response loop much clearer, which greatly simplifies debugging and speeds development.


We'll use middleware for the last scenario: routing.

Routing

The router uses the information from the request to figure out which class should handle it (for example, the URI / products / purple-dress / medium should be processed using the ProductDetails :: class class with purple-dress and medium as arguments).


Our application will use the popular FastRoute router through a PSR-15 compliant middleware implementation.

Middleware manager

In order for our application to work with any middle layer, we need a dispatcher.



composer require relay / relay: [email protected]

And since the PSR-15 specification requires the middleware implementation to pass PSR-7 compliant HTTP messages, we'll use Zend Diactoros.


composer require zendframework / zend-diactoros

Let's prepare the Relay to receive intermediate layers.


// ... use DI \ ContainerBuilder; use ExampleApp \ HelloWorld; use Relay \ Relay; use Zend \ Diactoros \ ServerRequestFactory; use function DI \ create; // ... $ container = $ containerBuilder-> build (); $ middlewareQueue =; $ requestHandler = new Relay ($ middlewareQueue); $ requestHandler->

In line 16, we will use ServerRequestFactory :: fromGlobals () to collect all the information needed to create a new request and send it to Relay. This is where the request is pushed onto the middleware stack.


Now let's add FastRoute and a request handler (FastRoute determines if the request is valid and can be processed by our application, and the request handler passes the request to the handler that is configured for this route).


composer require middlewares / fast-route middlewares / request-handler

Now let's define a route for the handler class Hello, world! .. Here we will use the / hello route to demonstrate the possibility of using a route other than the base URI.


// ... use DI \ ContainerBuilder; use ExampleApp \ HelloWorld; use FastRoute \ RouteCollector; use Middlewares \ FastRoute; use Middlewares \ RequestHandler; use Relay \ Relay; use Zend \ Diactoros \ ServerRequestFactory; use function DI \ create; use function FastRoute \ simpleDispatcher; // ... $ container = $ containerBuilder-> build (); $ routes = simpleDispatcher (function (RouteCollector $ r) ($ r-> get ("/ hello", HelloWorld :: class);)); $ middlewareQueue = new FastRoute ($ routes); $ middlewareQueue = new RequestHandler (); $ requestHandler = new Relay ($ middlewareQueue); $ requestHandler-> handle (ServerRequestFactory :: fromGlobals ());

For everything to work, you need to update HelloWorld, making it a callable class, that is, so that this class can be called as a function.


// ... class HelloWorld (public function __invoke (): void (echo "Hello, autoloaded world!"; exit;))

Notice the added exit; in the magic method __invoke (). You will soon understand what this is for.



// ... use Zend \ Diactoros \ ServerRequestFactory; use function DI \ create; use function DI \ get; use function FastRoute \ simpleDispatcher; // ... $ containerBuilder-> addDefinitions ([HelloWorld :: class => create (HelloWorld :: class) -> constructor (get ("Foo")), "Foo" => "bar"]); $ container = $ containerBuilder-> build (); // ... $ middlewareQueue = new FastRoute ($ routes); $ middlewareQueue = new RequestHandler ($ container); $ requestHandler = new Relay ($ middlewareQueue); $ requestHandler-> handle (ServerRequestFactory :: fromGlobals ());

Voila! When you restart your browser, you should see Hello, bar world!.

Correct submission of responses

Remember I mentioned the exit statement in HelloWorld?


This is an easy way to make sure we get a simple answer, but still not the best way to send output to the browser. This crude approach forces HelloWorld to do the extra work of rendering the reports - and that should be done by another class - which makes it too difficult to send headers and status codes, and also causes the application to close, giving no chance of running middleware running after HelloWorld.



Let's update HelloWorld to return Response.


// ... namespace ExampleApp; use Psr \ Http \ Message \ ResponseInterface; class HelloWorld (private $ foo; private $ response; public function __construct (string $ foo, ResponseInterface $ response) ($ this-> foo = $ foo; $ this-> response = $ response;) public function __invoke (): ResponseInterface ($ response = $ this-> response-> withHeader ("Content-Type", "text / html"); $ response-> getBody () -> write (" Hello, ($ this-> foo) world! "); Return $ response;))

Let's update the container definition so that HelloWorld is provided with a fresh Response object.


// ... use Middlewares \ RequestHandler; use Relay \ Relay; use Zend \ Diactoros \ Response; use Zend \ Diactoros \ ServerRequestFactory; use function DI \ create; // ... $ containerBuilder-> addDefinitions ([HelloWorld :: class => create (HelloWorld :: class) -> constructor (get ("Foo"), get ("Response")), "Foo" => " bar "," Response "=> function () (return new Response ();),]); $ container = $ containerBuilder-> build (); // ...

If we refresh the page now, we get a blank screen. The application returns the correct Response object from the middleware manager, and then ... what?


It just doesn't do anything with it.


We need one more tool: an emitter. It sits between the application and the web server (Apache, nginx, etc.) and sends your response to the client that generated the request. The emitter simply takes a Response object and translates it into instructions that the server API can understand.


Good news! The Zend Diactoros package, which we already use to manage requests, includes an emitter for PSR-7 responses.


For the sake of simplicity of the example, we are using a very simple emitter here. While it can be much more complex, in case of large downloads, the real application must be configured to automatically use the streaming emitter. This is well documented in the Zend blog.


Update public / index.php to receive the Response from the dispatcher and pass it to the emitter.


// ... use Relay \ Relay; use Zend \ Diactoros \ Response; use Zend \ Diactoros \ Response \ SapiEmitter; use Zend \ Diactoros \ ServerRequestFactory; use function DI \ create; // ... $ requestHandler = new Relay ($ middlewareQueue); $ response = $ requestHandler-> handle (ServerRequestFactory :: fromGlobals ()); $ emitter = new SapiEmitter (); return $ emitter-> emit ($ response);

Reload the page - we are back in business! It's time to process responses more reliably.


Line 15 ends the request / response loop and starts the web server.

Completion

With 44 lines of code and several widely used, thoroughly tested, reliable, interoperable components, we have implemented the bootstrap program for a modern PHP application. It is compatible with PSR-4, PSR-7, PSR-11, and PSR-15 standards, so a wide variety of HTTP message implementations, DI containers, middleware, and dispatchers are available to you.


We've dug into some of the technology and reasoning, but I hope you can see the simplicity of bootstrapping a new application without the accompanying framework junk. I also hope that you are now better equipped to apply these technologies to existing applications.

Tags: Add Tags

Today you will see a list of PHP frameworks with all their pros and cons. I really hope you find this list helpful. Well, let's go!

Laravel


Required PHP version - 7

Laravel is a comprehensive framework for rapidly developing applications using MVC architecture. It is by far the most used of all PHP frameworks and has a huge following among developers.

Pros:

  • MVC architecture (including PHP 7)
  • Unit testing (FAST for HHVM)
  • High level of abstraction
  • Opportunities to Avoid Overloads with Dynamic Methods
  • Huge amount of built-in functionality
  • The ability to integrate payments with the Stripe system
  • Reliable data encryption system

Phalcon


Required PHP version - 5.3

Phalcon is an MVC-oriented PHP framework. Unlike other frameworks, Phalcon requires relatively few resources, which results in very fast processing of HTTP requests. This feature can be decisive for some developers working with systems about which it is difficult to say anything in advance.

Phalcon provides developers with data storage tools such as native SQL dialect: PHQL as well as Object Document Mapping for MongoDB. Other features of this framework also include: templating, form builders, ease of application development, providing support in an international language, etc. Phalcon is ideal for both building various REST APIs and developing full-fledged web applications.

Pros:

  • High speed and low overload
  • Uniqueness - this framework was created as an extension of the C programming language.
  • Very good built-in protections
  • A huge amount of documentation
  • Developer oriented

Flaws:

  • Doesn't work with HHVM

Symfony


Required PHP version - 5.5.9

Symfony is the most popular framework for developing websites and web applications. Symfony Components are a collection of unrelated, reusable components that have been used to create applications such as Drupal, phpBB, and eZ Publish.

Pros:

  • High performance with bytecode caching
  • Reliability
  • Good documentation, maintainability
  • Good support; fully formed framework

Flaws:

  • Despite the presence of good documentation, this framework is quite difficult to learn.

CodeIgniter

Required PHP version - 5.4

CodeIgniter is a powerful PHP framework that takes up very little memory. It was created for developers looking for a simple and elegant developer kit to build fully functional web applications.

Pros:

  • Primarily focused on developers
  • Doesn't require any additional dependent objects or other support
  • Ability to use common web hosting services using standard databases such as MySQL
  • Outperforms most other frameworks (not MVC)
  • Good documentation and LTS (long term support)

Flaws:

  • There is no namespace, on the other hand it can increase the speed of work
  • Inconvenient for unit testing, unlike other similar frameworks
  • A small number of libraries built directly into the framework
  • Is a rather outdated framework that does not support modern PHP functions
  • There are security problems that were quite obvious and over the years have not been fixed by the development team

CakePHP

Required PHP version - 5.5.9

CakePHP is a framework that simplifies and speeds up the application development process with much less code. It is a modern framework for PHP 7, which provides a more flexible level of database access, as well as a powerful code generation system. These features make it easier, faster and, of course, more enjoyable to develop both small and complex systems. If you want to develop fast, then CakePHP is exactly what you were looking for.

Pros:

  • Modern framework that supports PHP 5.5+ versions
  • Powerful code generation system, the ability to quickly develop
  • Very well suited for developing commercial web applications (MIT license)
  • Built-in database access as well as caching, validation and authentication
  • Extensive storage tools include cross-site scripting
  • Preventing cross-site scripting attacks as well as SQL injection
  • CSRF as well as form validation
  • Good documentation
  • Actively developing

Flaws:

  • Not as well suited for developing Restful APIs as Laravel or the other frameworks mentioned above

Zend


Required PHP version - 5.6, 7.0

Zend is a framework that is a collection of professional PHP extensions with over 158 million installations. This framework is used to develop web applications and services using PHP 5.6+ and guarantees 100% object-oriented code using a wide range of programming language properties.
The Zend framework uses Composer to inject package dependencies; PHPUnit - for testing all packages; Travis CI - as a continuous integration testing service.

Pros:

  • Ideal for developing commercial applications
  • Object oriented
  • Lots of components for validation, feeds and forms
  • Contains unbound components

Flaws:

  • Not as good for rapid application development as other frameworks

FuelPHP


Required PHP version - 5.3.3

FuelPHP is a simple, flexible, user-friendly framework for PHP versions 5.3+ that has all the best ideas from other frameworks that has just been released!

Pros:

  • Caching is optional
  • Packet Authentication
  • Possibility of continuous development
  • URL routing
  • The new version will be fully object-oriented and can be installed using the linker, and after a single install, multiple applications can be supported

Flaws:

  • A fairly complex framework for beginners to learn (small amount of documentation)
  • A fairly new framework, which, so far, is supported in few places
  • Small investment from the open source community (e.g. compared to Laravel or Phalcon)

Slim


Required PHP version - 5.5

Slim is a micro PHP framework that helps you quickly develop small but powerful web applications and APIs.

Pros:

  • Fastest RESTful framework available
  • There is a sufficient amount of documentation to successfully start working with this framework
  • Ideal for developing small RESTful APIs
  • Actively developing

Flaws:

  • Provides a small number of possible linker add-ons during installation

Phpixie


Required PHP version - 5.3

Phpixie is one of the more popular complex PHP frameworks. It includes by default excellent cryptography and security tools, MongoDB support, and the ability to "swap" code with the linker.

Pros:

  • A relatively new framework
  • A framework that's easy to get started with
  • The documentation contains examples of using the code
  • Good routing system
  • Ability to quickly compile code
  • Is HMVC oriented

Flaws:

  • Few modules
  • No support for components that were created independently of dependent objects

Fat-Free


Required PHP version - 5.5

It is a powerful yet easy-to-use mini PHP framework designed to help you develop dynamic and robust web applications, and most importantly, very fast!

Pros:

  • Takes the minimum amount of memory
  • Easy to learn
  • Copes quickly with optimizations for url routing, cache models, code
  • Well suited for multilingual applications
  • Out of the box support for SQL or No SQL
  • Database availability
  • Lots of software packages including unit testing, images
  • Source file processing, JavaScript / CSS optimization, data validation, Open id availability and much more

Flaws:

  • Too much for micro-frameworks
  • Compared to the above frameworks, it has no new options
  • Allows repetition of code, unlike other MVC frameworks, in which this problem is solved

Yii 2.0

Advantages:

  • Easy to install
  • Yii is a fully object-oriented framework and takes full advantage of the advanced PHP features.
  • The Yii framework can be easily customized to suit your needs. Almost every component of the framework is extensible
  • Yii is tightly integrated with Codeception
  • Yii comes with a Security component that provides several methods to help you build a more secure application.
  • Yii gives us several tools to help us reduce the time spent on non-priority tasks and focus on the main task.
  • Easy to tune for best performance

Flaws:

  • Strong class cohesion. Everything in the system inherits from CComponent. Access to models through static methods, which allows them to be used even where they are not needed.
  • The integration of the template engine (Twig, Smarty) is rather weak compared to native templates. And native use is not a hunt.

Aura


Required PHP version - 5.4

The Aura project is a collection of high quality, well tested, standards compliant, independent semantic versioning library packages that can be used in any source code base.

Each library is stand-alone and includes only the essentials for basic purposes. Each of the library packages is completely independent: it is not related not only to frameworks, but also to other packages. Thus, such a feature gives developers the ability to use either a small part of a given framework, or the entire framework.

Pros:

  • Takes up little memory
  • Availability of guides for getting started with the framework
  • Ideal for working with small REST APIs
  • In the phase of active development
  • Add-ons include: HTTP Caching and Flash

That's all! I hope this list and description of all PHP frameworks will be useful to you. Which PHP framework are you using? Let me know in the comment

This article does not cover technical terms and concepts to keep it simple. If you are a programmer, let me tell you why you should prefer use frameworks instead of pure PHP for your projects. If you are an entrepreneur, let me tell you why it is so important to insist that your software developer developed web applications and websites via PHP frameworks.

Comparison pure PHP and PHP framework may be similar to math.

To solve a difficult problem in mathematics, you can either take a piece of paper or use a scientific calculator to solve it.

Finding a solution to a math problem on paper is like coding in pure PHP, while using a scientific calculator is like coding using frameworks.

So what do I mean?

Native PHP - Math with paper

A good student can solve a problem in a few steps. Accuracy level is from 75% to 100%.

The mediocre student may or may not be able to solve a problem, he will write down several steps to solve the same problem. Here the level of accuracy is from 50% to 75%.

A bad student will not be able to solve the problem at all. However, he will record many, many steps to solve the problem. The accuracy level is from 0% to 50%.

Scientific calculator

Every student can solve a problem with 100% accuracy once they learn how to use a calculator. The predefined formulas in the calculator will give accurate results faster.

Pure PHP problem

Pure PHP gets tricky when people start writing their own logic. Someone will be able to solve the problem in a few lines of code, while others will not be able to solve it in several hundred. As a result, both of them cannot read each other's code. So the problem that comes up here is inconsistency.

Why Choose Frameworks?

The framework provides robustness, consistency and great time savings. It has a rich feature set so you don't have to reinvent the wheel. You will have almost all the development functionality PHP web applications... Since it was designed in an OOP style, you can extend existing functionality to have complete control over your application. The framework will not let you write bad code, unless, of course, you do it on purpose. When you work as a team, integrating your entire module becomes very easy, and the framework also helps in understanding each other's code.

When you start developing a project, there are many things that you must take care of. The framework does everything for us, so we can be sure that the application is clean and safe. MVC pattern is one of the key elements of any modern PHP framework Separating logic and presentation is a very good practice.

Modification of the project

Sooner or later, if you left a good impression of yourself, the client will come back to us to improve the site. And here comes an important point - if the project was completed on pure PHP, you will either have to strain very hard to fulfill the client's new wishes or completely abandon further work with the project. But if the project was done within the framework, then in this case you will feel all the power and beauty of the selected technology. All you have to do is make changes and give the updated project back to the client.

Then really pure PHP is so bad?

Absolutely not. Pure PHP helps you understand the logic of the framework. Your logical thinking can be improved with pure PHP... However, native PHP only becomes bad when it hits the table of a bad programmer. Don't dive into a framework with no coding experience pure PHP... Also, make sure you read the full documentation for the framework before you start coding in it, as it is now "fashionable" to use native PHP inside the framework, but this is absolutely the wrong way to use such a useful tool.

In general, the easiest way to figure out what a framework is with the help of my course.

We continue to talk about the most popular and useful tools for working with languages. This time we will focus on PHP frameworks.

Laravel

This framework has passed a rapid way from simply promising to one of the leaders of the PHP movement. A brief description is as follows: open source, working with the architectural model MVC, convenient and intuitive interface, extended functionality.

The last point is manifested in the following possibilities:

  1. Support for third-party modules, of which there are a considerable number, which significantly expands the standard capabilities of the framework.
  2. Reverse routing, which allows you not to waste time updating links at work - everything happens automatically.
  3. Eloquent ORM design patterns that help in defining strong relationships between database objects.
  4. Automatic loading of classes. This, on the one hand, reduces the amount of code due to the absence of the need to write include ..., on the other hand, unused classes are not included with all the consequences.
  5. Unit testing - having a large number of tests to prevent overlapping errors.
  6. Database version control system. If you intend to frequently update your product insignificantly, this function will allow you not to waste time on records of the same type.

As you can imagine, this is not a complete list of the features that Laravel developers provide to their clients. For a complete list, refer to the official website or plunge into the world of this framework personally - you will definitely like it.

CodeIgniter

This framework, which is more than 11 years old, has gained fame due to the simplicity of the resources used, simplicity, convenience, a huge amount of documentation designed for developers of any level, and the absence of restrictions. At one time, Laravel was created precisely as a competitor to CodeIgniter, so until recently it was a universal reference point.

Despite its simplicity, like any popular framework, CodeIgniter also has a couple of useful features:

  1. Great support from the CodeIgniter Reactor community, including libraries, modules, templates, and documentation.
  2. Database templates that are very similar to SQL syntax.
  3. Server side caching capability.
  4. Using a package manager to quickly link libraries from the command line.

But CodeIgniter is not going to deviate from the basic idea of ​​simplicity and accessibility. Therefore, it is not worth waiting for this framework to do everything for you, although formally it is possible.

Symfony

Despite the fact that the release of the third version took place back in 2015, it is the second version of Symfony that alone holds the 3rd place in popularity among the frameworks. The reason is similar to CodeIgniter - the speed of work and overall simplicity. But so that this does not conflict with functionality, the user is asked to choose one of 3 versions for profile work:

  1. Standard Edition - for acquaintance and common tasks. The Hello World Edition distribution kit is based on it, which contains exactly one optimization script for further use in benchmarks.
  2. Symfony CMF is an adaptation for developers working with CMS systems.
  3. REST Edition - optimization for working with REST-architecture (online stores, search engines, etc.).

Symfony is stereotypically considered to be a framework for command line lovers. Indeed, the built-in SensioGeneratorBundle interface will help you get a whole skeleton for your code from one line of text.

An undoubted advantage will be the availability of official documentation in Russian. It is worth mentioning that it is available only for the first version of Symfony, but among unofficial releases you will find translations of official releases and independent high-quality documentation.

Yii

Yii is touted in many rankings as the main competitor to Symfony. There really is a reason for this: both languages ​​work with a full stack, both have source code on GitHub, and both represent boilerplate development quite well. However, while Symfony only provides a model and controller, Yii implements full MVC interoperability. In addition, the interface in Yii is much more convenient, the generation of code using the Gii browser element is a little more powerful here, and in fact, Yii will save you more time on development, and the application will run a little faster.

Nette Framework

Perhaps the least known of the top PHP frameworks, which is surprising given its 13-year-old age and wide range of capabilities. Here are some of them:

  1. One of the most powerful PHP frameworks.
  2. Great for beginners, the learning curve is quite smooth.
  3. Powerful tools to help: Tracy - for tracking errors, Latte - a fast and intuitive template generator, Tester - a utility for high-quality testing of your application under realistic conditions.
  4. Possibility of teamwork of several developers on one project.
  5. Great documentation and a friendly community (and not only in Czech).

In general, if you have not tried Nette yet - we recommend it, if you find any flaws - be sure to write in the comments.

In a short line

CakePHP is a popular Ruby on Rails clone that focuses on PHP only. All the benefits are similar as well.

FuelPHP is a lightweight framework that has not received much recognition for its lack of uniqueness and overestimated expectations. As you can imagine, this is not reflected in real work for the worse.

Phpixie - one of the main features of this framework is the update. You no longer have to wait several months for a new revision. Found -> uploaded the fix -> continue working. The principle is something like this.

Fat-Free is a very light, fast and simple framework for quick and easy development. A minimum of extraneous worries.

Slim is a framework that is easy to learn and get started with PHP, but has little use in the adult professional web world.

Phalcon is a great, high performance framework that is light on memory and file system. Minus - the project is rather crude and with a lot of pitfalls C-stones.

Editor's Choice
The Nizhny Novgorod region and Nizhny Novgorod are historically the second center of the Russian Old Believers after Moscow. Currently in ...

Maslenitsa is one of the oldest Russian holidays. Pagan in origin, Maslenitsa peacefully "got on" with religious traditions ...

"Mom, draw!" Every mom sooner or later hears from her child the cherished "Mom, draw for me ...". And the options for ending this phrase ...

Archpriest Avvakum (1620-1682) is an outstanding historical figure. On Russian soil, the authority of this man in the 17th century was ...
There were brother and sister - Vasya and Katya; and they had a cat. In the spring, the cat disappeared. The children looked for her everywhere, but could not find it. Once they played ...
Aspiring artists often have situations when they have no experience in depicting something. In order not to get confused, to understand where to start ...
Holy water - ordinary in composition and original origin water (well, spring, lake, river, tap), wonderful ...
For a long time, you can buy chicken hearts in the store, but until recently, hearts were sold exclusively together with the liver ...
With apples and dried apricots (it is better to take turkey breast fillets for this dish), baked under foil - the dish is not quite ordinary, thanks to ...