I'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.
Re:Introducing Aurelia
by hardwaresofton on Monday January 26, 2015 @10:36PM
(#8951124)
So 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.
we'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.
Re:Introducing Aurelia
by hardwaresofton on Monday January 26, 2015 @10:41PM
(#8951130)
Glad 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.
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