Diese Präsentation wurde erfolgreich gemeldet.
Die SlideShare-Präsentation wird heruntergeladen. ×

WPF & Silverlight Intro

Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Nächste SlideShare
Silverlight vs WPF
Silverlight vs WPF
Wird geladen in …3
×

Hier ansehen

1 von 22 Anzeige

Weitere Verwandte Inhalte

Diashows für Sie (20)

Ähnlich wie WPF & Silverlight Intro (20)

Anzeige

Aktuellste (20)

Anzeige

WPF & Silverlight Intro

  1. 1. WPF & Silverlight 2.0 Introduction<br />Dave Allen<br />ISV Application Architect<br />Developer and Platform Group<br />Microsoft UK<br />
  2. 2. Agenda<br />Windows Presentation Foundation<br />XAML<br />Silverlight 2.0<br />Primary differences<br />WPF or Silverlight?<br />Deployment<br />
  3. 3. The Windows Client Platform<br />Silverlight Mobile<br />Mobile<br />.NET<br />XAML<br />Desktop<br />Web<br />WPF<br />Silverlight<br />
  4. 4. The user experience<br />
  5. 5. Windows Presentation Foundation<br />Now in it’s third release: 3.0, 3.5, 3.5 SP1<br />Highly stable platform for rich client applications<br />Many bug fixes and supplemental features<br />Browser control added in 3.5 SP1<br />Performance optimizations – especially cold start-up<br />Some mixed messages on it’s initial release<br />WinForms is dead, no further development – not true!<br />Backtrack – WPF isn’t really suitable for LOB – was true!<br />Tooling not good enough for RAD of LOB apps – was true!<br />WPF is moving into mainstream LOB<br />WPF Toolkit available on codeplex includes:<br />DataGrid, Ribbon, Calendar/Date Picker, Visual State manager.<br />WPF 4.0 primary goal is LOB applications<br />
  6. 6. Primary features of WPF<br />Vector based graphics, resolution-independent DPI <br />Composition engine – allows nesting of all controls<br />Unified programming model for 2D, 3D, and Media<br />Declarative programming model with XAML<br />Support different types of layout<br />High degree of control over styling<br />Built-in support for DataBinding<br />Deploy through browser (XBAP)<br />Interop with WinForms<br />
  7. 7. Demo<br />WPF applications<br />
  8. 8. WPF architecture<br />USER INTERFACE SERVICES<br />DOCUMENT SERVICES<br />XPS Documents<br />ApplicationServices<br />Controls<br />Databinding<br />PackagingServices<br />DeploymentServices<br />Layout<br />BASE SERVICES<br />MEDIA INTEGRATION LAYER<br />Windows Presentation Foundation<br />XAML<br />2D<br />Audio<br />Imaging<br />Text<br />Accessibility<br />3D<br />Video<br />Effects<br />Input&Eventing<br />Animation<br />PropertySystem<br />Composition Engine<br />Managed<br />Unmanaged<br />Input / Eventing System<br />Property Engine<br />.NET Framework 2.0<br />Composition Engine<br />Desktop Windows Manager<br />Windows Media Foundation<br />Media Integration Layer<br />Print Spooler<br />DirectX<br />Windows Vista Display Driver (LDDM)<br />
  9. 9. WPF programming model<br />XAML<br />C#<br />VB.NET<br /><Button Width="100"> OK<br /> <Button.Background><br /> LightBlue<br /> </Button.Background><br /></Button><br />Button b1 = new Button();<br />b1.Content = "OK";<br />b1.Background = new SolidColorBrush(Colors.LightBlue);<br />b1.Width = 100;<br />Dim b1 As New Button<br />b1.Content = "OK"<br />b1.Background = New _ SolidColorBrush(Colors.LightBlue)<br />b1.Width = 100<br />Declarative programming with XAML<br />UI and code easy to separate<br />1:1 matching between XAML and code<br />Easily toolable<br />
  10. 10. Designer-Developer Collaboration<br /><ul><li>Microsoft Tools for Designers & Developers
  11. 11. Declarative Programming through XAML</li></ul>With XAML designers & developers can streamline their collaboration<br />Designers design<br />Developers add business logic<br />
  12. 12. Demo<br />XAML<br />
  13. 13. Silverlight 2.0<br />Browser plug-in<br />Cross-browser, cross-platforms, cross-device<br />.NET Runtime allows authoring in C# and VB.NET<br />Key Features<br />LINQ<br />Networking<br />Web Services<br />Web Client<br />Sockets<br />HTML DOM Integration<br />Isolated Storage<br />Safe File Open Dialog<br />
  14. 14. Silverlight 2.0 architecture<br />Silverlight 1<br />.NET for Silverlight<br />Server<br />Silverlight 2<br />Data<br />WPF for Silverlight<br />Inputs<br />Media<br />LINQ<br />LINQ-to-XML<br />Extensible Controls<br />Keyboard<br />WMV / VC1<br />Web Services<br />ASP.NET AJAX Libs<br />Mouse<br />WMA<br />REST<br />RSS<br />SOAP<br />Dynamic Languages<br />BCL<br />POX<br />JSON<br />Ink<br />MP3<br /><asp:xaml><br />Ruby<br />Python<br />Generics<br />Collections<br /><asp:media><br />Common Language Runtime<br />XAML<br />UI Core<br />Controls<br />DRM<br />2D Vectors<br />Images<br />Layout<br />Media<br />Animation<br />Transforms<br />Editing<br />Text<br />Presentation Core<br />Integrated Networking Stack<br />DOM Integration<br />JavaScript Engine<br />Installer<br />
  15. 15. Demo<br />Silverlight 2.0 – Anatomy <br />
  16. 16. Differences between Silverlight & WPF<br />What’s common<br />XAML, CLR, C#, VB.NET<br />What’s not – most other things<br />Full fidelity .NET in WPF<br />Subset in Silverlight 2.0<br />Namespaces<br />Navigation<br />Controls, properties, methods, events<br />Security model<br />Data binding<br />Localisation<br />Resources<br />Some things are different for a reason<br />Isolated storage, File Dialog, HTML DOM, etc.<br />
  17. 17. Demo<br />Silverlight 2.0<br />http://www.mscui.net/PatientJourneyDemonstrator/<br />http://memorabilia.hardrock.com/<br />
  18. 18. WPF and Silverlight applications<br />The paradigm shift<br />WPF not a natural fit for a WinForms, VB6, MFC developer that has grown up on GDI/User32<br />XAML mark-up language more familiar to Web developers<br />Visual Studio 2008 and Expression Blend generate XAML<br />WPF/Silverlight/XBAP – too many options?<br />Decision is much simpler than you think<br />If you develop and deploy WinForms applications today<br />WPF is the natural choice – full fidelity .NET<br />If you develop WinForms applications and deployment is a problem, then XBAP could be the answer<br />Restricted to browser sandbox – full fidelity .NET<br />If you target the browser today and are moving to RIA<br />Silverlight is the natural next step<br />
  19. 19. WPF versus XBAP versus Silverlight<br />WPF applications are installed, MSI or ClickOnce<br />Full access to local machine, full-trust, full .NET Framework<br />Can support any off-line capability you have<br />Interact with other applications<br />.NET Framework can be packaged with your MSI<br />XBAP<br />Requires full .NET Framework 3.x to be pre-installed<br />Is a full WPF application apart from deployment mechanism<br />Deployed and run in browser sandbox<br />Silverlight 2.0<br />Completely separate .NET runtime, no binary compatibility<br />Deployed through a Web page and interacts with Web page<br />Requires Silverlight 2.0 browser plug-in<br />
  20. 20. .NET Client profile<br />Full .NET 3.5 SP1 Framework now 231Mb!<br />Subset of the full .NET Framework 3.5 SP1 <br />Just 26Mb in total<br />Targets Windows XP SP2<br />Includes client specific assemblies, such as WPF, WCF, WinForms, ClickOnce, XML, LINQ, System.Data, etc.<br />Does not include ASP.NET, WF, and other server-side assemblies.<br />Target through App.config and Deployment.xml<br />Customizable deployment UI<br />Configurable through Visual Studio<br />
  21. 21. Demo<br />.NET Client Profile<br />
  22. 22. Resources<br />http://msdn.microsoft.com/en-gb/netframework/aa663326.aspx<br />http://windowsclient.net/wpf/<br />http://www.microsoft.com/silverlight/<br />http://silverlight.net/default.aspx<br />http://msdn.microsoft.com/en-us/library/cc656912.aspx<br />http://blogs.windowsclient.net/trickster92/archive/2008/05/21/introducing-the-net-framework-client-profile.aspx<br />

Hinweis der Redaktion

  • 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
  • XAML Pad – Hello World
  • HTML object tagASP.NET FileXAP file Manifest
  • http://www.mscui.net/PatientJourneyDemonstrator/http://memorabilia.hardrock.com/

×