zoukankan      html  css  js  c++  java
  • What’s New in WF4 (.NET4 Beta2)

    In version 4 of the Microsoft® .NET Framework, Windows Workflow Foundation introduces a significant amount of change from the previous versions of the technology that shipped as part of .NET 3.0 and 3.5.  In fact, the team revisited the core of the programming model, runtime and tooling and has re-architected each one to increase performance and productivity as well as to address the important feedback garnered from customer engagements using the previous versions.  The significant changes made were necessary to provide the best experience for developers adopting WF and to enable WF to continue to be a strong foundational component that you can build on in your applications. I will introduce the high level changes here, and throughout the paper each topic will get more in depth treatment. 

    Before I continue, it is important to understand that backwards compatibility was also a key goal in this release.  The new framework components are found primarily in the System.Activities.* assemblies while the backwards compatible framework components are found in the System.Workflow.* assemblies.  The System.Workflow.* assemblies are part of the .NET Framework 4 and provide complete backward compatibility so you can migrate your application to .NET 4 with no changes to your workflow code. Throughout this paper I will use the name WF4 to refer to the new components found in the System.Activities.* assemblies and WF3 to refer to the components found in the System.Workflow.* assemblies. 

    • Designers

    One of the most visible areas of improvement is in the workflow designer. Usability and performance were key goals for the team for the VS 2010 release.  The designer now supports the ability to work with much larger workflows without a degradation in performance and designers are all based on Windows Presentation Foundation (WPF), taking full advantage of the rich user experience one can build with the declarative UI framework.  Activity developers will use XAML to define the way their activities look and interact with users in a visual design environment.  In addition, rehosting the workflow designer in your own applications to enable non-developers to view and interact with your workflows is now much easier. 

    • Data Flow

    In WF3, the flow of data in a workflow was opaque.  WF4 provides a clear, concise model for data flow and scoping in the use of arguments and variables.  These concepts, familiar to all developers, simplify both the definition of data storage, as well as the flow of the data into and out of workflows and activities.  The data flow model also makes more obvious the expected inputs and outputs of a given activity and improves performance of the runtime as data is more easily managed. 

    • Flowchart

    A new control flow activity called Flowchart has been added to make it possible for developers to use the Flowchart model to define a workflow.  The Flowchart more closely resembles the concepts and thought processes that many analysts and developers go through when creating solutions or designing business processes.  Therefore, it made sense to provide an activity to make it easy to model the conceptual thinking and planning that had already been done.  The Flowchart enables concepts such as returning to previous steps and splitting logic based on a single condition, or a Switch / Case logic. 

    • Programming Model

    The WF programming model has been revamped to make it both simpler and more robust.  Activity is the core base type in the programming model and represents both workflows and activities.  In addition, you no longer need to create a WorkflowRuntime to invoke a workflow, you can simply create an instance and execute it, simplifying unit testing and application scenarios where you do not want to go through the trouble of setting up a specific environment.  Finally, the workflow  programming model becomes a fully declarative composition of activities, with no code-beside, simplifying workflow authoring.

    Sequence s = new Sequence{
    

        Activities = {
    

            new WriteLine {Text = "Hello"},
    

            new Sequence {
    

                Activities =
    

                {
    

                    new WriteLine {Text = "Workflow"},
    

                    new WriteLine {Text = "World"}
    

                }
    

            }
    

        }
    

    };

     

    • Windows Communication Foundation (WCF) Integration

    The benefits of WF most certainly apply to both creating services and consuming or coordinating service interactions.  A great deal of effort went into enhancing the integration between WCF and WF.  New messaging activities, message correlation, and improved hosting support, along with fully declarative service definition are the major areas of improvement. 

     

    A picture in Visual Studio 2010:

    msn: pccai1983@hotmail.com
  • 相关阅读:
    NB-IoT成为3GPP后会有哪些优势
    NB-IOT覆盖范围有多大 NB-IOT的强覆盖是怎么实现的
    4G DTU无线数据透明传输终端
    NB-IoT DTU是什么 NB-IoT的优势有哪些
    4G DTU是什么 4G DTU的功能和特点
    LoRa技术的发展应用和LoRa应用设备
    4G DTU为什么要具有透传的功能
    跨链在SIPC.VIP上的使用流程
    SimpleChain 开发挑战赛邀你来报名啦
    SimpleChain区块链管理系统使用教程
  • 原文地址:https://www.cnblogs.com/pccai/p/1656238.html
Copyright © 2011-2022 走看看