The MicroPHP Manifesto
On almost every sentence of this post I found myself nodding and humming in agreement. The rousing finish rang loud and clear, especially with our approach to eddy.
One of the main things for me when I started eddy was to have a lean setup process. Nothing complicated, nothing that required more than 2 or 3 lines of code or opening/creating multiple files. I wanted to be able to create a new project and see it work very quickly.
That’s why, when you build an app on eddy, your public/index.php file only has two lines in it.
Another thing is to have a useful but lean starting point. But I still wanted the MVC separation of code. I like the look of Sinatra-esque frameworks, but I wonder how manageable they are in the long-term…
Still there’s no need for all of these complex libraries of functionality I may never use in my application - and choosing whether I should load them at startup vs $this->load or require_once everywhere is just a recipe for disaster.
So eddy employs namespace-based autoloading (based on this). But you can still load classes that you know will be used early on (for caching) by include’ing them in your config.php file for example.
I can’t speak about overall size and lines of code or any comparative performance benchmarks as yet because I haven’t done any of that analysis.
It’s not full-stack, it’s not perfect, but it works the way my mind works and that helps me to work faster. Who said “write less, do more”?
Tweet
Recent comments