CakePHP: An Introduction

download CakePHP: An Introduction

of 28

  • date post

  • Category


  • view

  • download


Embed Size (px)

Transcript of CakePHP: An Introduction

  • 1.CakePHP: An Introduction Diana Jayne Gonzales Wingcast Inc.

2. What is CakePHP? 3. Framework Avoids re-inventing the wheel 4. Cake is for you if you want to... do more things in less time use a framework like ROR stop creating the same codes over and over again templating searchable URLs use MVC use a framework that is suitable for all types of apps 5. What Cake will do for you? eases creation of standard content management functionality (adding, editing and deleting) uses template-like Layouts and Views to separate logic from presentation validates form fields automatically escapes data saved to the database (to prevent SQL injection attacks) includes callbacks (eg. do an action before or after save) allows for both test and production databases 6. Features 7. PHP4 and 5 compatible 8. Multiple DBs 9. ORM - Object Record Mapper DB Objects 10. Validation 11. Caching 12. AJAX 13. Auth Module - Access Lists 14. Huge Code Base of Components and Plugins 15. Resources Taking A Look on 10 Different Frameworks (http://www.phpit. net/article/ten-different-php-frameworks/) Cook Up Websites Fast with CakePHP (http://www.scribd. com/doc/5503/ CakePHP-tutorial-no-1-from-IBM) The CakePHP Framework: Your First Bite (http://www. application-development-cakephp) CakePHP for Beginners: Tutorials ( uk/cake/tutorials/) CakePHP Manual ( 16. Directory Structure app/ config/ controllers/ models/ plugins/ tmp/ vendors/ views/ webroot/ cake/ config/ docs/ libs/ vendors/ 17. Installing CakePHP 18. Get 19. Unzip to /var/www/ 20. Rename folder to 'cake' 21. define('ROOT', BASE_DIR.'/path_to_cake_ins tall'); define ('APP_DIR', 'app'); define ('WEBROOT_DIR', '/public_html'); to app/webroot/index. php 22. Set up mod_rewrite 23. Setup database on config/database.php 24. Scaffolding analyzes your database tables creates standard lists with add, delete and edit buttons standard forms for editing and standard views for inspecting a single item in the database 25. Exercise: Scaffolding a Bookmarks Manager automated way of generating a view based on the model 26. Exercise: Login 27. Exercise: AJAX Task List