Project Summary
Smarty BakeIntroductionSmarty Bake is an modification of the standard code generator enclosed in CakePHP. It uses templates of Smarty Template Engine to customize the generated screens adjusting the layout and design to the project. CakePHP is a rapid development framework for PHP that provides an extensible architecture for developing, maintaining, and deploying applications. Using commonly known design patterns like MVC and ORM within the convention over configuration paradigm, CakePHP reduces development costs and helps developers write less code.
The CakePHP was inspired in RoR and as well as the Rails possesss utilitarian for generation of code called Bake. The Bake automatizes the creation of the Model, View and Controller bringing agility to the development process. To put all the code generated for the Bake is static and is fixed in the archive bake.php. To customize the code generated for the Bake bake.php is necessary to edit the archive and to modify Strings of code that is mixed the implementation of the Bake.
The Smarty Bake brings the agility of the Bake with the easiness of the Smarty in generating templates. With the Smarty Bake you can customize the code generated for the Bake.
Install and RunBefore installing the Smarty Bake you must have the CakePHP 1.1.X installed (not work in beta version 1.2). The Smarty Bake must be installed in the folder cake. The folder cake can be inside of the folder root of the server web or together with the folders app and vendors of a site.
To install the Smarty Bake you can opt to archive ZIP or the installation for available Windows for download in Google Projects. The structure of directories of the Smarty Baker is:
It sees that the archives and folders are copied for the folder script of cake. Inside of the folder script you also find the archive sbake.bat and sbake.php the archive sbake.bat is used to call the Smarty Bake.
So that it functions of correct form creates a called 0 variable of system SBAKE_PATH and to indicate the way where this the archive sbake.php. This exactly way must be added to the PATH of the system. It is necessary also that php.exe is in the PATH of the system. Now you can execute the command bake.bat to generate the code.
Video that it shows as to install and to use the Smarty Bake
TemplatesThe Smarty Bake comes with 2 templates:
Standard - This template is one copies of the form as the Bake (original) generates the Views. The difference is that you can modify any generated code HTML. These template can be found and be modified in the folder {CAKE_FOLDER}\scripts\smart_templates.default jQuery - This template was created using component and resources of the Framework jQuery. This template can be found in the folder {CAKE_FOLDER}\scripts\smart_templates.jquery
To define which template will be used edits the archive {CAKE_FOLDER}\sbake.conf.php and modifies parameter SMART_TEMPLATE_USE. For standard the Smrty Bake uses template of jQuery. To use tempate of jQuery it is necessary to create a structure standard with some different archives for that is necessary also configuring parameter SKEL_USE to define which model will be used to create the directory standard of an application.
Parameter HELPERS defines helpers using by Controllers