Intro to DooPHP
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

Intro to DooPHP

  • 24,761 views
Uploaded on

DooPHP slides for PHP Meetup 2011 Malaysia: Framework Shootout...

DooPHP slides for PHP Meetup 2011 Malaysia: Framework Shootout

for android version, visit http://doophp.com/files/intro-to-doophp.apk

special thanks to php.net.my

More 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

Views

Total Views
24,761
On Slideshare
12,032
From Embeds
12,729
Number of Embeds
25

Actions

Shares
Downloads
313
Comments
3
Likes
6

Embeds 12,729

http://doophp.com 5,910
http://www.doophp.com 3,119
http://learn.doophp.com 2,165
http://localhost 877
http://www.jpvisualizations.com 489
http://phpcoe.mimos.my 74
http://static.slidesharecdn.com 29
http://feeds2.feedburner.com 19
http://webcache.googleusercontent.com 10
http://translate.googleusercontent.com 7
http://doophp2.rssing.com 5
http://fanyi.youdao.com 4
http://blog.dariob.com 4
http://www.techgig.com 3
http://rss.fotolapa.lv 2
http://theoldreader.com 2
http://www.directrss.co.il 2
http://www.verious.com 1
http://www.docseek.net 1
http://popit.plexonic.com 1
http://doo 1
http://reader.youdao.com 1
http://a0.twimg.com 1
http://www.ofelio.com 1
http://cache.baidu.com 1

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 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) http://www.doophp.com/benchmark
  • 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 http://doophp.com/download
  • 11. How to get started with DooPHPsvn checkout http://doophp.googlecode.com/svn/trunk/ doophp
  • 12. Read the guide, api doc & blog http://doophp.com/docVisit 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. http://twitty.com.my/leng 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. http://twitty.com.my/lengDoo 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 http://twitter.com/doophp leng@doophp.com
  • 58. Just Doo IT!