Skip to main content

My CakePHP 3 Review


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

Comments

  1. Thank you for sharing helpful information and very this is very useful in PHP Development.

    ReplyDelete

Post a Comment

Popular posts from this blog

A Guide to UTF-8 for PHP and MySQL

Data Encoding: A Guide to UTF-8 for PHP and MySQL As a MySQL or PHP developer, once you step beyond the comfortable confines of English-only character sets, you quickly find yourself entangled in the wonderfully wacky world of UTF-8. On a previous job, we began running into data encoding issues when displaying bios of artists from all over the world. It soon became apparent that there were problems with the stored data, as sometimes the data was correctly encoded and sometimes it was not. This led programmers to implement a hodge-podge of patches, sometimes with JavaScript, sometimes with HTML charset meta tags, sometimes with PHP, and soon. Soon, we ended up with a list of 600,000 artist bios with double- or triple encoded information, with data being stored in different ways depending on who programmed the feature or implemented the patch. A classical technical rat’s nest.Indeed, navigating through UTF-8 related data encoding issues can be a frustrating and hair-pul...

How To Create Shortcodes In WordPress

We can create own shortcode by using its predified hooks add_shortcode( 'hello-world', 'techsudhir_hello_world_shortcode' ); 1. Write the Shortcode Function Write a function with a unique name, which will execute the code you’d like the shortcode to trigger: function techsudhir_hello_world_shortcode() {    return 'Hello world!'; } Example: [hello-world] If we were to use this function normally, it would return Hello world! as a string 2. Shortcode function with parameters function techsudhir_hello_world_shortcode( $atts ) {    $a = shortcode_atts( array(       'name' => 'world'    ), $atts );    return 'Hello ' . $a['name'] . !'; } Example: [hello-world name="Sudhir"] You can also call shortcode function in PHP using do_shortcode function Example: do_shortcode('[hello-world]');

Integrating Kafka with Node.js

Integrating Kafka with Node.js Apache Kafka is a popular open-source distributed event streaming platform that uses publish & subscribe mechanism to stream the records(data). Kafka Terminologies Distributed system: Distributed system is a computing environment where various software components located on different machines (over multiple locations). All components coordinate together to get stuff done as one unit.   Kafka Broker: Brokers are cluster of multiple servers. Message of each topic are split among the various brokers. Brokers handle all requests from clients to write and read events. A Kafka cluster is simply a collection of one or more Kafka brokers. Topics: A topic is a stream of "related" messages. Its unique throughout application. Kafka producers write messages to topics. Producer: Producer publishes data on the topics. A producer sends a message to a broker and the broker receives and stores messages. Consumers: Consumers read data from topics. A consu...