Friday, 19 January 2018

Introduction to MVC and Popular PHP Frameworks

Introduction to MVC

The Model-View-Controller (MVC) is an architectural pattern/design pattern that separates an application into three main logical components: the model, the view, and the controller. Each of these components are built to handle specific development aspects of an application. MVC is one of the most frequently used industry-standard web development framework to create scalable and extensible projects. 

The Model component corresponds to all the data-related logic that the user works with. This can represent either the data that is being transferred between the View and Controller components or any other business logic-related data. 

The View component is used for all the UI logic of the application. 

Controllers act as an interface between Model and View components to process all the business logic and incoming requests, manipulate data using the Model component and interact with the Views to render the final output.

What is a Framework ?

It is  a collection of reusable libraries/classes. There are many libraries and classes are available in any framework which we can use in our any application whenever we need it. Like Database class, we can call it’s functions again & again whenever we need to interact with database like while inserting or updating data or for any other functionality.


15 Most Popular PHP Framework 

1) Laravel

As you can see from the previous chart, Laravel is the most popular PHP frameworks used by developers today. Even it is just still new (released February 22, 2012), but it has catch lot of developers attention. The latest version of Laravel comes as individual Composer packages. It features with good routing, easy authentication, migrations support, Blade templating engine and many more.

2) Symfony

Symfony is a flexible, scalable yet powerful PHP frameworks for MVC application. There are plenty of reusable PHP components that can can be used like Security, Templating, Translation, Validator, Form Config and more. Like Laravel, it’s alss modularize with Composer. Its goal is to make your web application creation and maintenance faster with less repetitive coding.

3) CodeIgniter

CodeIgniter is a free PHP framework maintain by EllisLab. It has an excellent documentation with large user community. There are many features that will make you taste CodeIgniter for your project such as no PHP version conflict, almost zero installation, easy error handling, easy security and encryption steps and has rich built-in libraries and helper.

4) CakePHP

CakePHP is a PHP framework that support version 4 and above. It is easy to learn with fast and flexible templating. The integrated CRUD (create, read, update and delete) is a handy feature in CakePHP for your database interaction. It also has various built-in feature for security, email, session, cookie and request handling.

5) Zend Framework

Zend Framework is a scalable and full featured object-oriented PHP framework. It’s now available in version 2 with lots of new features and improvements. It has an online training and certification which make it popular and used by plenty of enterprise organizations. With its OOP (object-oriented programming) and design patterns consistency, you can easily extend custom classes and use only what you need.

6) Phalcon

Inspired with the fastest living bird of Falcon, Phalcon framework offers the same ability which is speed. When benchmarked with other popular frameworks, it has the fastest time request and lowest memory usage according to Systems Architect and Phalcon crew test. This happen because it was purely written with C/C++ for performance optimization purpose.

7) Slim

Slim is a lightweight micro-framework for PHP inspired by Sinatra, a Ruby framework. It has a tiny size without overkill learning curve. It’s built with incredible routing system and focuses on RESTful API with all HTTP methods (GET, POST, PUT, DELETE) supports. To use it, you need at least has a PHP version of 5.2+.

8) Yii 

YiiFramework is a modern PHP framework with OOP deain system inside. Besides easy to install, it’s also highly extensible, enabling you to fit what you need. There are several tools that can help you easily tune your web application for better performance. Yii has built in integration with a great PHP testing framework, CodeCeption, to test your application easier and faster.

9) Fat-Free

Fat-Free is a powerful and easy to use PHP micro-framework. Developed by Bong Cosca in 2009, Fat-Free is one of lightweight framework with less than 50KB. It was developed almost entirely in PHP with main features of URL router, multilingual application support and cache engine. There are plentiful plugins for a large number of database back-end like MySQL, MSSQL, SQLite, Sybase, DB2, MongoDB, CouchDB, PostgreSQL and Flat File.

10) Kohana

Kohana is a PHP framework with HMVC (Hierarchical Model View Controller) architectural pattern. Kohana was built with PHP OOP in mind, which means you should you’ll get some advantages from it to have visibility protection, abstracts, automatic class loading, interfaces, overloading and singletons. The GET, POST, COOKIE, and SESSION methods can also be used as you want. To use it, you should have a minimum PHP version of 5.

11) FuelPHP

FuelPHP is a PHP framework that written in PHP 5.3, and to be able to use you also need to use the same version of PHP or above. It uses a Cascading File System inspired by Kohana. Main features are A URL routing system, RESTful implementation, HMVC implementation, template parsing, form and data validation, ORM (Object Relational Mapper), vulnerability protection and caching system. The community driven approach makes it as a flexible, modular and extensible framework.

12) Flight

Flight is an extensible PHP micro-framework. Flight has a straightforward documentation which makes you easy to learn it even you are a beginner. It is a simple and restfull framework and not recommended for big web application project. It also support routing, error handling, JSON sending and request and more.

13) PHP-Mini

Just like its name, PHP Mini is a lightweight restful PHP framework suitable for mini project and quick prototype. It has a simple but clean code and easy to understand. There CRUD demo action included for easier database entries. The code are all written natively in PHP, so you don’t need to learn additional framework.

14) Simple PHP Framework

This framework is a personal project (or project library collection) of Tyler Hall that he started since 2006. He has been dealing with hundreds of different projects and use this library for his projects base. The framework can bootstrapped your project with user authentication, database calls, RSS feeds, etc available on the code. Head over to GitHub to grab the source.

15) Zikula

Zikula is a free open source PHP framework based on Symfony and Doctrine. It can be used whether for small, enterprise or even personal projects. Zikula is well integrated with the popular Bootstrap 3 framework and Font Awesome 4. There are some pretty cool features including flexible theme system, WYSIWYG editors, ModuleStudio, document creator, galleries, chat and more.
Previous Post
Next Post

post written by: Dhaval Thakkar

Dhaval Thakkar is an enthusiastic web developer who is passionate about learning new things and always ready to help other developers.Just Web Code is a way to provide web solutions to web developers.