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
27. What to automate?
Auto routing
no more defining in routes.conf.php
Auto view rendering
no need to specify a view to be rendered
28. Let’s do some tweaks
Auto routing
1. Remove the routes definition in routes.conf.php
2. Set AUTOROUTE to true in common.conf.php
Auto view rendering
1. Remove $this->renderc() in controller
2. Set $autorender property to true in controller
29. Remove the routes definition in routes.conf.php
Set AUTOROUTE to true in common.conf.php
32. 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!
33. 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...
42. Another use case for autoroute_alias
When you are using auto routing and want a URL structure
which is deeper than the typical
http://domain/controller/method