Hacker News new | past | comments | ask | show | jobs | submit login

Most of these MVC frameworks seem to add a lot of extra structure, which I don't like. Compare e.g. Backbone (https://github.com/addyosmani/todomvc/tree/gh-pages/architec...) or AngularJs (https://github.com/addyosmani/todomvc/tree/gh-pages/architec...) implementations to the simple jQuery implementation (https://github.com/addyosmani/todomvc/tree/gh-pages/architec...).

Are there any good JS libraries that take more Unix-like approach, i.e. they do one thing and they do it well? For example a library that would implement just the Model part: syncing data between server and client. Or another one that would implement for example a better abstractions for event handling (event-firing states, futures, etc.), but nothing more.




I think the problem is mostly that a todo list is too simple an example for these frameworks and that's why it seems like they're just adding extra structure. That extra structure is (hopefully) going to save you a lot of code once your app gets more complex.


I made a MVC library called Stapes that hopefully fills in this space:

http://hay.github.com/stapes/

It's on TodoMVC as well in the labs section:

http://todomvc.com/labs/architecture-examples/stapes/

About 500 LOC, only the important parts you need in a MVC library (a flexible event system and models with change events), nothing else.

Have a look and tell me what you think :)


It's all well and good to keep it simple if the extent of your app is actually a Todo list, but most of these frameworks are built to render an entire website worth of content on the client, including a router, controller, models, views, etc. That necessarily can make them a little more verbose for these simple examples, but invaluable in giving structure to complex apps.


My company uses Spine for pretty much exactly that reason.

http://spinejs.com/

It's written by Alex McCaw, it's fantastic, and it even has a set of (again, modular) pieces to help develop mobile compatible interfaces.



Backbone does that , you can just use one part of backbone without the rest. want are router ? use the Router , want models? use the Model object ,want just sync ? use the Sync ect... backbone is not a MVC framework it is a collection of tools. Backbone doesnt force you into anything. That's why there are no controllers in Backbone ( Routers are not , routers are mediators ).




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: