5 ms·
Ligament.js, the smallest, lightest-weight JS MVC Framework
- mschonfeld 15y agoGotta appreciate some sense of humor.. Even when it comes in the expense of other coders ;)
- kreek 15y agoNow that's a micro-framework :P In all seriousness a recent JS project of mine uses http://www.traitsjs.org/ http://www.traitsjs.org/ to create a lightweight (in implementation not file size) framework. Traits.js allows you to use Object.create with older browsers as well.
- gentle 15y agoI wish it were a little more streamlined.
- rileywatkins 15y agoSee romanvbabenko's fork: https://gist.github.com/3136dbab372c54258973 https://gist.github.com/3136dbab372c54258973
- LiveTheDream 15y agoIt's buggy.
- singingwolfboy 15y agoIt may not provide MVC support out of the box, but I still think Vapor.js is the best light-weight JS library for general purpose use. vaporjs.com
- nirvana 15y agoOk, I found this to actually be pretty useful. In reading the comments it cleared up a spot where my understanding of javascript was a bit weak. More seriously, though, there seems to be a new javascript framework every day... and at some point I'm going to need to pick one for the project I'm working on. Its hard to tell which ones are appropriate for servers, vs clients, etc. I wonder if anyone has made a directory of javascript frameworks? I'm not looking forward to the task of going thru all the ones I've bookmarked over the past few months and trying to decide which are most appropriate, and which overlap each other, vs. which provide separate functionality that could be used together.
- ZeroMinx 15y agoIgnoring this "joke"; If you're looking for a light-weight MVC framework, try Backbone.js. It's rather nice.
- spamizbad 15y agoI've never used it, but Backbone has a router which struck me as being completely out of place. In practice is it actually a good idea?
- torme 15y agoFor rich client apps, having a router is useful in my experience. I've not used backbone however. What makes you think it seems out of place?
- kennystone 15y agoRouter is integral for doing RESTful right.
- jrockway 15y agoBackbone may be lightweight, but that's only because it's a "framework" for exactly what the authors happened to be doing at the time. If you don't have a collection of objects as a JSON document at /some-url and each object available at /some-url/id, then Backbone does approximately nothing. A simple reimplementation without http support looks something like: Model.prototype.set = function(key, value){ this[key] = value; for(v in views){ v.refresh() } } View.prototype.set_model = function(model){ model.views.push(this) } thing = new Model(); view = new ViewSubclass(); view.set_model(thing); thing.set('foo', 'bar'); # WOWZA THE VIEW UPDATES!!!11!!!
- hendler 15y agoWhile I decided not to use backbone, there is a need for a more structured encapsulation and abstraction of functionality. For example, if the architecture you'd like to build only serves JSON and HTML templates, and javascript renders the rest, you save a lot on bandwith and cpu. The html is cached in the browser, the server only needs to produce JSON. Add a JSON based, restful DB, and you have an architecture that really fits what the web is becoming. The JSON layer is perfectly suited for being the API layer other clients as well - otherwise you might have a lot of crufty code on the server that has to be cleaned up for use by any other client (e.g. native iPhone). BTW - I believe the author of ligament also contributes to http://www.sproutcore.com/ http://www.sproutcore.com/ and jQuery
- baddox 15y agoWow, this framework has 48 times more lines of comments than lines of code.
- glenjamin 15y agoOr just use the 'new' operator and support every JavaScript implementation - rather than just the Object.create supporting ones.
- wycats 15y agoBut the word function is so many bytes...
- skeptical 15y agoI never used those javascript frameworks that appear to be all over the place, so I'm not sure I get the humor... the joke is that they are to some extent unnecessary and introduce bloat. Ok, that was simply assumed, I would like to see some more sophisticated humor. Creating three empty objects feels like a joke that can be thrown at anything. Just my opinion.
- stratospark 15y agoWe need a Todo example project to make this legit: https://github.com/addyosmani/todomvc/tree/master/todo-example https://github.com/addyosmani/todomvc/tree/master/todo-examp...
- swah 15y agoI suggest new-js-frameworks/second as a new speed unit.