Over a million developers have joined DZone.

CakePHP Goes 2.0: New Lazy-Loading = Super Speed!

DZone's Guide to

CakePHP Goes 2.0: New Lazy-Loading = Super Speed!

· Web Dev Zone ·
Free Resource

Building real-time chat? Enroll in a Free Course on Mobile Chat Development. 

CakePHP has long been one of the top PHP frameworks in use and has maintained a steady position in the face of some tough competitors like Codeigniter, Zend Framework, Symfony2, and Kohana.  If you didn't know already, CakePHP was originally modeled after the highly successful Ruby on Rails.  This week, CakePHP hit a major milestone with version 2.0.  This version has a long list of new features that starts with deprecation of PHP 4 and support for PHP 5.2 and up.  Here's the official new feature list:

  • Use of native features like exceptions, PDO, SPL, json_encode and much more.
  • Embraced the PSR-0 recommendation for file naming. Now all your classes map to a file with the same name. Less things to remember!
  • New Error and Exception handlers provide easier to configure, and ease working with errors such as page not found, unauthorized error and lots more.
  • Improved I18n functions for easier multilingual development.
  • Support for injecting your own objects to act as CakePHP libraries, such as component, helpers and behaviors, no more excuses for modifying core files.
  • Console libraries rebuilt from scratch, automatic help generation, parameter checking, and colors!
  • New Request and Response objects for easier handling of HTTP requests.
  • Better session handling for easier custom engines. Put your sessions into storage systems like Memcache with less effort.
  • Completely refactored Auth system. It is now easier to configure and plug in your own implementations for external login services or your permissions system.
  • Brand new email library with support for multiple transports. With easy to use global configuration, logging, and charset support.
  • Dropped SimpleUnit in favor of PHPUnit. PHPUnit is the defacto testing framework for PHP with support for more options, better mock objects, and improved console output
  • Reworked the SecurityComponent to not suck less, now you can more easily protect your apps against CSRF and form tampering attacks while having fun.
  • Improved support for PostgreSql, SQLite and SqlServer, they are now first class citizens along with Mysql datasource.
  • HTML 5 form inputs support in form helper.
  • A Sexier default look taking advantage of new CSS 3 features.
  • A lot faster, almost everything is now lazy-loaded, and even on debug mode you will feel your applications flying.

You can download a packaged release of PHP here.

Go to the official announcement for more details and component links.

Power realtime chat, IoT and messaging apps at scale. Pubsub realtime messaging, functions, chat, presence, push, notifications, blocks catalog and more.


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}