Best PHP RESTful Micro Frameworks

php-micro-frameworks

What are Micro Frameworks?

Before discussing which are the “Best PHP RESTful Micro Frameworks” let begin with the concept of micro-framework. Micro Frameworks is a term used to represent a small set of code and modules that are designed to do only basic tasks and functionality and at the same time they are highly extensible.These frameworks comes with less components than full stack framework but they have several libraries and patterns which are required to make a project of good quality and scalable.
Don’t think that “micro” represent for small projects, it only means “Framework bundled with less components”.

Best PHP RESTful Micro Frameworks

1. Silex

  • One of the fastest micro-framework
  • Built on top of Symphony components
  • Great documentation and community support
  • Good for large projects
  • Follows Symfony2 HTTP conditions
  • Automated functional tests

2. Slim

  • Super fast and extremely light-weight
  • Good documentation
  • Great community
  • Lots of tutorials on YouTube and on other websites
  • Lazy loading with 3rd party implementation
  • Bundled with middleware, caching, encryption of cookies

3. Lumen

  • Zero configuration
  • Excellent documentation
  • Ultra-fast micro framework
  • Good 3rd party support
  • Easily upgradable to laravel
  • Bundled with encryption, middleware, unit testing, caching,queuing and sql-nosql support

4. Phalcon

  • Blazing fast
  • Provides very high performance
  • Written in C-language
  • Compiled for better performance
  • Can handle more requests per second

5.Bullet PHP

  • Little learning
  • Unlimited flexibility
  • Flexible routing
  • Nested closure routing system

That’s all for today folks, try one of the above frameworks and do share your experience with me.

What’s new in PHP 7

Finally the most awaited version of php ie. PHP 7 is officially released.It’s been a long journey to make it bug free and efficient, 8 release cnadidates and finally it’s available to deploy.php-7

PHP 7 bundled with some massive improvements in speed and memory consumption, to be precise twice fast from php 5.6. I would like to congratulate the contribution team for their great effort.

PHP 7.0.0 comes with a new version of the Zend Engine, numerous improvements and new features such as

  • Improved performance: PHP 7 is up to twice as fast as PHP 5.6
  • Significantly reduced memory usage
  • Abstract Syntax Tree
  • Consistent 64-bit support
  • Improved Exception hierarchy
  • Many fatal errors converted to Exceptions
  • Secure random number generator
  • Removed old and unsupported SAPIs and extensions
  • The null coalescing operator (??)
  • Return and Scalar Type Declarations
  • Anonymous Classes
  • Zero cost asserts

PHP revolution begins now with the fastest version of php, get ready to explore the new things with great speed.
Check the complete list of features at php.net

 

How to choose a PHP Framework?

After couple of years of experience, i came across such kind of questions from newbies like Which PHP framework is best to use? Which PHP framework should i use for my new project ? Which php framework is easy to learn ? Which php framework is good for large applications? After hearing all these questions i thought i should put some effort writing an article which could really help out beginners in choosing a framework.

php-frameworks

Before diving into the field of PHP framework first we should understand what is MVC (Model View Controller) ? It is just a way of representing our code in a better way separating database operations, logics and design.

Model is used to perform operations related to database.

Controller, as name suggest, control dataflow between view and model. It contains all the logic which are required in our project.

View contains mainly html, css, js i.e. design part of our website.

model-view-controller

If you see over internet there are lots of frameworks in php with many awesome features and also they are highly scalable but which one to choose that’s the biggest question. In my opinion one should follow these steps

Ask yourself Am i ready for a framework after doing core php?
Answer for this question must be always “YES”. you are always ready for it and you can deploy any framework after gaining knowledge of core php and basic concepts of object oriented langauage (not necessarily in php but in any langauge).

Which framework to choose?
It depends on, what are your criteria of selecting a PHP Framework . Criteria could be anything like ease of setup , learning curve , community support (most important aspect) , available plugins, job opportunities (specially for beginners), scalibilty and many more.

Ease of setup plays an important part in choosing a framework, a framework must be setup with less initial configuration.
Hosting requirement  is the next criteria to consider, if you are using shared hosting then sometimes it could be difficult to setup some framework just because of limited resources which are provided in shared hosting.
Learning curve must be short so that we can become more productive in developing applications.Every framework has it’s own set of rules, directory structure , naming conventions , coding pattern , template engine etc…. It takes some time to get used to it and start developing a project., so choose wisely.
Documentation and Community plays a key role to a framework success. No framework is tuff if it has got good documentation and great community behind it. Always choose a framework with active community support, after-all they will support you when you stuck during your development.

For beginners i prefer going with CODEIGNITER for the first time just because it’s simple to setup and easy to learn in comparison to other framework. This framework has got great community support and believe me almost all the php developers tried out this framework at-least once.

Your next option could be CAKEPHP because you can develop and manage huge application with this beautiful framework and also it has great community support and huge list of plugins to increase your project functionality. I personally used this framework and surely you will develop a great coding standard just because this framework used very strict coding standard for project development.

Cakephp, yii, kohana , symfony , fuelphp,falcon and many more are on the same level in developing any project.

Zend Framework , it’s the biggest framework in PHP and highly scalable application are developed using this and running successfully over the internet.You want a great job. deploy it, if you think your website is really big and have huge traffic then just use it but i think this is a very advance framework and it’s not for beginners.

My personal favourite

LARAVEL is one of the best framework i worked on for developing rest apis and a fully featured applications. It’s deployment is super easy, speed is better than others, very active community behind it and most importantly it increases your productivity and speed of development enormously. It support all the latest technologies whether it’s database or caching and performs almost all the tasks magically reducing burden from your head.You can read more about it at Why i choose Laravel for my next project?

Best of all , your own framework , now please don’t ask me why.. find out yourself.

All in all friends this is the right time go for a framework and make something awesome.