Open lwc opened 12 years ago
+1
+1 + ++1 + ++1
On Tue, Aug 21, 2012 at 9:46 AM, Stuart Campbell notifications@github.comwrote:
+1
— Reply to this email directly or view it on GitHubhttps://github.com/99designs/ergo/issues/8#issuecomment-7887417.
:shipit:
Yep, completely agree.
The Ergo core should be fairly limited in scope in my opinion. This suits my taste of making little libraries that do one thing well. :-)
What are the components of Ergo?
It was designed to be the bare minimum for the MV part of an MVC app. There should be Routing, Controllers, Views and enough wiring for a simple application abstraction.
IMO, we should be trying to integrate the Symfony2 kernel in Ergo's place, they are rapidly becoming the defacto standards:
http://silex.sensiolabs.org/doc/usage.html
If I were to gut Ergo, I'd just rip out everything but it's containers and basic wiring. It would be truer to the name.
Fully agree @lox
The dependency injection model of Silex/Symfony is an incredibly clean and flexible way of building a framework, and has many similarities to Python's Pyramid.
Why?
Currently ergo is a somewhat monolithic library that provides a large portion of function for building a web application. To this end it does a pretty good job, and we use it to great effect.
Unfortunately, due to its design, it is impossible to re-use or depend on components of the library, without including the entire library. This is undesirable, and does not promote code re-use.
For example, when writing a client library for an API, it would be useful to depend on
ergo/http
How?
Restructure ergo into a series of sub-libraries that are then composed into the greater meta-library ergo, something like:
classes/Ergo
would move becomeergo/common
composer.json
files to subfolders inclasses/Ergo
composer.json
to require each sub-libraryOutcome
It would be possible to build libraries that only require the specific parts of ergo needed This could: