3 ms·
10 years ago I wrote my first web application. I was hooked. The ability able to write an app that ran anywhere in the world was magical. My journey since ha
by KrisJordan 18y ago
10 years ago I wrote my first web application. I was hooked. The ability able to write an app that ran anywhere in the world was magical. My journey since has led me to PHP4 and the LAMP stack, away to C++ and Java and back to PHP5, away to C#, Scheme, and Python, and again back to PHP5.
The truth is I have a love-hate relationship with PHP. The linguist in me abhors PHP sprawl and the pragmatist in me adores PHP’s simple execution model and practical ubiquity.
Upon returning to PHP this September it felt both familiar and unsettling. The feeling of returning to the town you grew up in. Frameworks, like familiar faces, looked the same as when you last saw them just heavier and a bit more mature. Nowhere as spectacular as the framework heroes of other towns like of Pythonville or Rubyfordton. City council was still making unorthodox decisions like enforcing backslashes for namespaces. Yet downtown was booming- many of the greatest internet successes of the world had since established themselves here: Facebook, Flickr, Yahoo!, and others.
So I set out to create an open source framework called "Recess!" which will be available on GitHub in preview form "any day now".
I just recorded its first screencast that dives into how it Recess! handles routing. Interested to hear your thoughts:
http://www.recessframework.com/screencasts/routing/index.html http://www.recessframework.com/screencasts/routing/index.htm...
(disclaimer: the flash video may be slow to load - until which you'll see an empty black page)
- k4st 18y agoController route prefixing seems suspicious. Do you include every controller at runtime and use php reflection with some regular expressions to parse all of their prefixes only to figure out what single route to use?
- KrisJordan 18y agoIn development mode, yes. We look at every controller and form a routing tree. In deployment mode that routing tree is serialized and cached. Only a single (matching) controller is then touched. Unserializing the data structure is extremely fast and finding a match is roughly an O(log n) operation.