PIcking Your Javascript Mobile Framework: Part 13 - Durandal
Durandal is very opinionated. It has a clear idea on how to structure your application, what best practices there are, and how you should go about your business. Instead of promising flexibility, speed, and safety, it tries to entice you with “Comfortable, Feature-rich, and Versatile!“
it’s comfortable because it follows the conventions of other frameworks (and makes them requirements) like jQuery or Knockout. It’s feature rich because it follows different conventions, so that you can go whichever way you like. And it’s versatile because you can write apps for phones, for desktop, for anything.
That’s all a lot of boilerplate, it seems. The one focus that is interesting is mentioned in the tag line of the site: “Single Page Apps Done Right“
What went without mentioning so far in this entire roundup is that the current model of app development is the Single Page App. What that means is that you don’t jump from link to link to get through your screens, as you would in a typical web site. Instead, your entire application (no matter how many screens) lives in one single link. There is one file (typically called) index.html, and the various pages are just cleverly hidden and displayed elements in your tree.
This development upended much of the typical development process. Optimizing page load was not that important once you had only one page to load. On the other hand, finding a framework that would make the navigation manageable and error free was paramount. Instead of displaying a static document made dynamic by links, suddenly you had a dynamic document, with all the complexities entailed in that.
Durandal makes the transition and announces it. SPA (Single Page App) is the way to develop web interfaces, it seems to proclaim. Calls to the backend are reserved for the background. Never again will we have a user wait in front of a “page loading” sign!
The philosophy is not new. In fact, it was already popular at the time of jQuery (Cenozoic era). Durandal just puts it front and center. Instead of being an implicit condition it’s the explicit starting point.
Aside from that, I found Durandal easy to follow, and found that it should be easy to create an app based on the template of the Todo. Of course, there is lots of boilerplate to write, and the performance is not stellar. If we had fewer options, Durandal would be a more serious contender.