Amit Bahree Senior Solution Architect Avanade
Agenda .NET 3.0 Introduction What is SOA? WCF WPF WF CardSpace Q&A
.NET 3.0
Agenda .NET 3.0 Introduction What is SOA? WCF WPF WF CardSpace Q&A
Why Messages? Cross-platform Integration Asynchronous Communication Reliable Communication Mediation Thread Management Remote Communication End-to-End Security
Definitions Service An autonomous system that accepts requests and returns responses via set of published and well defined interfaces. Service Orientation An Architectural paradigm that employs the four tenets. Service Oriented Architecture A architectural comprising of a collection of services which adheres to the four tenets.
Four Tenets of Service Orientation
Boundaries are Explicit Know your Boundaries. Services should be easy to consume. Avoid RPC Interfaces. Keep the service surface area small. Don’t expose implementation details.
Services are Autonomous Service versioning and deployment are independent of the system in which they are deployed. Contracts should not change after publishing. Adopt a pessimistic approach and isolate services from failure.
Share Schema & Contract, not Class Contracts and schema interact based on data, WSDL and policy do not change over time. Contracts should be as explicit as possible. If a service contract needs to be broken then version the service, thereby minimizing the “ripple effect”. Don’t expose internal representation.
Service Compatibility is based on Policy Separate service interactions from constraints on those interactions. Service capabilities and requirements are expressed in terms of a policy expression Assertions identified by stable, globally unique names
SOA – the Holy Grail? MythReality Is a technology or a set of technologies. It is revolutionary. It is the end goal. Requires Business and Technology overhaul. Complex and requires a lot of resources (people). Is an architectural paradigm. It is evolutionary. It is the means to an end. It is an incremental process. Relatively easy and does not need an army.
Agenda .NET 3.0 Introduction What is SOA? WCF WPF WF CardSpace Q&A
Three Pillars of WCF Interoperability WS-* Specification Support Compatibility with existing Technology Productivity Unifies today’s distributed technologies VS.NET Integration Service Oriented Development Enables loosely coupled services Config based communication
ASMX WSE.NET Remoting System. Messaging Enterprise Services Today’s Technology
Interop with other platforms ASMX Ent Services Attribute- based programming WSE WS-* protocols Sys.Messaging Message- based programming Locationtransparency Remoting Unified framework supersets existing technologies WCF Unified Framework
WCF Architecture
Service Model Layer Influences and adds to the programming model based on incoming messages Messaging Layer Moves messages back and forth and adds transfer semantics (channels) ServiceCode Transaction Behavior CLR Type Integration Instancing Behavior Security Channel TCP Transport Security Channel TCP Transport Transaction Behavior CLR Type Integration Composable Architecture
Service Model Layer Messaging Layer BehaviorsChannels Transaction Behavior CLR Type Integration Instancing Behavior Security Channel HTTP Transport Custom Channel Reliable Messaging Queue Transport MSMQ Integration TCP Transport Named Pipes Throttling Behavior Error Handling Behavior Concurrency Behavior Metadata Behavior Custom Behavior HTTP Transport TCP Transport Security Channel Custom Channel Reliable Messaging CLR Type Integration Instancing Behavior Transaction Behavior Composability in Action
WCF Architecture Hosting Windows Activation Service.EXE Windows Services COM+ Messaging HTTP Channel TCP Channel TCP Channel Transaction Flow Channel NamedPipe Channel NamedPipe Channel MSMQ Channel Security Channel Reliable Msg Channel Binary Encoder Text Encoder XML Encoder MTOM Encoder Service Runtime Transaction Dispatch Concurrency Throttling Metadata Error Instance Message Inspection Contracts DataMessageServicePolicy and Binding Parameter Filtering Application
Side-by-Side Interop Upgrade Investment Protection
20,379 lines security 5,988 lines reliable messaging 25,507 lines transactions Total lines 56,296 4,442 lines infrastructure 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 ); … hr = pITxDispenser->BeginTransaction (NULL, ISOLATIONLEVEL_SERIALIZABLE, 0, pITxOptions, &pITransaction); … return Greeting; } Development Productivity Using Visual Studio.NET 2003
Development Productivity Using Visual Studio.NET 2003 and WSE 10 lines security 1,804 lines reliable messaging 25,507 lines transactions Total lines 27,321 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 ); … hr = pITxDispenser->BeginTransaction (NULL, ISOLATIONLEVEL_SERIALIZABLE, 0, pITxOptions, &pITransaction); … return Greeting; }
Development Productivity Using Visual Studio 2005 and WCF 1 lines security 1 lines reliable messaging 1 lines transactions Total lines 3 [ServiceContract(SecureChannel, SecurityMode =“Windows")] [Reliability(Guarantees.ExactlyOnce | Guarantees.InOrder)] [ServiceContract] class HelloService { [ServiceOperation(TransactionFlowAllowed = true)] String Hello(String Greeting) { return Greeting; }
More than changing Transport Layers Interoperability WS-* Specification Support Compatibility with existing Technology Productivity Unifies today’s distributed technologies VS.NET Integration Service Oriented Development Enables loosely coupled services Config based communication
Agenda .NET 3.0 Introduction What is SOA? WCF WPF WF CardSpace Q&A
What is User Experience? Term used to describe the overall experience and satisfaction a user has when using a product or system. Commonly refers to a combination of software and business topics. Applies to any result of interaction design e.g. VRU’s. From Wikipedia
User Experience in Software Ease of User Learn ability Performance Reliability Security Optimized Form Factor Readability / Legibility Relevance Richness Graphics + Media Data Visualization Higher Fidelity Info. Globalization Accessibility Hardware + Printing Measuring UX ROI Success Productivity Retention Comprehension Conversion Satisfaction Excitement Repeat Use
User Experience Challenges
WPF Vision Unified approach to UI, Documents, and Media Integration as part of development and experience Integrated, vector-based composition engine Utilizing the power of the PC throughout the graphics stack Declarative programming Bringing designers directly into application development Ease of deployment Allowing administrators to deploy and manage applications securely
Unified Approach With XAML designers & developers can streamline their collaboration
Declarative Programming Built in controls have hard-coded look Doing something custom takes lots of extra code WinXP Start Button team: 4 Developers, ~6 Months Dev Time
XAML – Declarative Programming OK LightBlue XAML Button b1 = new Button(); b1.Content = "OK"; b1.Background = new SolidColorBrush(Colors.LightBlue); b1.Width = 100; C# Dim b1 As New Button b1.Content = "OK" b1.Background = New _ SolidColorBrush(Colors.LightBlue) b1.Width = 100 VB.NET XAML eXtensible Application Markup Language
Application or Browser? Security Checking for Updates Accessible
New Document Technologies XPS Print Path WPF Document API Open Document Specification XPS Viewer “Save As” Print Driver
Application Services Deployment Services Databinding USER INTERFACE SERVICES XAML Accessibility Property System Input & Eventing BASE SERVICES DOCUMENT SERVICES Packaging Services XPS Documents Animation 2D 3D AudioImaging Text VideoEffects Composition Engine MEDIA INTEGRATION LAYER Controls Layout WPF Architecture
More than a Pretty Face Delivering Innovative User Experiences Increase Developer – Designer Productivity Flexible Application Deployment Leverage Existing Investment
Agenda .NET 3.0 Introduction What is SOA? WCF WPF WF CardSpace Q&A
EX: Check Inventory EX: Escalate To Manager What Is A Workflow? A Set Of Activities That Coordinates People And / Or Software... Like a flowchart…. Or a state diagram…. Sequential Workflow Sequential structure Prescribes processing order Step1 Step2 State Machine Workflow External events drive processing order State2 State1 Event Rules + data state drive processing order Rules-driven Activities Rule1 Rule2 Data Step2 Step1
Activity Basics Activities are the building blocks of workflows Basic Activities – steps within a workflow and do “work” Composite Activities – contains other activities Forms and Controls Activity Control Workflow Form
Host Process WF Architecture Workflow Foundation Runtime Engine A Workflow Activity Runtime Services Base Activity Library Custom Activity Library Visual Designer Components Key Concepts Workflows is a set of Activities. Workflows run within a host process. Developers can build their own Custom Activity Libraries Base Activity Library – Out-of-box activities and base for custom activities. Runtime Engine – Workflow execution and state management. Runtime Services – Hosting flexibility and communication. Visual Designer – Graphical and code- based construction
WF Authoring Modes Markup Only “Declarative” XML defines workflow structure logic and data flow XAML Code Only Code creates workflow in constructor C#/VB Markup & Code XML defines workflow Code-beside defines extra logic XAMLC#/VB Workflow Loader Workflow Compiler wfc.exe C#/VB Compiler.NET Assembly Workflow Runtime Application Generated XAML C#/VB App. Creates Activity Tree & Serializes
Extensible Approach OOB activities, workflow types, base types General-purpose Activity libraries define workflow constructs Out-of-Box Activities Base Activity Library Create/Extend/ Compose activities App-specific building blocks First-class citizens Compose activities Extend activity Author new activity Custom Activity Libraries Vertical-specific activities & workflows Best-practice IP & Knowledge Compliance RosettaNet CRM IT Mgmt Domain-Specific Workflow Packages
Two Workflow Products BizTalk Server provides workflow across existing applications and between trading partners as part of its business process and integration feature set BizTalk Windows Workflow Foundation is a framework for adding workflow inside a custom application WF
Workflow and BizTalk Messaging DesignTools BusinessActivityMonitorAndAdminTools Orchestration Transformation AdaptersBizTalkAccelerators Premium BPM server Distinct server product Use in B2B, EAI, BPM scenarios Deployable solutions Manageability, Scale-out Workflow Future version will migrate to Windows Workflow Foundation for orchestration WinFX Visual Studio Designer Windows Workflow Foundation Workflow framework Future technology Broad set of scenarios Used to build solutions Enables manageability and scale-out in solutions Use for building workflow into apps or workflow enabled servers
Windows Workflow Foundation
Agenda .NET 3.0 Introduction What is SOA? WCF WPF WF CardSpace Q&A
Identity Crisis The Internet is more useful then ever… and more dangerous – It was designed without an identity layer Password Fatigue Username + password is weak and overwhelmed Identity theft, spoofing, phishing, fraud Enterprises are in identity silo hell 22% Stopped 25% Reduced
Goals Safe and secure Internet for all Safely, reliably identify sites to users… …and users to sites Usable by everyone, everywhere Put users in control of their identity Connected Systems Remove walls between systems Internal and external
The Laws of Identity User Control and Consent Limited Disclosure for Limited Use Justifiable Parties Directed Identity (Omni and Uni-Directional) Pluralism of Operators and Technologies Human Integration Consistent Experience Across Contexts
Identity Metasystem Universal adoption of a single identity system unlikely Unifying identity meta-system Connect and leverage the strengths of constituent identity systems Platform Independent Standard UI Protect applications from underlying complexities Decouple digital identity from implementation details
Metasystem Concepts
Protocol Drill Down Identity Provider (IP) Relying Party (RP) Client Client wants to access a resource RP provides identity requirements 1 2 User 3 Which IPs can satisfy requirements? User selects an IP 4 5 Request security token (authentication required e.g. X509, Kerberos, username/pwd, self-issued token ) 6 Return security token based on RP’s requirements (any format) – and optional signed display token 7 User approves release of token 8 Token released to RP (RP reads token and allows access) Windows CardSpace
What is Windows CardSpace? Identity Selector for Windows Digital identities represented by cards When user selects a card Get security token from Identity Provider Give it to the Relying Party after user consent User is in control Security Token Service User Experience Service
Windows CardSpace Easily and safely manage digital identities. Authenticate with Websites and Web Service. Easier No Usernames No Password Consistent login and registration Safer Avoid Phishes Multi-Factor Authentication Users in Control
WS-* Web Services Windows CardSpace User Relying Party Identity Provider
CardSpace Cards Contains claims about my identity that I assert Not corroborated Stored locally Signed and encrypted to prevent replay attacks Presented by user during account sign-up Provided by banks, stores, government, clubs, etc. Locally stored cards contain metadata only (no identity) Data stored by Identity Provider and obtained only when card submitted (from STS) Provisions.CRD file via , website, group policy etc. Self IssuedManaged
CardSpace and the Enterprise User-centric, active federation Information Cards Standardized and ubiquitous Flexible, agile user-driven relationships Anti-phishing and information minimalization Security Token Services Identity service which connects systems
Agenda .NET 3.0 Introduction What is SOA? WCF WPF WF CardSpace Q&A
Contact Information Amit Bahree Senior Solution Architect Avanade blog: msdn webcast: TBA msdn articles: TBA book: