1 / 39

What’s Next for .NET Developers

Windows 8 Windows Runtime Metro .NET 4.5 C# 5 Visual Studio 11. What’s Next for .NET Developers. An introduction to. Ivan Towlson, Mindscape. Windows Evolution. XP. NT 4. Unified enterprise and consumer platforms. NT. 95. 32-bit Virtual memory Pre-emptive multitasking

perrin
Download Presentation

What’s Next for .NET Developers

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. Windows 8 Windows Runtime Metro .NET 4.5 C# 5 Visual Studio 11 What’s Next for .NET Developers An introduction to Ivan Towlson, Mindscape

  2. Windows Evolution XP NT 4 Unified enterprise and consumer platforms NT 95 32-bit Virtual memory Pre-emptive multitasking Explorer shell (Start) 3.0 386 mode Graphical shell 1.0 Real mode Rudimentary shell

  3. Windows Today • Dominant operating system on traditional PCs • User experience tailored to keyboard-mouse-monitor setup • Technology largely tied to x86/x64, boot from disk • Fundamentals of user experience largely unchanged since Windows 95

  4. Market Challenges • Shifting away from traditional PCs towards consumer devices • Smartphones • ‘Fondleslab’ tablets • Media devices (audio/video, portable/home entertainment) • Game consoles • Microsoft needs to compete in these markets

  5. Design Challenges – Traditional Desktop • Users need to be able to manage: • Very large number of installed applications • Lots of notifications (e.g. social media) – don’t want to have to keep opening lots of applications to check or catch up on different things • Sharing silo-ed data (in apps and services) • Most of ‘My Pictures’ may be on Facebook! • Application distribution

  6. Design Challenges – Devices • Start menu is fiddly to navigate with touch • Window management is fiddly, and in most cases is useless overhead • Battery life needs to be better • Boot time needs to be near instant • Buying an app needs to be low friction • Keep multiple devices (including a PC) in sync • It needs to look awesome (and harmonious)

  7. Introducing Windows 8 • A new shell • A new set of UI standards • A new application model • A new set of APIs • Rich visual design • Asynchrony everywhere • Multiple language support • ARM support and diskless boot support • A new set of cloud services

  8. Introducing Visual Studio 11 • Compiler support for Windows Runtime • Designer support for Metro • Language changes for C#, F# and Visual Basic • C# and VB: async • F#: type providers

  9. Introducing the Windows 8 Drinking Game • “Fast and fluid” – CHUG • “Re-imagining” – DOWN IN ONE DO NOT PLAY THIS GAME AT TECHED IT WILL KILL YOU

  10. Windows Runtime • A common runtime for Windows applications providing a safe, object-oriented API to a variety of services, accessible from multiple languages • Cripes! That sounds familiar!

  11. WinRT Architecture • Internally based on COM, but looks like .NET • Sandboxed • Language ‘projections’ • Component-based • Metadata format (.winmd) is very similar to .NET • Can also be used from native code (C++) • Windows 8 only

  12. Diagram credit: Doug Seven

  13. WinRT Class Library • Mostly a subset of the .NET basic profile • Not the full profile! • Roughly comparable to Silverlight (plus classes for Win8 and local machine features) • C#/VB still target 4.5 CLR, but compiler restricts you to APIs in the Metro profile (a la Client Profile) • Some .NET features unavailable or moved • Language projections take care of some changes • Many things now in Windows.* namespaces

  14. WinRT Class Library • Potentially long-running APIs (e.g. file, network) are only available in async form • E.g. no HttpClient.Get, only HttpClient.BeginGet • C# and VB await keyword works with WinRTIAsyncOperation as well as CLR tasks

  15. WinRT Application Model • XAML-based user interface • Very similar to Silverlight • Styles and templates • Data binding

  16. WinRT Application Model • Capabilities specified in manifest • Services the application wants to consume • E.g. location, camera • Declarations specified in manifest • Services the application offers • E.g. file type association, search provider • Contracts which applications can consume or implement (e.g. search, share, picker)

  17. WinRT Application Model • OS suspends application when not active • Notifications via live tile • Non-Metro apps run on Desktop as before • The desktop is effectively just a (special) app!

  18. .NET 4.5 • Updates to the .NET 4.0 CLR • Not side-by-side • Windows 8 support • Framework does not require Windows 8 though • New versions of C#, VB and F# • Many enhancements to high-level libraries • ASP.NET, WPF, WCF, WF, MEF, ADO.NET

  19. http://www.heikniemi.net/hardcoded/2011/10/whats-new-in-net-framework-4-5-poster/http://www.heikniemi.net/hardcoded/2011/10/whats-new-in-net-framework-4-5-poster/

  20. .NET 4.5 Class Library – Selected Highlights • BCL: async APIs using Task objects • ASP.NET: HTML5 forms, model binders in Web Forms, minification, AntiXSS, lots more! • ADO.NET: Entity Framework enhancements • WPF: ribbon control, asyncvalidation, multithreaded collection updates, perf! • WCF: Web Sockets, simplification! • WF: state machines, C# expressions, versioning enhancements, designer

  21. Languages • C# 5 • Visual Basic… er… lost count… 11? • Visual C++ 11 • F# 3

  22. C# and Visual Basic Async • Long running operations present a dilemma • Synchronous: • Pro: Clear top-to-bottom program flow • Con: Locks up UI (and blocks other operations) • Asynchronous: • Pro: Fast and fluid (CHUG!) • Con: Splits program flow, especially if you have a sequence of async operations • Solution: use F#

  23. C# and Visual Basic Async • async method modifier means method might not complete synchronously • Within an async method, use await keyword to call an asynchronous method and wait for its completion without blocking • In an async method, you can write your code in a top-to-bottom way and the compiler will transform it into ‘callback style’

  24. F# 3.0 • We doan’ need no steenkin’ async • Because we’ve had that stuff and more for ages • Wake me up when C# has async agents • LINQ operators • Okay, I admit it, that one, C# got there first • Type providers

  25. Visual C++ 11 • C++/CLI-like syntax that compiles to native (COM) code targeting WinRT • WinRT constructs like lists mapped to C++ STL • Lots of other C++1x goodness including lambdas which is outside the scope of this talk – see Herb Sutter’s Build sessions for details

  26. Building Great Metro-Style Applications • Metro style design • Fast and fluid (CHUG!) • Snap and scale beautifully • Use the right Contracts • Invest in a great Tile • Feel connected and alive • Roam to the cloud • Embrace Metro principles

  27. Metro Style Design • The silhouette of a Metro style app • Standard layouts, type sizes, etc. (as in VS templates) – harmonious across applications • Content before chrome • The edge • Comfort and touch – how people hold devices

  28. Metro Style Design – Silhouette

  29. Metro Style Design – Silhouette

  30. Metro Style Design – Content Before Chrome

  31. Metro Style Design – Content Before Chrome

  32. Metro Style Design – The Edge • Left and right edges are for system UI • Top and bottom edges are for application UI

  33. Metro Style Design – Comfort and Touch

  34. Building Great Metro-Style Applications • Metro style design • Fast and fluid • Snap and scale beautifully • Use the right Contracts • Invest in a great Tile • Feel connected and alive • Roam to the cloud • Embrace Metro principles

  35. Live Tiles • Windows.UI.Notifications defines the available tile templates • E.g. plain text, text above picture, etc. • Live tiles can show application data while application is not running • E.g. unread message count, stock ticker • Your back end service sends notifications to Windows Push Notification Service (WNS) • WNS notifies the Windows 8 client

  36. Building Great Metro-Style Applications • Metro style design • Fast and fluid • Snap and scale beautifully • Use the right Contracts • Invest in a great Tile • Feel connected and alive • Roam to the cloud • Embrace Metro principles

  37. Learn More • Watch the videos from the Build conference • Jensen Harris (Big Picture) • Chris Sells (Big Picture) • Anders Hejlsberg (C#/VB) • Follow the ‘Building Windows 8’ blog • http://blogs.msdn.com/b/b8/ • Download the developer preview • Install to VHD – Hanselman has instructions • VS11 preview for non-Metro will install on Win7

  38. Thanks! • Windows 8 • http://www.buildwindows.com/ • http://blogs.msdn.com/b/b8/ • Me • http://hestia.typepad.com/flatlander/ • http://www.mindscapehq.com/ • ivan@hestia.cc • ivan@mindscape.co.nz

More Related