avatar

Lachezar Grigorov

Full stack web and mobile developer

Welcome screen performance comparison Lumen vs Laravel vs Symfony vs CodeIgniter vs CakePHP vs Zend vs FuelPHP vs Slim vs PHPixie vs Fat-Free vs Express vs Hapi vs Koa vs Sails

Performance comparison between all relevant PHP and Node.js fremaworks this days. All tests are done in an real productive environment. The welcome screen of each framework was the entry point for each test. A simple "Hello World" script was implemented for the frameworks without welcome screen.

Continue reading

Performance comparison PHP vs Node.js

Last days I've read a lot of posts about the performance difference between PHP and Node.js  but most of them was made with PHP 5 and not in real productive environment so I decide to test the performance of PHP 7 + Nginx vs Node.js vs Node.js + Nginx using WRK HTTP benchmark tool. Here are the results I've got.

Continue reading

How to organize your project with PHP and Laravel to get the best structure in MVC pattern

These days the organization and the structuring of the code can be a nightmere for the developers. Еach day the size and the complexity of the projectst increases. The requirements are more and more. At the end the developers  begin to weave in unpalatable for them spaghetti without dressing. This condition is called "spagetti code". With the growth of the project and its complexity the navigation in the code bekome more difficult. The same parts of the code are dublicated at several positions. It is not clear at first look which part of the code must be corrected by any feture task or bug fix. The code is a nightmere for the newcomers developers and they need more time to get into the workflow.

All this can be avoided with some structiral and naming convention of the files and their folders and easily attainable organization of the code. The convenient naming of files and folders helps the developer to find faster the desire part of the code and the organization of the code in different files facilitate the big files with a lot of code. 

In this post I will show you how to organize your code, controllers and views for better further maintenance and development. For the purposes of the post I use PHP with a clean installation of Laravel and PhpStorm IDE.
 

Continue reading

How to use Repository pattern in Laravel 5

The Repository Pattern can be very helpful to you in order to keep your code a cleaner and easy maintainable. It mediates between the data source layer and the business layers of the application. You can use the Repository pattern to have a more flexible way of abstracting the database layer of our applications. For the purposes of this post I will use a clean installation of Laravel  to show how using repositories can make your controllers a bit less verbose, more loosely coupled, and easier to read.

Continue reading