3 ms·
Having tried nearly all the JS frameworks, I really like KnockoutJS. There are a few bits missing from it, but for someone like me who doesn't want a 1 page app
by monk_e_boy 12y ago
Having tried nearly all the JS frameworks, I really like KnockoutJS. There are a few bits missing from it, but for someone like me who doesn't want a 1 page app knockout fits into a many page website really well. You can enhance pages as you go. Add a few nice GUI bits, some ajax to load and save... knockout makes it all very lovely.
But all the frameworks, the view syntax/binding gubbins is horrid. Hard to debug, easy to make syntax errors. Bleugh :(
- pygy_ 12y agoHave you tried Mithril? The views are defined in JS, eschewing the "syntax/binding gubbins" you appear to dislike. http://lhorie.github.io/mithril/ http://lhorie.github.io/mithril/
- hardwaresofton 12y agoAbsolutely agree. Every time I start a new project, I start with knockout, then realize I need more of the bits, and then migrate to something else with more "built-in". On an app I'm currently developing, I've actually adopted the pattern of using knockout with some other libraries (directory, for routing, mainly) and actually have found relative success. One thing I have been tossing around in my head though is creating a web development pattern (I'm really just avoiding using the word "framework" here) that does this by default (and intentionally). My vision for it is to be a marrying of knockout (for data-binding & templating & components), director.js (for routing, I think pager.js, while well intentioned, is too complex), and requireJS for async loading, with everything but knockout being optional. I'm thinking of calling it chainmail (because the power is in the combination/linking together of the small libraries) -- would you be interested in something like that? Also, have you checked out the components feature of knockout lately? it's awesome
- benmorris 12y agoI'm curious if you've used Durandal. What you're describing is essentially what Durandal is. Modular framework built on knockout and require. The router in durandal works well and is one of the pieces which influenced Angular 2.0's router from what I've read. Just glancing through Rob's new framework the router also seems very similar to Durandal 2.0.
- hardwaresofton 12y agoSo I've actually taken a look and tried to read through Durandal's docs -- I haven't actually used it in a project though (or even kicked the tires on it in a TODO app or something)... I found the docs really hard to follow, and they seemed really complicated (and I didn't think it should have been)... It is entirely possible (and even likely) that I didn't put in much effort. But knockout (and tools like it) hit such a sweet spot for me because they are (almost) dead-simple.
- marpstar 12y agowe've built essentially what you're talking (though we hand-rolled our router) about where I work. As the applications grow larger, you really have to be more diligent with your memory management in Knockout, which is the only thing that really gets in my way. That being said, I'd really be interested in something like you've described.
- hardwaresofton 12y agoGlad to hear! It really weighs on me that I'd be adding yet another web framework to the already-too-large pool of them, but if it gets done at all, I will definitely be aiming for simplicity and lack-of-surprises above all. Right now I see the MV* web framework landscape (from lightest to heaviest) as: knockout---mithril------angular-----backbone+marionette-----ember I'm aiming for chainmail to fit inbetween knockout and mithril (I consider it less than mithril because it will not include a JS-based dom structure, and will be using templating from knockout.
- whatsgood 12y agoany chance you'd mind comparing to enyo.js?
- woah 12y agoLet me tell you, it is pure hell on a large multipage app with many developers.