I remember seeing an article or talk or something by one of the main Symfony guys on the fact that PHP was wanting, as a community, to move away from monolithic frameworks in favour of smaller, front controller style implementations. I was actually tring to find it the other day - does anyone have a link?
It's interesting to see the growing trend in this direction for PHP.
I wrote one a little while back[1] that does even less than this :) The only goal being to provide a simple way to execute classes from the web or command line with a default autoloading implementation and a way to inject new ones[2]
Personally a lot of my current direction in PHP comes from watching what's happening the node.js community - I like the way that there are a lot of small-ish packages/modules that are pretty independent.
I've written a couple of packages for RocketSled already which you can see on my github page if you're interested.
I don't know about the article. But the truth is that Symfony2 is built from a collection of independent components. And each component could be used independently in your app without a need to use symfony framework.
Here is for example a link for a routing component: https://github.com/symfony/Routing
The Zend Framework is the same. You can use each component completely separately. I know a few people who have used the Zend Controller classes and Zend Router in their own frameworks.
It's an encouraging trend. One of the things I like from the Java ecosystem is that there are a couple of really nice general-purpose frameworks that can be mixed and matched with other, more specific frameworks. Like Spring + Hibernate + JSF. I never liked the idea of a big, monolithic framework pretty much forcing its way of working on me. I'm very happy to see the PHP community moving in this direction!
I like the idea of that for command line, its a wicked project. Seems a bit painful for web use though - I moved away from mapping routes to controllers automatically in favour of specifying them manually, I feel that it gives great control and leads to less magic. Not knocking your project, though! Good stuff
Actually it doesn't even do that! It does so little - that r= argument just has to be a class that is autoloadable and implements the Runnable interface.
In fact, if you want routes you'd have to build it as a package and in FACT you could just create a class like this:
It's interesting to see the growing trend in this direction for PHP.
I wrote one a little while back[1] that does even less than this :) The only goal being to provide a simple way to execute classes from the web or command line with a default autoloading implementation and a way to inject new ones[2]
Personally a lot of my current direction in PHP comes from watching what's happening the node.js community - I like the way that there are a lot of small-ish packages/modules that are pretty independent.
I've written a couple of packages for RocketSled already which you can see on my github page if you're interested.
[1] https://github.com/iaindooley/RocketSled
[2] There are some obvious improvements that could be made to the current implementation which always parses the package tree ie. caching