Why you should care about Durandal JS if you are a Microsoft developer

scrooge-mcduckI am always looking for the next best tool, platform, coding pattern, or whatever to make my life easier.  As a developer, I am lazy at heart and hate doing unnecessary work.  If I have to repeat a computer based task more than once, my brain kicks in and starts thinking about how to automate it with programming.  I thank Disney for this part of my personality, as a child I watched a lot of television and one of my favorite cartoons was “Duck Tales”.  Scrooge McDuck’s motto was “Work Smarter, Not Harder”.  I am 36 now but still after all these years this motto pops into my head every time I have a problem to solve.  I think a lot of Microsoft developers share this motto with me.  Instead of a plain text editor, we choose to use Visual Studio, which is a fantastic tool that is inline with this motto.  During the desktop programming days, technologies like Win Forms embodied this motto by allowing us quickly build apps with drag and drop ease.  At the beginning of the web, active server pages (ASP) and then Web Forms made life easier then CGI scripting with lower level languages. After that, Sliverlight and xaml made it easy to build rich client side development when browsers were less capable.  And now with the web as the standard for application programming and browsers having better performance and capabilities, Durandal JS is carrying this motto forward in the SPA age.

SPAs are the future

Durandal JS is a framework for building rich fully client side single page applications, or SPA’s for short.  If you are unfamiliar with SPA’s, read this for a full explanation.  The basic idea behind a SPA is to serve a visitor to your website a single html page.  This single page contains javascript which handles all the navigation and action links.  As the visitor clicks on a link, javascript executes and handles the request instead of the browser.  In the case of a navigation request, a three step process occurs which involves dynamically loading html/css from the server, data binding to the resulting html, and then injecting the data bound result into a portion of the page.  SPAs also hide this change to browsing from the visitor by updating the navigation url bar and supporting traditional forward and backwards navigation.  A SPA framework, like Durandal, simplifies this process by giving you well defined extension points and handling the low level tasks in a consistent way.  Some people say SPAs are the future and I agree with them.  There are many frameworks for doing this but I feel Durandal is the best fit for the Microsoft developer.  Following the work smarter not harder motto, Durandal does just that, it allows you to work smarter by trying to hide the complexities of SPA development and let you focus on the problem at hand.  Microsoft Web Forms simplified the process of making a web application.  Under the covers Web Forms did a lot of work to hide the stateless nature of HTTP and allowed you to focus on building your app.  Durandal is following that path and hiding a lot of the complex work needed to build a successful SPA.  In retrospect, Web Forms went a little too far in hiding the complexity and created a difficult environment in some cases.  However, in Durandal this is not the case.  Durandal is being developed as an open source project and Rob Eisenberg and his team at Blue Spire consulting have taken great lengths to ensure Durandal is powerful and flexible.

Why Durandal Worksicon_256

Durandal is not the first project Rob and his team have introduced to Microsoft developers to make our lives easier.  If you have ever done any larger scale projects in WPF or Silverlight, you may be familiar with Caliburn.Mirco.  This framework assists in the development of xaml based applications by providing implementations for a variety of UI patterns for solving problems.  This project has given Rob great insight into solving UI problems, insight which is clearly demonstrated in the Durandal project.

Don’t reinvent the wheel

A major insight at the start of the Durandal project was to not reinvent the wheel and embrace existing well supported and documented libraries.  Data binding in Durandal is handled by the Knockout.js library, dynamic loading of javacript files is handled by the Require.js library, and UI/Dom manipulation is handle by the JQuery library.  By leveraging these libraries instead of reinventing them, the learning curve for Durandal is significantly lower.

Convention over configuration

By default, Durandal attempts to automatically locate html views next to the defined javascript modules.  This feels very confortable coming from a Web Forms environment where the setup is similar.  While this is the default, it is not the only way.  Durandal fully supports overriding this convention with your own implementation.        

Detailed Logging

When using conventions, it is sometimes difficult to understand what is happening, but this is not the case in Durandal.  Durandal has an excellent logging mechanism which helps you clearly identify any problems.  Solving common issues like misspelled variable names and modules missing html views is easily visible in the logging output.  Durandal’s logging is also available for your own use, you can easily display your own messages inline with Durandals.

Not Just For Web Applications

In addition to supporting applications in the browser, Durandal has documentation to get your apps running on phones/tablets, desktops, and Windows 8 WinRT.

Call To Action

If you are Microsoft developer you should serious consider looking into Durandal JS.  It provides an easy path this new world of javascript fully client side development.  Rob and his team have created a great framework which made my transition to the client side fun and easy.  After reading the documentation and reviewing the reference app I was able to hit the ground running and start building amazing apps for my users.  Even if you are not ready to make the jump to the javascript client side just yet I strongly urge you to keep Durandal on your radar.  A great way to do this is to donate to their active Kickstarter campaign. website.


Unfortunately the Kickstarter did not succeed but Rob and his team could still use the donations so if interested you can donate to Durandal directly on his website.

Donate Now

Support Durandal

By making a small donation now and getting access to their future training videos and new reference apps you will be able to make the transition to the javascript client side even faster then I did.  If you are already there, donating at a higher level will allow you to get internal access to the Durandal development process and give input on future features.  As developers we have to always be aware of what is on the horizon and make sure our skills are update to date, it’s a daunting task but having access to great projects like Durandal make it much easier.

Donate Now

Leave a Reply

Your email address will not be published. Required fields are marked *