Net combines the power of the .NET Framework 2.0 with new technologies for building applications that have visually compelling user experiences, seamless communication across technology boundaries, and the ability to support a wide range of business processes.
NET Framework 3.0 is a superset of the .NET Framework, designed to expose the new functionality in Windows Vista® to the developer through managed classes.
Overview to .Net 3.0 Windows Vista (Longhorn) is tightly integrated with .net 3.0 framework. The Look and feel of Vista is enhanced using the WPF.
What's new in .Net 3.0 – A developer perspective
Programming model for Windows
.NET Framework 3.0 consists of these basic components:
.NET Framework 2.0
Microsoft® Windows® Presentation Foundation (formerly Avalon)
Microsoft® Windows® Communication Foundation (formerly Indigo)
Microsoft® Windows® Workflow Foundation
Windows CardSpace® (formerly code named "Infocard")
What's new in .Net 3.0 – A developer perspective. Contd.
One great benefit of XAML is that it helps to separate design and development, which actually helps to improve collaboration and efficiency between designers and software developers. As the XAML markup for an application's UI remains separate from the remainder of application logic, a designer's exact layout can be saved in XAML and combined with the application without affecting the development process.
Easily toolable, declarative markup
Code and content are separate
Can be rendered in the browser / standalone application
XPS – XML Paper Specification. Microsoft has integrated XPS-based technologies into the 2007 Microsoft Office system and the Microsoft Windows Vista operating system, but XPS itself is platform independent, openly published, and available royalty-free.
XAML <Button Width="100"> OK <Button.Background> LightBlue </Button.Background> </Button> 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
Extensible Application Markup Language Introduction to XAML
Microsoft Tools for Designers & Developers
Declarative Programming through XAML
Third Party Tools (e.g. Aurora by Mobiform, ZAM 3D by Electric Rain)
With XAML designers & developers can streamline their collaboration
Developers add business logic
Windows Presentation Foundation
WPF is the new presentation API (Application Programming Interface) in .NET Framework 3.0
The Windows Presentation Foundation is the unified presentation subsystem for Windows. It consists of a display engine and a managed-code framework. The Windows Presentation Foundation unifies how Windows creates, displays, and manipulates documents, media, and user interface, which enables developers and designers to create visually-stunning, differentiated user experiences that improve customer connection.
Developers can program directly against the API with .NET, instantiate (render) WPF objects by expressing them in XAML, or employ a mixture of XAML with .NET code behind.
WPF Architecture 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 Audio Imaging Text Video Effects Composition Engine MEDIA INTEGRATION LAYER Controls Layout Windows Presentation Foundation XPS Viewer Property Engine Input / Eventing System .NET Framework 2.0 Desktop Windows Manager Media Integration Layer DirectX Windows Vista Display Driver (LDDM) Windows Media Foundation Composition Engine Print Spooler Managed Unmanaged
WPF fundamentally is designed to create dynamic, data driven presentation systems. Every part of the system is designed to create objects through property sets that drive behavior. Data binding is a fundamental part of the system, and is integrated at every layer.
“ Hello World” Application:- Starting with pure XAML (Declarative programming model).
Attaching events. Understanding the new event model of .Net 3.0.
Bit of Animation .
Silverlight is a new cross-browser, cross-platform implementation of the .NET Framework for building and delivering the next generation of media experiences and rich interactive applications (RIA) for the Web. Silverlight unifies the capabilities of the server, the Web, and the desktop, of managed code and dynamic languages, of declarative and traditional programming, and the power of Windows Presentation Foundation (WPF).
Silverlight enables following features:
It is a cross-browser, cross-platform technology. It runs in all popular Web browsers, including Microsoft Internet Explorer, Flock, Mozilla Firefox, Apple Safari, and Opera, and on Microsoft Windows and Apple Mac OS X.
It provides a consistent experience no matter where it runs.
It is supported by a very small download that installs in seconds.
It streams video and audio. It scales video quality to everything from mobile devices to desktop browser s .
It includes compelling graphics that users can manipulate—drag, turn, zoom—directly in the browser.
It reads data and updates the display, but it doesn't interrupt the user by refreshing the whole page.
How Silverlight offers features:
WPF and XAML . Silverlight includes Windows Presentation Foundation (WPF) technology, which greatly extends the elements in the browser for creating UI. WPF lets you create graphics, animation, media, and other rich client features, extending browser-based UI beyond what is available with HTML alone. Extensible Application Markup Language (XAML) provides a declarative m arkup syntax for creating WPF elements.
Cross-browser, cross-platform support . Silverlight runs the same on all popular browsers (on any platform). You can design and develop your application without having to worry about which browser or platform your users have.
Access to the .NET Framework programming model and to associated tools . Silverlight-based applications may be created using dynamic languages such as Managed JScript and IronPython as well as languages such as C# and Visual Basic. D evelopment tools such as Visual Studio can be leveraged to create Silverlight-based applications.
LINQ . Silverlight includes language-integrated query (LINQ), which enables data access using intuitive native syntax and strongly typed objects in .NET Framework languages.
S erver-based resources in ASP.NET can be created to use the AJAX capabilities of ASP.NET to interact with server-based resources without interrupting the user.
Silverlight RIA – Light up my web
Silverlight and ASP .NET , AJAX
Windows Communication Foundation
The WCF is an incremental, yet evolutionary technology that brings all the formerly distinct and separate Microsoft connectivity technologies together under a single umbrella within the System.ServiceModel namespace. Included in WCF are Web services (ASMX), the Web service Extensions (WS*), Microsoft Message Queuing (MSMQ), Enterprise Services, COM+, and .NET Remoting using Windows Communication Foundation's System.ServiceModel namespace
Having a single namespace that subsumes all of these into a coherent package is enormously useful, and makes designing, developing, and deploying applications that require connectivity far simpler.
Whether the application connects via loosely coupled Web services, or tightly coupled Enterprise Services, the coding model will be consistent and the transition between different communication types will be smoother
The ABC of WCF
ABC means that writing (and configuring) a WCF service is always a three-step process
Define a contract and implement it on a service
Choose or define a service binding that selects a transport along with quality of service, security and other options
Deploy an endpoint for the contract by binding it (using the binding definition, hence the name) to a network address.
"A" stands for Address—as expressed in the wsdl:service section and links wsdl:binding to a concrete service endpoint address.
"B" stands for Binding—as expressed in the wsdl:binding section and binds a wsdl:portType contract description to a concrete transport, an envelope format and associated policies.
"C" stands for Contract—as expressed in the wsdl:portType, wsdl:message and wsdl:type sections and describes types, messages, message exchange patterns and operations.
Endpoints - All communications with the WCF service will happen via the endpoints. The endpoint is composed of 3 parts (collectively called as ABC's of endpoint) as defines below:
Address: The endpoints specify a Address that defines where the endpoint is hosted.
Contract: The endpoints specify a Contract that defines which methods of the Service class will be accessible via the endpoint; each endpoint may expose a different set of methods.
Binding: The endpoints also define a binding that specifies how a client will communicate with the service and the address where the endpoint is hosted.Various components of the WCF are depicted in the figure below.
Contracts and Descriptions
Contracts define various aspects of the message system. The data contract describes every parameter that makes up every message that a service can create or consume. The message parameters are defined by XML Schema definition language (XSD) documents, enabling any system that understands XML to process the documents.
Service Contracts - Describes the operations a service can perform. Maps CLR types to WSDL.
Data Contracts - Describes a data structure. Maps CLR types to XSD.
Message Contracts - Defines the structure of the message on the wire. Maps CLR types to SOAP messages.
Bindings can be defined in config file as well as programmatically.
The service runtime layer contains the behaviors that occur only during the actual operation of the service, that is, the runtime behaviors of the service.
Throttling controls how many messages are processed, which can be varied if the demand for the service grows to a preset limit.
An error behavior specifies what occurs when an internal error occurs on the service, for example, by controlling what information is communicated to the client.
Metadata behavior governs how and whether metadata is made available to the outside world.
Instance behavior specifies how many instances of the service can be run (for example, a singleton specifies only one instance to process all messages).
Transaction behavior enables the rollback of transacted operations if a failure occurs. Dispatch behavior is the control of how a message is processed by the WCF infrastructure.
Extensibility enables customization of runtime processes. For example, message inspection is the facility to inspect parts of a message, and parameter filtering enables preset actions to occur based on filters acting on message headers.
A Performance Comparison of WCF with Existing Distributed Communication Technologies
ASP.NET Web Services (ASMX) : WCF is 25%—50% faster than ASP.NET Web Services
Web Services Enhancements (WSE) : The throughput of WCF is nearly 4 times better than WSE. The main reason for this is that WSE uses the System.Xml.XmlDocument class to do message level parsing, thereby loading the full message into memory at once, while WCF uses a streaming System.Xml.XmlReader class that improves the performance significantly
.NET Enterprise Services (ES) : .NET Enterprise Service is load dependant, as in one case WCF is nearly 100% faster but in another scenario it is nearly 25% slower.
.NET Remoting: approximately 25% faster than .NET Remoting
Windows Workflow Foundation provides a common framework for building workflows into Microsoft Windows applications, whether those workflows coordinate interactions among software, interactions among people, or both
Unlike traditional Microsoft® .NET Framework programs, workflow-based programs are typically specified in a declarative Extensible Application Markup Language (XAML) document that specifies the structure of the program in terms of domain- specific activities. These activities are typically implemented in a traditional common language runtime (CLR)-based programming language such as C# or Visual Basic
A workflow can be defined either purely in XAML or with XAML plus a codebehind file that contains C# or Visual Basic code. Pure XAML workflows have the advantage of being directly loadable at run time without a separate compilation step.
Future releases of other Microsoft products, including BizTalk Server and Microsoft Business Solutions, will also implement their workflow services using Windows Workflow Foundation. And since all of these applications will eventually use the same workflow technology, the advent of Windows Workflow Foundation should make it easier to implement business processes that rely on multiple Windows applications.
It's important to understand that Windows Workflow Foundation is a framework targeting developers, not a workflow application intended for immediate use by end users.
Activity —A unit of work. The work an activity implements can range from very simple to quite complex.
Workflow —A group of activities that implements all or part of a business process.
WWF designers —Graphical tools that can be used to create and modify workflows and activities.
WWF base activity library —A fundamental group of activities that developers can use to create workflows.
WWF runtime engine —A library that executes workflows. The runtime engine also provides other services, such as mechanisms for communicating with software outside the workflow.
Host process —A Windows application that hosts the Windows Workflow Foundation runtime engine and any workflows it executes. The host process provides supporting runtime services for persisting a workflow's state, handling transactions, and other functions.
Rules Engine : Windows Workflow Foundation has a rules engine which enables declarative, rule-based development for workflows and any .NET application to use.
Workflow Designer : Allows for the graphical composition of workflows, by placing activities within the workflow model. One interesting feature of the designer is that it can be re-hosted within any Windows Forms application.
Hello World Application:- Creating an Activity and an Simple Sequence Workflow.
Hosting the Workflow
Windows CardSpace (Infocard)
Windows CardSpace enables users to provide their digital identities in a familiar, secure and easy way. In the physical world we use business cards, credit cards and membership cards. Online with CardSpace we use a variety of virtual cards to identify ourselves, each retrieving data from an identity provider
Windows CardSpace Provides
Support for any digital identity system
Consistent user control of digital identity
Replacement of password-based Web login :Because the security tokens issued by most identity providers, including those created by CardSpace's self-issued identity provider, don't use passwords, relying parties, including websites and others, can use these tokens rather than passwords to authenticate their users. If a site doesn't use passwords, phishers can't trick users into revealing those passwords
Improved user confidence in the identity of remote applications
Interactions among the user, identity provider, and relying party roles
Interactions among the user, identity provider, and relying party role SCSF recipe implementing MVP
Replacement of password-based Web login
NET Framework 3.0 consists of these basic components:
Microsoft® Windows® Presentation Foundation (formerly Avalon)
Microsoft® Windows® Communication Foundation
Microsoft® Windows® Workflow Foundation
Windows CardSpace® (formerly code named "Infocard")
.NET Framework 3.0 is a superset of the .NET Framework, designed to expose the new functionality in Windows Vista® to the developer through managed classes.
XAML provides declarative markup to separate code and presentation layer