3 ms·
A few random comments: 2) This certainly can get messy in my experience, a complex nested viewmodel is nasty to selectively create observables. I haven't figur
by benmorris 13y ago
A few random comments:
2) This certainly can get messy in my experience, a complex nested viewmodel is nasty to selectively create observables. I haven't figured a clean way to do this.
3)I found binding handlers in the beginning to be more work to write, but in the long run the code is less brittle and much more reusable (not tied to a specific element). Although pitching to front end folks may not care about this.
4) If I'm understanding what you are saying this sounds to me like you are hitting the limits of Knockout. Durandal has a much better structured system for models/views and nested bindings. The compose syntax in Durandal also comparable to the template binding in knockout, although a lot more flexible. Durandal is built on knockout so much of what you already know will just work.
5) Agreed
- EdgarVerona 13y agoOh, I've not even heard of Durandal, I'll have to check that out! (Strangely enough, the word "Durandal" has an historic importance at our company, so it'll be humorous to present this to them if it turns out to be useful for us. ;) ) Indeed, my solution for (2) is to say "hey, let's make a real set of ViewModel objects". I have an internal-only project that I built myself, which was basically a fairly complex experiment in using Knockout - and making the ViewModel objects myself really made a difference in how the whole application felt, it felt great. But it was a hard sell - one that I lost - when I tried to sell them on it in general. And indeed, I don't know if I'll ever find a solution around (5). I feel like it's a small price to pay for the benefits personally, but it is a price to be paid. :(
- benmorris 13y ago>Oh, I've not even heard of Durandal, I'll have to check that out! (Strangely enough, the word "Durandal" has an historic importance at our company, so it'll be humorous to present this to them if it turns out to be useful for us. ;) ) Yes, it is worth the effort to check out. While you can mash several things like sammy and other frameworks to make your own SPA type solution, Durandal already has done it for you (built on require.js, sammy, and knockout)
- EdgarVerona 13y agoVery cool, many thanks!
- judah 13y ago+1 on Durandal. We're using it to build the new RavenDB HTML5 Studio: https://github.com/JudahGabriel/ravendb/tree/Raven.Studio.Html5/Raven.Studio.Html5 https://github.com/JudahGabriel/ravendb/tree/Raven.Studio.Ht...