3 ms·
I don't know if this will help since I suspect you know way more than you're letting on, but I usually find myself framing the definition of a "micro framework"
by Zancarius 11y ago
I don't know if this will help since I suspect you know way more than you're letting on, but I usually find myself framing the definition of a "micro framework" in terms of those I'm most familiar, chiefly Flask. It should have enough "batteries included" to be immediately useful, but small enough that you can keep most/all of the framework's API in your head at any given time.
Then again, I sometimes wonder myself if the definition blurs over the age and maturity of the project. If you look at Flask's ecosystem, there are extensions for nearly everything, making it so that ecosystem as a whole does just as much as a full-featured framework, but you have greater choice as to what components to include (and there's not One True Way to do anything in particular--there's just extensions that are more well-supported than others, well-maintained, and more popular).
I suppose this means that the better analogue is that micro frameworks give you greater control over lower level aspects and make fewer decisions for you (e.g. Django more or less expects you to do things Django's way; Flask has fewer such expectations). Given some of the micro frameworks I've seen, though, I think it's a definite spectrum, not an absolute, and probably depends just as much on the ecosystem and culture surrounding the language as it does on the intent of the creators. Silex (the PHP framework) does very few things, for instance, but it seems that you ought to include healthy chunks of Symfony if you really want it to be usable.
That said, I did stumble across something called "sinetja" [1] which I'd bill as an absolute micro-framework in Java in that it provides a fairly bare bones RESTful router/API and not much else. Think of it as another data point on the spectrum of micro-frameworks but much closer toward the bring-your-own-everything-else half.
So, if you want to roll your own bits to interface with 3rd party libraries or handle common tasks, use a micro-framework. If you want these decisions made for you, don't!
[1] https://github.com/sinetja/sinetja https://github.com/sinetja/sinetja
- erikb 11y agoI can agree with that. A framework that does little on its own with a lot of things to plug in. That would make sense. But the explanation in the article got a little confusing with the first tool doing nearly everything and leaving a big footprint.