CakePHP combines easy installation with command-line tools that jump-start development
CakePHP, a product of the Cake Foundation, successfully walks the line between large frameworks (such as Zend) and small frameworks (such as Lithium). CakePHP's documentation claims that the framework requires no configuration. The CakePHP website gushes, "Set up the database and let the magic begin." This is a bit colorful, but not too far from the truth. The framework also features excellent command-line tools that dramatically reduce the time required to build an application. The current stable release, Version 1.2.9, requires at least PHP 4.3.2.
As with other frameworks, CakePHP defines a strict directory structure, with equally strict rules regarding which files go in which subdirectory. This is referred to as "convention over configuration" and is in keeping with the framework's "no configuration" claims. You don't modify a configuration file to specify the location and function of files, classes, or methods; rather, you place specific elements in predetermined locations within the project. For example, all the library code is kept in the /cake subfolder of an application directory, and documentation expressly states that you must swear an oath not to modify the files in that directory. The directory structure also distinguishes between first-party libraries and third-party libraries, which helps you keep your corporate libraries separate from those acquired from the outside.
The convention over configuration principle carries through to framework entity names. Model classnames must be singular and camel-cased. For example, a model that manages music albums might be represented by a class named MusicAlbum. Table names corresponding to CakePHP models are plural and underscored, so our table for the MusicAlbum model would be music_albums. CakePHP even provides a utility library for pluralizing names to assist in the process.
This story, "Fabulous PHP frameworks: CakePHP" was originally published by InfoWorld.
PayPal has fixed a serious vulnerability in its back-end management system that could have allowed...
Rep. Darrell Issa has rolled out a bipartisan bill that would make two key changes to the 1998 H-1B...
Last week's Windows 10 update for beta testers is almost certainly the final code for this year's big...
Amazon is promoting a few minor tech deals today, but the big sales are still a few days away.
Qualcomm has agreed to pay US$19.5 million to settle a gender discrimination class action lawsuit that...
Where can I find Pikachu? More than one Pokémon Go map promises to help you find rare Pokémon—and they...
It’s still unclear if Russian hackers are trying to meddle with the U.S. election. But the growing...