Your SlideShare is downloading. ×
  • Like
Intro to DooPHP
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.


Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Intro to DooPHP


DooPHP slides for PHP Meetup 2011 Malaysia: Framework Shootout …

DooPHP slides for PHP Meetup 2011 Malaysia: Framework Shootout

for android version, visit

special thanks to

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
  • Are you there, Mr. Leng Sheng Hong? Have you released a new version of DooPHP since 1.4.1? Kind regards.
    Are you sure you want to
    Your message goes here
  • its shown on slide 56. It is netbeans... :)
    Are you sure you want to
    Your message goes here
  • An interesting and easy to follow intro. Just a quick question, what IDE are you using? The screen shot on slide 22 looks lovely.
    Are you sure you want to
    Your message goes here
No Downloads


Total Views
On SlideShare
From Embeds
Number of Embeds



Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

    No notes for slide


  • 1. Who am I?Leng Sheng Hong• The author of DooPHP framework.• Had been a Malaysian for the last24 years (experienced)
  • 2. What is DooPHP?
  • 3. , how fast?Hmm
  • 4. Definitely faster than KTM
  • 5. Benchmark (needs an update)
  • 6. Hmm, so is it fastbecause there’s nofeatures?
  • 7. Features• Sophisticated URI routing • High Performance• RESTful out of the box • Database profiling tool• HMVC • i18n Internationalization• Authentication • Template engine• Authorization (ACL & RBAC) • PHP 5.3 Namespace support• Data caching • 100% E_STRICT compliant• Frontend caching • auto loading• Form generation & validation • Model class generation• Database ORM • CLI support• Database replication • new BSD license• Logging & Profiling tools • simple code & easy to extend
  • 8. Hmm,Why not CakePHP orZend Framework or Symfonyor CodeIgniter or Zoop orAkelos or Yii or PHP on Traxor Prado or Seagull?
  • 9. Because you have to chooseone, dammitPlus..
  • 10. How to get started with DooPHP
  • 11. How to get started with DooPHPsvn checkout doophp
  • 12. Read the guide, api doc & blog the forum if you have questions & suggestions
  • 13. Basic app structure
  • 14. Basic app structure
  • 15. With HMVC usage example module
  • 16. DooPHP MVC Flow
  • 17. How to start writing my app? 3 ways to write: • The manual way • The automated way • Hybrid
  • 18. The manual way
  • 19. Define routes
  • 20. Create Controller & Action method
  • 21. View rendering
  • 22. Output Result
  • 23. The automated way
  • 24. What to automate? Auto routing no more defining in routes.conf.php Auto view rendering no need to specify a view to be rendered
  • 25. Let’s do some tweaksAuto routing1. Remove the routes definition in routes.conf.php2. Set AUTOROUTE to true in common.conf.phpAuto view rendering1. Remove $this->renderc() in controller2. Set $autorender property to true in controller
  • 26. Remove the routes definition in routes.conf.phpSet AUTOROUTE to true in common.conf.php
  • 27. StoreController
  • 28. TaDa! Same output result
  • 29. What’s the difference?Manual way Gives you whole lot of manual controls, good news for ya’, control freaks! Auto way Save you all da’ tedious wok’! Good news for ya, lazy bump!
  • 30. Hybrid? When?When you’re using auto routing BUT You want some freaking awesome URLs (for SEO purpose, maybe) You want to redirect some non-existent URLs. You want URLs for your users. And some weirdo situation you would never thought of...
  • 31. Freaking awesome URL* You won’t be ranked number 1 in Google search that easily though
  • 32. Redirect some URLs
  • 33. URLs for your users. this in routes.conf.phpDoo this in UserController
  • 34. And for some weirdo situation youwould never thought of...
  • 35. I have a controller
  • 36. Client tends to mistype the URL‘transactions’ a lot. Now, hewanted to be able to accesspages via ‘transactions’ too *screw him
  • 37. How to do it?
  • 38. Easiest solution
  • 39. Another use case for autoroute_aliasWhen you are using auto routing and want a URL structurewhich is deeper than the typicalhttp://domain/controller/method
  • 40. Model & Database
  • 41. Configure db.conf.php
  • 42. Enable DB in index.php
  • 43. Database example
  • 44. Define table relationships (if needed)db.conf.php No naming convention required, works with any of your existing DBs.
  • 45. Generate Models
  • 46. Model usage example
  • 47. Querying
  • 48. Model usage example (extends DooModel)
  • 49. Some list of methods in DooModel
  • 50. What do you need other thanDooPHP ?
  • 51. You need to get a life.
  • 52. and Probably a good IDE.
  • 53. NetBeans
  • 54. Code hinting for DooPHP
  • 55. Awesome for quick reference
  • 56. Less is More. I should stop hereand let the Adventurers explore
  • 57. Questions? Don’t worry, I won’t eat you
  • 58. Just Doo IT!