Show HN: Ity – A miniscule, depedency free JavaScript MVC
1–10 of 12 posts
Re: Show HN: Ity – A miniscule, depedency free JavaScript MVC
#2- Tiny footprint for mobile networks (~5kb minified).
- Extremely fast DOM query/selection engine. No need for jQuery!
- Mobile first - no legacy hackery for ie - Great for spinning up small, mobile-specific apps.
To Do
- More useful event delegation. Currently, views must call _setElement() every time they render new DOM elements
-Currently no router for fancy SPA style urls
Installation
npm install ity
Re: Show HN: Ity – A miniscule, depedency free JavaScript MVC
#3What is the main advantage of this over Backbone?
Re: Show HN: Ity – A miniscule, depedency free JavaScript MVC
#4Re: Show HN: Ity – A miniscule, depedency free JavaScript MVC
#5This is really interesting. I guess the part that confuses me is using the "View" to do traditional controller-esque things. At least in the example, that is how it looked. Would you be able to explain that choice?
It's possible I'll add a more traditional 'controller' to the mix at some point, but I mostly wanted a similar structure to that of Backbone, without the need for jQuery/underscore.
Re: Show HN: Ity – A miniscule, depedency free JavaScript MVC
#6Neat project! However, in reality I'd probably just use Backbone if I wanted this kind of architecture because of the wealth of knowledge and support for it on the web. What is the main advantage of this over Backbone?
For most of my work, I'll also be sticking to Backbone or something more supported/fully-featured. But I do have tinsy projects here and there that are mobile-focused one-offs that work really well with something like this. I found myself recreating this thing over and over, so I figured I'd just standardize it for me and see if anyone else felt the same need. :)
Thanks for checking it out and for the feedback!
Re: Show HN: Ity – A miniscule, depedency free JavaScript MVC
#7Neat project! However, in reality I'd probably just use Backbone if I wanted this kind of architecture because of the wealth of knowledge and support for it on the web. What is the main advantage of this over Backbone?
Re: Show HN: Ity – A miniscule, depedency free JavaScript MVC
#8This is really interesting. I guess the part that confuses me is using the "View" to do traditional controller-esque things. At least in the example, that is how it looked. Would you be able to explain that choice?
Yeah, I think the example itself is not a great pattern. :) If I were to redo that example, or do another example completely, I'd probably move a lot of that logic stuff into the model. It's possible I'll add a more traditional 'controller' to the mix at some point, but I mostly wanted a similar structure to that of Backbone, without the need for jQuery/underscore.
For how small the library is, this is pretty fantastic though. Significantly smaller than Backbone for similar syntax.
Re: Show HN: Ity – A miniscule, depedency free JavaScript MVC
#9Re: Show HN: Ity – A miniscule, depedency free JavaScript MVC
#10Earlier quoted context omitted.
Yeah, I think the example itself is not a great pattern. :) If I were to redo that example, or do another example completely, I'd probably move a lot of that logic stuff into the model. It's possible I'll add a more traditional 'controller' to the mix at some point, but I mostly wanted a similar structure to that of Backbone, without the need for jQuery/underscore.
It's just odd for an MVC framework to not have a 'C'. Generally, your view would just generate HTML, the controller listens for events and responds to them by updating the view and model. Here, your view is taking over that responsibility. For how small the library is, this is pretty fantastic though. Significantly smaller than Backbone for similar syntax.
Thanks for checking it out! I'll put some thought into the 'C' aspect of this thing.