6 ms·
I'd really like to figure out the best way to communicate what things like sinatra are compared to stuff like rails, django, spring etc. Is it a mini-framework
by spooneybarger 16y ago
I'd really like to figure out the best way to communicate what things like sinatra are compared to stuff like rails, django, spring etc.
Is it a mini-framework? un-framework? lightweight framework?
Please folks, give me some good ideas for the best quick term to capture what sintra and its ilk are.
By its ilk, I mean 'frameworks' that really do 1 or 2 things for you, do them well ( like routing ) and get out of your way. Others I've used that fit into the same idea... compojure & seaside...
So please, terminology suggestions?
- skymt 16y agoA couple similar frameworks -- Flask [1] and Tir [2] -- use the term microframework or micro-framework. [1] http://flask.pocoo.org/ http://flask.pocoo.org/ [2] http://sheddingbikes.com/posts/1289384533.html http://sheddingbikes.com/posts/1289384533.html
- generalk 16y agoI like microframework or lightweight framework. Both communicate that the framework isn't a full-stack, Django/Rails-type affair, and neither is particularly charged. Nobody's going to get into an architecture argument about scaling or ease-of-use using those terms.
- draegtun 16y agoIt was with Camping (http://camping.rubyforge.org/ http://camping.rubyforge.org/) that i first came across the term "web microframework" and its probable that all subsequent usage stems from this? However I believe the emphasis of microframework that Camping was trying to put across was more on its code size which came in at or under 4K [1]. So perhaps frameworks which also accomplish a small code footprint, for eg. Squatting (http://search.cpan.org/dist/Squatting/ http://search.cpan.org/dist/Squatting/), are best called microframeworks [2] However happy to use microframework for Sinatra, Dancer, Flask, etc in lieu for something better? (nepenthe suggestion in the comments of "convenience framework" seems good to me - http://news.ycombinator.com/item?id=2286376 http://news.ycombinator.com/item?id=2286376). [1] https://github.com/camping/camping/blob/master/lib/camping.rb https://github.com/camping/camping/blob/master/lib/camping.r... [2] https://github.com/beppu/squatting/blob/master/lib/squatting.pl https://github.com/beppu/squatting/blob/master/lib/squatting...
- nepenthe2 16y agoI refer to them as "convenience frameworks" as they usually provide what I need most often such as very basic routing, auth(thentication/orization),sessions, templates and maybe an ORM but also easily allow me to plug in something else. I tend to stay away from the "heavy" frameworks such as Rails and Catalyst and Django. Those might be called "full stack" frameworks. I consider something like Perl's Dancer and Python's Flask(based out of Werkzeug) as very similar frameworks to Sinatra.
- spooneybarger 16y agoI'm rather interested here... once you have routing, auth, sessions, templates and an orm... how is that not heavy? we are talking terminology here so i'm really interested in when you consider the line for 'heavy' gets crossed? for me what you describe above would be heavy in my mind. as i'm trying to come up w/ terminology that will convey my general idea to the widest range of people possible and yours is so far the farthest afield from what i was thinking of, you have really peeked my interest.
- nepenthe2 16y agoBecause while all those "conveniences" are available you are not at the mercy of more opinionated frameworks like Rails. You are free to use them or add your own or use none. I don't have time to do simple request/response building although if I did Python's Paste/Webob would be my choice so I choose frameworks that I can add in the usual "extra" requirements that I do need. This blog post is a couple of years old but sheds some light on the abundance of frameworks in the Python world at least. The closing section sums up the difference between full stack frameworks and lighter frameworks. http://bitworking.org/news/Why_so_many_Python_web_frameworks http://bitworking.org/news/Why_so_many_Python_web_frameworks Another term I've seen around is "utility library" instead of framework. Perhaps that is better?
- spooneybarger 16y agoAh yes, that makes perfect sense- when I read and, I read it as all inclusive rather than pick and choose.
- smhinsey 16y agoI like to use anti-framework or un-opinionated framework. I think the key point of contrast is stuff like Sinatra gives you a way to build applications that doesn't really have much to say about how the app is structured once you get past the basic necessities of an HTTP-based app, whereas something like Rails guides your architecture much more rigidly.
- spooneybarger 16y agodo you think you would use un-opinionated were rails not known as an 'opinionated' framework? as rails used that term to set itself off against things like spring, have you found un-opinionated to be ever cause confusion?
- smhinsey 16y agoThat's a good question. I definitely recognize the dilemma it creates, but I think it also sets up a nice potential conversation along the lines of "opinionated compared to what?" Which can lead to what is meant by 'opinionated' in the first place, which, under the right circumstances, can be a really valuable conversation to have, especially if your team isn't on the same page with why you would want something like Sinatra vs Rails or anything else. I've never found that it causes any problems, but since I have been primarily in the .NET world lately, it's pretty rare for people to be all that familiar with anything elsewhere, and if they are, they generally get what I am going for when I say it.
- relix 16y agoThis is exactly my problem. It took me a while to figure out just exactly what problem it solves. Their frontpage, while humorous, doesn't explain this very well at all. A line or two about what Sinatra does and some examples what to use it for would increase usability of the page enormously.