Can you compare nRoute with Workflow Fundation?

Apr 23, 2009 at 12:18 PM
Hi

(I'm not a native speaker in English, so please tolerate my sentence.)

I was trying to find a solution for application workflow a couple days ago.
Then I found this amazing project, nRoute.
It does solve my problems.

I also heard others talking about WF and I tried it too. (WPF+WF)
Those two solutions both work well.

I can't see the big different between those two.
Can you compare them for me?


ps. if you need the sample code (WPF+WF), I can send u those files.


Coordinator
Apr 24, 2009 at 8:27 AM
Edited Apr 24, 2009 at 11:44 PM

Hi Wychi,

Well, it is important to appreciate that WF is a general purpose framework for workflow-based “execution”, which just as well can be moulded for navigation related uses. However, that is completely separate from nRoute, which is a framework that supports navigation, resources abstraction, composition etc. using a mediator pattern of sorts. Now, the decision making capability available in WF can be used with nRoute or any other similar frameworks, so in a way WF and nRoute are complimentary but in a distant way.  Hope this helps..

 

Apr 24, 2009 at 10:45 AM
Edited Apr 24, 2009 at 10:47 AM
Hi Rishi,
Thank for explain. I think I get your point.
In the sample app I created, I do use WF's State transition to simulate the view navigation. To archive this, I pair up a state with a ViewModel, a ViewModel with a View. So, once a button is clicked, VM will raise an event, and then WF catches this event and move to next state, and then WF execute some APIs exported by AP side to make the view change.
From my understanding so far, nRoute
1. Construct the mapping of "URL & VM", "VM & V" via class attribute.
2. Provide containers for navigation.
3. Provide utilities using attached property trick.
Because of the mapping, nRoute can do the navigation. And the utilities make empty code-behind.  (Please correct me if I am wrong.)
Indeed, nRoute and WF can work together. For daily usage, nRoute is a more proper choice.

Again, thank you.

Coordinator
Apr 24, 2009 at 11:21 PM
Edited Apr 24, 2009 at 11:49 PM

Oky so using WF’s navigation + state transition framework, if I am right, was made specifically for WPF but you could use the same technique/pattern with nRoute’s Navigation Services. Also, the steps you have mentioned are one way of doing it, but there are other possible ways.

 

- Like, instead of using the attributes you can just statistically register the routes - like in MVC routing, see my intro blog post for examples

-  You can also avoid using containers by just implementing the INavigationHandler interface – but normally the container are more useful

-  Also, you can avoid the attach property “trick” by using the NaivgationService static class, with something like this:

NavigationService.Navigate(new NavigationRequest("Home/Page2/")); 

-  Using the above, you could navigate in you ViewModel or in code-behind event handlers

-  And equally, you could also without much trouble linkup WF state transitions with navigation in nRoute using custom activities

 

These are equivilent ways to what you have mentioned, but just highlights the flexibility in nRoute. Hope it’s not confusing.

Cheers.