The model construction process has been made lighter. Model associations are
now lazy loaded, applications with lots of models and associations will see
great time reductions in the bootstrap process.

Now models won’t require a database connection in the construction process.
The database will be accessed for the first time only when a find operation is
issued or information for one of the columns is required.

View will now always have the last rendered content (view or layout) accessible
through $this->output. In helpers you can use $this->_View->output. Modifying
this property will change the content that comes out of the view rendering.

loadConfig() has moved from Helper to HtmlHelper
class. This method now uses the new reader classes (see 2.0 Configure)
to load your config file. As an option you can pass the path as second parameter
(app/Config is default). To simplify, you can set the configuration file
(and the reader) in Controller::$helpers (example below) to load on helper
constructor. In configuration file you can set the below keys:

tags Should be an array with key value;

minimizedAttributes Should be a list;

docTypes Should be an array with key value;

attributeFormat Should be a string;

minimizedAttributeFormat Should be a string.

Example of how to set configuration file on controller:

public$helpers=array('Html'=>array(// Option one: an array with filename and reader name'configFile'=>array('config_file','php')// Option two: a string with filename. The PhpReader will be used'configFile'=>'config_file'));

CakeResponse is a new class introduced in 2.0. It encapsulates
commonly used methods and properties in the HTTP response your application
generates. It consolidates several features in CakePHP. Read more about
CakeResponse.

Route objects can now return full URLs, and Router will not further
modify them beyond adding the query string and fragment elements. For example
this could be used to create routes to handle subdomains, or enabling https/http
flags. An example of a route class that supports subdomains would be:

If a client sends a single Accept mime type that matches one of the extensions
enabled in :php:class`Router`, RequestHandler will treat it the
same an extension. This expands CakePHP’s support for REST style endpoints. To
use this feature start off by enabling extensions in app/Config/routes.php:

Router::parseExtensions('json','xml');

Once you have created layouts and views for your extensions, you will be able to
visit a url like posts/view/1 and send Accept: application/json in the
headers to receive the JSON version of that URL.

CakePHP has had CSRF protection since 1.2. For 2.0 the existing CSRF has a new
more paranoid mode, and is its own standalone feature. In the past CSRF features
were coupled with form tampering safe-guards. Developers often disabled
validatePost in order to do dynamic forms, disabling the CSRF protection at the
same time. For 2.0 CSRF checking has been separated from form tampering giving
you greater control.

You can now alias helpers, components and behaviors to use your class instead of
a different one. This means that you can very easily make a MyHtml helper
and not need to replace every instance of $this->Html in your views. To do
this, pass the ‘className’ key along with your class, like you would with
models:

public$helpers=array('Html'=>array('className'=>'MyHtml'));

Similarly, you can alias components for use in your controllers:

public$components=array('Email'=>array('className'=>'QueueEmailer'));

Calls to the Email component would call the QueueEmailer component instead.
Finally, you can alias behaviors as well:

Because of the way 2.0 utilizes collections and shares them across the
application, any classes you alias will be used throughout your application.
Whenever your application tries to access the alias, it will access your class.
For instance, when we aliased the Html helper in the example above, any helpers
that use the Html helper or elements that load the Html helper, will use MyHtml
instead.