Tuesday 17 December 2013

Five Things that Every Beginner Should Know About CakePHP Framework


Image Courtesy: blog.koding.com

CakePHP framework is a quick build solution to PHP website development. As it follows MVC (Model View Controller) architecture, it has ability to divide development work in separate entities and hence supports the code re-usability feature. There are plenty of features that places CakePHP framework in a unique category, but in my research I find these five points that every beginner should know about CakePHP platform:

Easy to Create Admin Section
In CakePHP framework, you can easily create admin section that holds all rights in one entity by just uncomment “define(‘CAKE_ADMIN’,’admin’);” in config/core.php file.
That helps to access all processes prefixed with “admin_”, like “admin/controller/action”. You can also prevent unwanted user access through password protect your admin section.
 
Static Pages
It is easy to create and access static pages in CakePHP. Suppose you want to create a static page then just create a view inside the “views/page/folder”.  You can also access it through ‘/page’.
Also if you want to adjust the page title of static page using pages controller, add the given command “<? $this->pagetitle = ‘Page Title’; ?>” to view section.
 
Bake.php to Generate MVC
Bake is a command line php script that automatically produces a MVC on the basis of database design. It helps to save several times in repetitive tasks like making CRUD controller operation and views.
For using bake, you first crate a table in your database then convert’s directories to the “/cake/scripts/ folder” and run “php bake.php”.

Easy Email Sending Through PHP-Mailer
You can send mail either through JavaScript or PHP-mailer function. Which one is easy? The answer should be PHP-mailer because sending emails through PHP-mailer is very secure and it construct mail header by itself.
 
Many Options of Documentation
CakePHP has many documentation resources to learn and find solutions easily. Apart from manual, API and Wiki are two best sources of information. In these wiki tutorials and API, you can easily find all essential points to build a website in CakePHP.

No comments:

Post a Comment