5. Windows Presentation Foundation Now in it’s third release: 3.0, 3.5, 3.5 SP1 Highly stable platform for rich client applications Many bug fixes and supplemental features Browser control added in 3.5 SP1 Performance optimizations – especially cold start-up Some mixed messages on it’s initial release WinForms is dead, no further development – not true! Backtrack – WPF isn’t really suitable for LOB – was true! Tooling not good enough for RAD of LOB apps – was true! WPF is moving into mainstream LOB WPF Toolkit available on codeplex includes: DataGrid, Ribbon, Calendar/Date Picker, Visual State manager. WPF 4.0 primary goal is LOB applications
6. Primary features of WPF Vector based graphics, resolution-independent DPI Composition engine – allows nesting of all controls Unified programming model for 2D, 3D, and Media Declarative programming model with XAML Support different types of layout High degree of control over styling Built-in support for DataBinding Deploy through browser (XBAP) Interop with WinForms
8. WPF architecture USER INTERFACE SERVICES DOCUMENT SERVICES XPS Documents ApplicationServices Controls Databinding PackagingServices DeploymentServices Layout BASE SERVICES MEDIA INTEGRATION LAYER Windows Presentation Foundation XAML 2D Audio Imaging Text Accessibility 3D Video Effects Input&Eventing Animation PropertySystem Composition Engine Managed Unmanaged Input / Eventing System Property Engine .NET Framework 2.0 Composition Engine Desktop Windows Manager Windows Media Foundation Media Integration Layer Print Spooler DirectX Windows Vista Display Driver (LDDM)
9. WPF programming model XAML C# VB.NET <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; Dim b1 As New Button b1.Content = "OK" b1.Background = New _ SolidColorBrush(Colors.LightBlue) b1.Width = 100 Declarative programming with XAML UI and code easy to separate 1:1 matching between XAML and code Easily toolable
10.
11. Declarative Programming through XAMLWith XAML designers & developers can streamline their collaboration Designers design Developers add business logic
13. Silverlight 2.0 Browser plug-in Cross-browser, cross-platforms, cross-device .NET Runtime allows authoring in C# and VB.NET Key Features LINQ Networking Web Services Web Client Sockets HTML DOM Integration Isolated Storage Safe File Open Dialog
14. Silverlight 2.0 architecture Silverlight 1 .NET for Silverlight Server Silverlight 2 Data WPF for Silverlight Inputs Media LINQ LINQ-to-XML Extensible Controls Keyboard WMV / VC1 Web Services ASP.NET AJAX Libs Mouse WMA REST RSS SOAP Dynamic Languages BCL POX JSON Ink MP3 <asp:xaml> Ruby Python Generics Collections <asp:media> Common Language Runtime XAML UI Core Controls DRM 2D Vectors Images Layout Media Animation Transforms Editing Text Presentation Core Integrated Networking Stack DOM Integration JavaScript Engine Installer
16. Differences between Silverlight & WPF What’s common XAML, CLR, C#, VB.NET What’s not – most other things Full fidelity .NET in WPF Subset in Silverlight 2.0 Namespaces Navigation Controls, properties, methods, events Security model Data binding Localisation Resources Some things are different for a reason Isolated storage, File Dialog, HTML DOM, etc.
18. WPF and Silverlight applications The paradigm shift WPF not a natural fit for a WinForms, VB6, MFC developer that has grown up on GDI/User32 XAML mark-up language more familiar to Web developers Visual Studio 2008 and Expression Blend generate XAML WPF/Silverlight/XBAP – too many options? Decision is much simpler than you think If you develop and deploy WinForms applications today WPF is the natural choice – full fidelity .NET If you develop WinForms applications and deployment is a problem, then XBAP could be the answer Restricted to browser sandbox – full fidelity .NET If you target the browser today and are moving to RIA Silverlight is the natural next step
19. WPF versus XBAP versus Silverlight WPF applications are installed, MSI or ClickOnce Full access to local machine, full-trust, full .NET Framework Can support any off-line capability you have Interact with other applications .NET Framework can be packaged with your MSI XBAP Requires full .NET Framework 3.x to be pre-installed Is a full WPF application apart from deployment mechanism Deployed and run in browser sandbox Silverlight 2.0 Completely separate .NET runtime, no binary compatibility Deployed through a Web page and interacts with Web page Requires Silverlight 2.0 browser plug-in
20. .NET Client profile Full .NET 3.5 SP1 Framework now 231Mb! Subset of the full .NET Framework 3.5 SP1 Just 26Mb in total Targets Windows XP SP2 Includes client specific assemblies, such as WPF, WCF, WinForms, ClickOnce, XML, LINQ, System.Data, etc. Does not include ASP.NET, WF, and other server-side assemblies. Target through App.config and Deployment.xml Customizable deployment UI Configurable through Visual Studio
Things have got much better in terms of user interaction in other walks of life since the GUI was brought to us on Windows and the MAC, but although things have improved since Windows 3.0, in some ways nothing has changed since 1980sUser experience is more than “looks”. User experience represents the overall interaction process of the user with an object. This interaction provides the user with an added value benefit. In this case the benefit that both tools offer is “opening a can”. However it is evident that the can opener will provide the user with a better overall user experience on obtaining the benefit. It is more secure, easier to use and can achieve the benefit faster than the knife.Let’s take this example even further. What is the difference between 2 cars - a 10K car and a 40K BMW? Both take you from point A to point B. There’s a world of difference. For one, the BMW has a much superior user experience (styling, handling, performance, etc.) In addition, notice that a BMW offers its owners an emotional connection, a “pride of ownership.” This gives BMW a unique brand in the eyes of its owners, and to the millions of potential owners who dream of buying this car some day! This shows us that user experience has tremendous business value – ability to differentiate products, create brand awareness, and customer satisfaction.
Family Show http://www.vertigo.com/familyshow.aspxBritish Library http://ttpdownload.bl.uk/app_files/xbap/BrowserApp.xbap
ARCHITECTURE: This diagram shows the basic architecture for WPF. Notice all the different media types (in yellow) that are handled by WPF: Vectors, Bitmaps, 3D, Audio and Video, Text and Effects! Second, notice how the animation capabilities of WPF spans across all the media types, allowing you to animate any kind of content. The WPF Composition Engine (in black) is one of the revolutionary features of WPF. This engine provides capability of having live content inside of another content. This means that you can have a 3D object rotating inside a Button control and furthermore you can have a video projected over the surface of the 3D object! This tree structure and nesting capability is available for all content and every control that WPF provides. WPF is not only about rich user interfaces but also about high fidelity information, connection and data. Controls, Layout and Databinding are just some of the examples of this power. The XPS format is a rich document definition that allows us to enjoy the best of WPF in a document. In summary, WPF represents an evolution in terms of richness, interactivity as well as information and data.DESIGN PRINCIPLES - The design principles behind Windows Presentation Foundation can be categorized as follows: Integration: Windows Presentation Foundation offers a unified API that spans the services identified in Table 1. Developers today are faced with a myriad choice of disparate technologies and APIs, depending on whether they are targeting 2D graphics (GDI or GDI+), user interface (USER32 or Windows Forms), media (DirectShow), or 3D (Direct3D or OpenGL). Windows Presentation Foundation provides a single model that is orthogonal across all these services and allows seamless integration of content within a single application. You can use the same constructs for animation, data binding and styling, regardless of whether you are targeting 2D, 3D or text content. Vector graphics. As described in the introduction, Windows Presentation Foundation takes full advantage of the powerful Graphical Processing Units that are part of modern PC systems. At its heart, the composition engine is vector-based, allowing for scaling of all output to match the resolution of a specific machine. The rendering architecture uses Direct3D for all output: on video cards that implement DirectX 7 or later in hardware, Windows Presentation Foundation renders output using the GPU wherever possible. In situations where hardware rendering cannot be used, software rendering is available as a fallback. Lastly, a floating-point logical pixel system and 32-bit ARGB color support provide a rich high-fidelity experience that anticipates future technology needs, such as high-DPI displays.
Stands for EXtensiveApplication Markup LanguageEasily toolable, declarative markupBuild applications in simple declarative statementsCan be used for any CLR object hierarchyCode and content are separateStreamline collaboration between designers and developersDevelopers add business logic, while designers design Can be rendered in the browser (as part of a web page) or as a standalone application