This project is read-only.

nRoute navigation vs SL4 Navitagation framework

Dec 28, 2010 at 4:59 PM

Could somebody highlight the differences and pros/cons of  nRoute navigation vs SL4 Navigation framework. 

Dec 29, 2010 at 11:55 AM

Hi epitka, well there is substantial difference in SL4's native and nRoute's approach to navigation, let me give you some points:

  • nRoute is build on the routing engine first introduced in MVC, and it carries the same rich semantics as present in asp.net 3.5sp1/MVC. This is considerably richer than the simpler UriMapper solution in SL and not mention you could consider it to be of server grade
  • With nRoute Urls are relatively speaking a first-class objects, whereas the SL Navigation framework fine-tunes itself for a couple of core usage scenarios
  • I think one of the biggest point of differentiation is what we call Navigation Containers, these containers allow you to create different use semantics such as back-forward navigation, forward-only navigation, etc. However, natively in SL you are boxed into a single container who's range of behaviors is all pre-defined. This custom containers capability really shines because you can selectively use different behaviors depending on the use-case, so for example a side-panel might not need a back-forward navigation stack whereas the body of the application might
  • Related to containers is the concept of Navigation-Adapters in nRoute, what this allows you to do is to turn any control into a pseudo navigation container - for example, consider you can write a small adapter for tabs control and navigate into tabs (see http://nroute.codeplex.com/Thread/View.aspx?ThreadId=238412)  
  • Another critical point in favour of nRoute is it has a very solid support for state management, participation is optional, but what it has is simple yet very effective state management options. I think SL has almost nothing on this, unless you custom implement your own crude-fix. This even allows you to implement tomb-stoning like scenarios 
  • nRoute's navigation framework is from the get-go designed to work with MVVM, so for example you can intercept navigation parameters from your ViewModel without having to involve the View
  • Also, the navigation infrastructure can be fully exploited using Blend, using various behaviors and actions in nRoute. Relatively speaking these are like higher level abstractions for navigation, but if need be you can also choose to exploit the lower-level plumbing
  • Navigation by design in nRoute is non-blocking/async, I think that's not the case with SL. This allows us to do things like lazy-loading, pre-loading, navigation cancellation etc.
  • We have a very significant infrastructure around what we call SiteMaps - this allows you to break your application in lots of deployable/logical modules. And navigation is seamlessly integrated for use between modules, so for example if you navigate to a page in a different module, nRoute can automagically load it  (if not loaded) before proceeding with navigation 
  • By design, every part of the navigation infrastructure is extensible, so for example you can create URL handlers that can reach out to loose xaml pages residing in a db

I'm sure there are other things, but I hope this gives you the big picture.

Cheers,
Rishi 

Dec 29, 2010 at 1:31 PM

Rishi,

Thank you very much for such a detailed and long answer. I am very impressed with your framework, while comparing it with others like Prism and Caliburn. Routing is what drew me to it, and I'll try to use it for my next project.  Thanks for great work and keep it up...