Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Baking with CakePHP<br /><ul><li> a practical overview by</li></ul>Valberg Lárusson<br />
MyRecipes-Online.com<br />
What is CakePHP?<br />A framework for building <br />PHP websites and applications.<br />
What does that mean?<br />Its a bunch of PHP code which provides commonly used functionality so you don’t have to create i...
How does CakePHP do that?<br />Library like reusable code<br />Convention over configuration<br />MVC for structure<br />O...
How do I use it?<br />Download the code<br />Extract to your project folder<br />Create your<br />Database table<br />Mode...
MVC<br />Model, database mapping<br />View, what the user sees<br />Controller, the business logic<br />http://book.cakeph...
ORM<br />Cake PHP uses an Ruby on Rails like Active Record system to map models to objects<br />Not Cake’s strongest featu...
The 15 minute Blog<br />Install CakePHP<br />Create the Database<br />Create the Model <br />Create the Controller<br />Cr...
URL’s and SEO<br />Cake uses mod_rewrite to provide readable URL’s<br />www.domain.com/controller/action/param1<br />This ...
Routing<br />Routing is a feature that maps URLs to controller actions. <br />You can use Route configurations to define h...
Components<br />Access Control Lists (Acl)<br />Authentication<br />Cookies<br />Email<br />Request Handling<br />(getClie...
Behaviours<br />Acl<br />integrate a model with your ACL system<br />Containable<br />Improvement on recursive finds<br />...
Helpers<br />Ajax<br />Cache<br />Form<br />Html<br />Javascript<br />Number<br /><ul><li>Paginator
RSS
Session
Text
Time
XML</li></li></ul><li>Utility Libraries<br /><ul><li>Security methods
Hashing, encrypting
Cache
HttpSocket
To fetch content </li></ul>Inflector<br />Slug, pluralize, tableize<br />String methods<br />uuid, insert<br />XML parsing...
Upcoming SlideShare
Loading in …5
×

Baking With Cake Php

6,763 views

Published on

A hands on introduction to CakePHP presented at the August 2009 PHPmelb meetup.

Published in: Technology, Self Improvement
  • Be the first to comment

Baking With Cake Php

  1. 1. Baking with CakePHP<br /><ul><li> a practical overview by</li></ul>Valberg Lárusson<br />
  2. 2. MyRecipes-Online.com<br />
  3. 3. What is CakePHP?<br />A framework for building <br />PHP websites and applications.<br />
  4. 4. What does that mean?<br />Its a bunch of PHP code which provides commonly used functionality so you don’t have to create it your self.<br />
  5. 5. How does CakePHP do that?<br />Library like reusable code<br />Convention over configuration<br />MVC for structure<br />ORM(ish) for database mapping<br />
  6. 6. How do I use it?<br />Download the code<br />Extract to your project folder<br />Create your<br />Database table<br />Model<br />Controller<br />View<br />(or just get started with CRUD scaffolding)<br />
  7. 7. MVC<br />Model, database mapping<br />View, what the user sees<br />Controller, the business logic<br />http://book.cakephp.org/view/10/Understanding-Model-View-Controller &gt;&gt;<br />
  8. 8. ORM<br />Cake PHP uses an Ruby on Rails like Active Record system to map models to objects<br />Not Cake’s strongest feature but pretty good<br />http://en.wikipedia.org/wiki/Object-relational_mapping &gt;&gt;<br />
  9. 9. The 15 minute Blog<br />Install CakePHP<br />Create the Database<br />Create the Model <br />Create the Controller<br />Create Views<br />&gt;&gt;<br />
  10. 10. URL’s and SEO<br />Cake uses mod_rewrite to provide readable URL’s<br />www.domain.com/controller/action/param1<br />This is controlled via .htacess files<br />Can be turned off if .htacess is not read<br />
  11. 11. Routing<br />Routing is a feature that maps URLs to controller actions. <br />You can use Route configurations to define how your website maps your web addresses<br />Example<br />Router::connect(&apos;/admin&apos;, array(&apos;controller&apos; =&gt; &apos;pages&apos;, &apos;action&apos; =&gt; &apos;index&apos;, &apos;admin&apos; =&gt; true));<br />Maps http://website.com/admin to the admin_index action in the pages controller<br />
  12. 12. Components<br />Access Control Lists (Acl)<br />Authentication<br />Cookies<br />Email<br />Request Handling<br />(getClientIP(), getReferrer(), isMobile())<br />Security Component<br />Sessions<br />A wrapper for $_SESSION + added methods<br />
  13. 13. Behaviours<br />Acl<br />integrate a model with your ACL system<br />Containable<br />Improvement on recursive finds<br />Translate<br />Table contains translations and the language is set in either the Model or Controller<br />Tree<br />Assists in maintaining the structure of the site<br />
  14. 14. Helpers<br />Ajax<br />Cache<br />Form<br />Html<br />Javascript<br />Number<br /><ul><li>Paginator
  15. 15. RSS
  16. 16. Session
  17. 17. Text
  18. 18. Time
  19. 19. XML</li></li></ul><li>Utility Libraries<br /><ul><li>Security methods
  20. 20. Hashing, encrypting
  21. 21. Cache
  22. 22. HttpSocket
  23. 23. To fetch content </li></ul>Inflector<br />Slug, pluralize, tableize<br />String methods<br />uuid, insert<br />XML parsing<br />Set<br />Array management<br />
  24. 24. Console Applications<br />Code generation<br />Schema management and migrations<br />
  25. 25. Testing<br />CakePHP integrates SimpleTest<br />Unit testing and Web testing<br />Test-driven development<br />
  26. 26. A few Cake PHP websites<br />
  27. 27. More websites<br />
  28. 28. More websites<br />
  29. 29. More websites<br />
  30. 30. The big questions<br />Performance<br />Speed<br />Load tolerance<br />Security<br />Stability and uptime<br />
  31. 31. Room for improvements?<br />Debugging tools<br />Documentation is reasonable<br />Integrated version control<br />Commercial support for enterprise deployment<br />&gt;&gt;<br />

×