1 / 38

Agenda

Agenda. .NET Framework 3.0 Windows Presentation Foundation Windows Communication Foundation Windows WorkFlow Foundation CardSpace Foundation. Microsoft .NET Framework 3.0. Windows Presentation Foundation. “CardSpace”. Windows Communication Foundation. Windows Workflow Foundation.

banyan
Télécharger la présentation

Agenda

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Agenda .NET Framework 3.0 Windows Presentation Foundation Windows Communication Foundation Windows WorkFlow Foundation CardSpace Foundation

  2. Microsoft .NET Framework 3.0 Windows Presentation Foundation “CardSpace” Windows Communication Foundation Windows Workflow Foundation

  3. Windows Presentation Foundation • WPF for short • Unified Framework for building User Interfaces with 2D ,3D , Media, Documents • Does not use GDI/GDI32/GDI+ - essentially replaces win32 ,utilizes the power of Graphics Card and hence increases performance.

  4. Windows Presentation Foundation • Bring UI designers into the process, Designers and Developers can work in Synergy. UI Design is separated from the code ,the code is available as a code behind ,while design could be done using Xaml. • WPF intends to replace both webforms and windows forms – apps can be built to run in a browser or a standalone window • Windows forms and WPF pages/windows can co-exist in the same application

  5. WPF Capabilities User Interface Services Document Services XPS Documents Application Services Controls Databinding Layout Deployment Services Packaging Services Media Integration Layer Base Services Imaging 2D Audio XAML Text Effects 3D Video Accessibility Animation Input & Eventing Composition Engine Property System

  6. Xaml • Xaml – eXtended Application Markup Language • XAML is -Declarative -Xml based -Has actions as well • Designers could use tools like Expression Blend which is a separate tool to design UI and which has the capability of generating Xaml out of it. • Can be described using a notepad , Xamlpad ,Visual Studio. • Zam3D tool for 3D UI which also generates Xaml. • Baml – Binary Application Markup Language.

  7. XAML or Code? Compile and Run Load, Parse, Display 0101010 0101010 BAML Parse Load, Display <Button Width="100"> OK <Button.Background> LightBlue </Button.Background> </Button> Button b1 = new Button(); b1.Content = "OK"; b1.Background = new SolidColorBrush(Colors.LightBlue); b1.Width = 100;

  8. XAML or Code? Class Compile and Run Partial Class Public Button b1; Public Button b2; Load (“My.Baml”) 0101010 0101010 My.Baml <Button Width="100"> OK <Button.Background> LightBlue </Button.Background> </Button> Button b1 = new Button(); b1.Content = "OK"; b1.Background = new SolidColorBrush(Colors.LightBlue); b1.Width = 100; Parse & Generate ‘Code Behind’

  9. Tags to Remember .Net 3.0 CardSpace WPF WCF WWF WPF/E Xaml Xbap Expression Blend Code Behind

  10. Resources • http://en.wikipedia.org/wiki/Windows_Presentation_Foundation • http://msdn2.microsoft.com/en-us/library/aa970268.aspx • http://www.codeproject.com/useritems/DotNet_XAML.asp • http://www.microsoft.com/downloads/details.aspx?FamilyID=C2B1E300-F358-4523-B479-F53D234CDCCF&displayLang=en

  11. Books • Applications = Code + Markup: A Guide to WPF (Charles Petzold) • Programming Windows Presentation Foundation (Chris Sells & Ian Griffiths) • Windows Presentation Foundation Unleashed (Adam Nathan) • Foundations of WPF (Laurence Moroney) • Essential Windows Presentation Foundation (Chris Anderson)

  12. Windows Communication Foundation Unifies today’s distributed technologies Lets you develop/deploy/manage one model Visual Studio 2005 integration Unification Broad support for Web services (WS-*) specifications Compatible with existing Microsoft-distributed application technologies Interoperability Enables development of loosely-coupled services Config -based communication Service-Oriented Development

  13. A Look at WCF:Endpoints Endpoint Endpoint Endpoint Client Service Message

  14. A Look at WCF:Address, Binding, Contract C C C B B B A A A Client Service Message Address Binding Contract (Where) (How) (What)

  15. Unified Programming Model .NET Remoting ASMX Interop with other platforms Extensibility Location transparency Attribute- Based Programming Message- Oriented Programming WS-* Protocol Support Enterprise Services System.Messaging WSE

  16. ProductivityUsing Visual Studio .NET 2003 • class HelloService { • [WebMethod] • public String Hello(String Greeting) { • X509CertificateCollection collection = new X509CertificateCollection(); • IntPtr blob = Marshal.AllocHGlobal(Marshal.SizeOf( typeof(CRYPTOAPI_BLOB))); • IntPtr data = (IntPtr)((int)blob + • Marshal.SizeOf(typeof(CRYPTOAPI_BLOB))); • … • SeqAckRange range = new SeqAcknRange(id, low, high ); • SeqAckRange[] ranges = { range }; • ReliableQueue.ProcessAcks( ranges ); • … • BeginTransaction (NULL, • ISOLATIONLEVEL_SERIALIZABLE, 0, pITxOptions, • &pITransaction); • … • return Greeting; • } • } 20,379 linessecurity 5,988 lines reliable messaging 25,507 linestransactions 4,442 lines infrastructure Total lines 56,296

  17. ProductivityUsing Visual Studio .NET 2003 and WSE class HelloService { [WebMethod] public String Hello(String Greeting) { foreach ( SecurityToken tok in requestContext.Security.Tokens { X509SecurityToken token = tok as X509SecToken } … SeqAckRange range = new SeqAcknRange(id,low,high ); SeqAckRange[] ranges = { range }; ReliableQueue.ProcessAcks( ranges ); … BeginTransaction (NULL, ISOLATIONLEVEL_SERIALIZABLE, 0, pITxOptions, &pITransaction); … return Greeting; } } 10 lines security 1,804 lines reliable messaging 25,507 linestransactions Total lines 27,321

  18. Productivity [ServiceContract] class HelloService { [OperationContract] [PrincipalPermission(SecurityAction.Demand, Role = “Adminstrators")] [TransactionFlow(TransactionFlowOption.Mandatory)] [OperationBehavior(TransactionScopeRequired = true, TransactionAutoComplete = true)] String Hello(String Greeting) {return Greeting;} } <bindings> <wsHttpBinding> <binding name="Binding1“ transactionFlow="true"> <security mode="Message"> <message clientCredentialType="Windows“/> </security> <reliableSession enabled="true" /> </binding> </wsHttpBinding> </bindings> 1 code + 2 config (elem.) security 0 code + 1 config (elem.) reliable messaging 2 code + 1 config (attr.)transactions Total lines:3 code (what) + 4 config (how) Using Visual Studio 2005 and WCF

  19. WS-* Protocol Support

  20. WCF Application “Architecture” TransactedMethods Instance Manager Context Manager ServiceMethods TypeIntegration DeclarativeBehaviors Application Messaging Services Queuing Routing Eventing Discovery Service Model Channels Message Encoder Security Transport Channels (IPC, HTTP, TCP…) Reliability Hosting Environments WAS IIS .exe WindowsService DllHost

  21. Resources • http://en.wikipedia.org/wiki/Windows_Communication_Foundation

  22. Windows Workflow Foundation • Windows Workflow Foundation is the programming model, engine and tool for quickly building workflow enabled applications on Windows. • Separates the Business Process Flow code from the Actual implementation. • The best way to look at a workflow is as a schematic description of a real world problem. For example: If an order is placed, check if we have enough inventory and if not create a purchase order and send it to the supplier, notify the account manager by email of the expected delivery date the supplier specified. These activities are modeled in a graphical way making the workflow much more understandable. The activities themselves, like sending an email, are done in traditional C# or Visual Basic .NET code in such a way that they are unaware of their context, all they know is that they have to send an email as told by the workflow.

  23. What is a workflow? A set of activities that coordinate people and / or software... EscalateToManager CheckInventory Example activities…. …organized into some form of workflow. Or a state diagram…. or based on rules. Like a flowchart….

  24. Windows Workflow Foundation KeyConcepts Visual Designer A Workflow • Workflows are a set of Activities • Workflows run within a Host Process:any application or server • Developers can build their own Custom Activity Libraries An Activity Custom Activity Library Components Windows Workflow Foundation • Base Activity Library:Out-of-box activities and base for custom activities Base Activity Library • Runtime Engine:Workflow execution and state management Runtime Engine • Runtime Services:Hosting flexibility and communication Runtime Services • Visual Designer: Graphical and code-based construction Host Process

  25. State1 State2 Workflow types State Machine Workflow Sequential Workflow External events drive processing order Sequential structure prescribes processing order Step1 Event Step2 Event • Prescriptive, formal • Automation scenarios • Flowchart metaphor • Reactive, event-driven • Skip/re-work, exception handling • Graph metaphor Rules-driven Activities Rule1 Step1 Rules + data state drive processing order Data Step2 Rule2 • Data-driven • Simple Conditions, complex Policies • Constrained Activity Group

  26. Activity Basics • Activities are the building blocks of workflows • The unit of execution, re-use and composition • Basic activities are steps within a workflow • Composite activities contains other activitiesEG: Sequence • Base Activity Library provides out-of-the-box activity set • Partners and customers author custom activitiesEG: “ApproveOrder” • Activities are classes: • Properties and events are defined by the activityauthor and programmable from workflows • Has methods that are coded by the activity authorbut invoked by the workflow runtime (EG: Execute) or designer • Can be built into workflow assemblies or deployed asre-usable libraries

  27. Activity basics • Activities are placed in a container • Sequential workflow • Sate Machine workflow • Fault handlers • Compensation • Event handlers • Activities can have conditions • Code conditions • A specified method, which the developer writes, that returns true or false. This type of condition is compiled with into the workflow • Declarative conditions • A single declarative condition that results in true or false. The declarative condition is interpreted and is allowed to be modified after compilation • Policy conditions • A rule set in a policy derived activity consisting of a collection of conditions and resultant actions

  28. Activity basics • Control flow activities • Sequence • Parallel • IfElse • While • ConditionedActivityGroup • Replicator

  29. Activity basics • Lifetime activities • InvokeWorkflow • Suspend • Terminate • Event waiting activities • EventDriven • Listen • Delay • HandleExternalEvent

  30. Activity Basics • Web service activities • Invoke webservice • WebServiceRequest • WebServiceResponse • Other • InvokeExternalMethod

  31. Resources • http://en.wikipedia.org/wiki/Windows_Workflow_Foundation

  32. What is CardSpace? http://cardspace.netfx3.com/Windows CardSpace  is a piece of client software that enables users to provide their digital identity to online services in a simple, secure and trusted way.

  33. CardSpace is not Passport The client software is an “identity selector” The user chooses what information is sent to a requesting web site. An issuing server is an “identity provider” Identifiable information is held on the user’s PC or the identity provider. Developed by Kim Cameron, MS Championed by external “thought leaders” like Doc Searls & Lawrence Lessig

  34. Information Cards Personal (self-issued)“Phone book” information ManagedSourced from 3rd Party “Authority”Users cannot edit claimsCan be protected by various means(Username/Password, Kerberos, SmartCard etc)

  35. The Identity Selector Easier:No usernames No passwords Consistent: Same UI Safer:Avoids Phishing Multi-factor authentication

  36. The typical logon process Login to identity provider Token issued to client Token sent to service provider Token validated with identity provider Output sent to client

  37. The CardSpace logon process Service Provider Requests Identity CardSpace Identity Selector pops up Token is built by Identity Selector(with Identity Provider) Token sent to client Output sent to client

  38. Summary WPF is the future of user interfaces Declarative and programmatic Windows and browser WCF is the future of distributed computing Existing stacks combined WS-* standards support CardSpace is a means of providing digital identity to online services in a simple ,trusted and secure way. .NET 3.0 is available for Windows Vista, Windows XP SP2, Windows Server 2003

More Related