Answered by:
Term 'Declarative Workflows'?

Question
-
I am a bit confused in the term 'Declarative workflows'. When someone say we can create workflows declaratively what exactly this means? Does this mean that we can create workflows just by using the the activity library comes with visual studio without writing any(or minimum) custom code/activties? or does this term means that we can create workflows, activites, properties and everything directly through Xaml file?
harisMonday, September 7, 2009 9:36 AM
Answers
-
Hi Haris,
You are right. Declarative way of programming is one about which you have mentioned. Other way of programming is by writting code. It’s called Declarative because there is no code. Declarative Workflows are authored in xaml files. XAML files are just another way to declare a class using XML instead of C#, Visual Basic or any other .NET language. The name of the class is an attribute named x:Class.
In Beta 1, Microsoft has introduced WCF Workflow Services which follow Declarative model of programming. These services in short are also called Declarative Services. Instead of coding the Service Implementations for these service we are Declaratively defining them using xaml.- Proposed as answer by Sneha Gupta Monday, September 7, 2009 12:06 PM
- Marked as answer by haris hasan Tuesday, September 8, 2009 5:01 AM
Monday, September 7, 2009 10:35 AM
All replies
-
Hi Haris,
You are right. Declarative way of programming is one about which you have mentioned. Other way of programming is by writting code. It’s called Declarative because there is no code. Declarative Workflows are authored in xaml files. XAML files are just another way to declare a class using XML instead of C#, Visual Basic or any other .NET language. The name of the class is an attribute named x:Class.
In Beta 1, Microsoft has introduced WCF Workflow Services which follow Declarative model of programming. These services in short are also called Declarative Services. Instead of coding the Service Implementations for these service we are Declaratively defining them using xaml.- Proposed as answer by Sneha Gupta Monday, September 7, 2009 12:06 PM
- Marked as answer by haris hasan Tuesday, September 8, 2009 5:01 AM
Monday, September 7, 2009 10:35 AM -
Piling on a touch to this - the concept of declarative programming is separating the description of what is being accomplished from the actual mplementation of accomplishing it.
You have the basic right of the concept, but the idea of declarative programming is that the XAML code describes the logic of what you want to accomplish, and there is a clean separation from the code that accomplishes the work (in the case of WF, we're encapsulating the logic in custom activities). In WF4, you can also create declarative activities (XAML activities that abstract the execution of other activities), but one of the key markers of declarative workflows is the lack of a code-behind/beside. Although you could accomplish this in WF3 (using XOML-only workflows), it was much more painful to accomplish.
Hope this helps,
CliffWednesday, September 9, 2009 6:33 PM