My CakePHP 3 Review – Still Fresh, Still Hot
This past month, the CakePHP team
announced the launch of the alpha release of CakePHP 3. The Cake development team considers version
3 to be a game changer, so with the alpha release of version 3 now hot out of
the oven, this article takes a fresh look at CakePHP 3 as an effective modern
framework for PHP development.
A Brief History
These days, there are so many options
when it comes to PHP development. As PHP has matured, more and more PHP
Frameworks have come onto the scene, providing developers with a wide array of
choices. But it hasn’t always been that way.
Back in 2005, when PHP 4 was still
the standard, there were no PHP frameworks and developing an object oriented
coding approach in PHP was certainly a challenge. It was then that CakePHP
emerged – the first-ever PHP MVC framework.
In the nearly 10 years that have passed since it was first released, CakePHP
has continued to evolve, maintaining a healthy market share of PHP developers.
Just how popular is the CakePHP
framework? It is ranked in the top 4 most popular PHP projects on GitHub, of
around 130,000 projects, with over 18,000 members in the CakePHP Google group
with 32,000 topics. With 270 contributors to the code, and 320 contributors to
the documentation, there is no denying that CakePHP has a big following.
CakePHP’s current widespread and growing popularity is well summarized in an
article by James Watts, core member and community manager of
CakePHP for the Cake Software Foundation, who I interviewed in the
course of writing this article.
With version 3 of the framework now available, CakePHP is most certainly
expected to remain a leading force in the PHP world and a major contender
amidst today’s varied landscape of PHP frameworks.
What’s new in version 3 of CakePHP?
This review is based on the alpha release of CakePHP 3.0, which
incorporates a number of new features and enhancements including:
·
Better performance. Version 3
incorporates performance improvements to the bootstrap process, the routing
process, and several parts of process for generating helper templates.
·
Enhanced components and helpers. Version 3
provides enhanced support for “flash messages” with its new FlashHelper and FlashComponent. In
addition, the CookieComponent has been enhanced, making it
easier to separate the configuration of cookie namespaces and the handling of
cookie data.
·
Improved session management. Session
management has always been a static class in CakePHP which has proven to be
problematic in a number of ways. With version 3, you can now access the session
from the request object $this->request->session(). This change also
makes the session easier to test, and enables CakePHP to use PHPUnit
4.x.
·
Improved consistency of conventions. The
application skeleton and plugin skeletons have been updated to use the same
directory structure in order to be more consistent with one another.
·
Themes and plugins merged. A key goal of
CakePHP 3 was to make themes more powerful and robust. Working toward that
goal, it became apparent that what was really needed was for themes to provide
the same capabilities as plugins. Accordingly, any plugin may now be used as a
theme, which also simplifies packaging and redistribution.
·
ORM Improvements. Several API changes have been
made to the ORM (Object-relational mapping).
Most notably, it’s now simpler to specify deep associations for saving
operations, and a couple of conventions have been changed to reduce the
learning curve and confusion among new adopters.
In addition, there are a few additional features that are also planned
to be incorporated into the beta release of version 3.0. Most importantly:
·
Internationalization and localization (i18n and L10n) feature
enhancements
·
A replacement for CacheHelper based on Edge Side Includes
·
A new routing API for simpler and faster route declaration
Indeed, version 3 represents a significant upgrade beyond prior versions
of CakePHP.
Why CakePHP?
While CakePHP has many great features, this review focuses on a few in
particular that really help set it apart, namely:
·
Convention over configuration
·
CakePHP’s ORM (Object-relational mapping)
·
Components and helpers
For more details click here
Thank you for sharing helpful information and very this is very useful in PHP Development.
ReplyDelete