+ All Categories
Home > Documents > Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual...

Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual...

Date post: 29-Mar-2015
Category:
Upload: ashlee-coverdale
View: 215 times
Download: 0 times
Share this document with a friend
Popular Tags:
39
What’s Next for .NET Developers An introduction to Windows 8 Windows Runtime Metro .NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape
Transcript
Page 1: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

What’s Next for .NET Developers

An introduction to Windows 8Windows RuntimeMetro.NET 4.5C# 5Visual Studio 11

Ivan Towlson, Mindscape

Page 2: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

Windows Evolution

1.0

Real modeRudimentary shell

3.0

386 modeGraphical shell

95

32-bitVirtual memory

Pre-emptive multitaskingExplorer shell (Start)

NT 4NT

XP

Unified enterprise and consumer

platforms

Page 3: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

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

Page 4: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

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

Page 5: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

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

Page 6: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

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)

Page 7: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

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

Page 8: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

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

Page 9: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

Introducing the Windows 8 Drinking Game

• “Fast and fluid” – CHUG• “Re-imagining” – DOWN IN ONE

DO NOT PLAY THIS GAME AT TECHEDIT WILL KILL YOU

Page 10: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

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!

Page 11: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

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

Page 12: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

Diagram credit: Doug Seven

Page 13: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

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

Page 14: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

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 WinRT

IAsyncOperation as well as CLR tasks

Page 15: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.
Page 16: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

WinRT Application Model

• XAML-based user interface– Very similar to Silverlight– Styles and templates– Data binding

Page 17: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

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)

Page 18: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

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!

Page 19: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

.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

Page 20: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

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

Page 21: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

.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, async validation,

multithreaded collection updates, perf!• WCF: Web Sockets, simplification!• WF: state machines, C# expressions,

versioning enhancements, designer

Page 22: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

Languages

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

Page 23: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

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#

Page 24: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

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’

Page 25: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

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

Page 26: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

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

Page 27: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

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

Page 28: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

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

Page 29: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

Metro Style Design – Silhouette

Page 30: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

Metro Style Design – Silhouette

Page 31: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

Metro Style Design – Content Before Chrome

Page 32: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

Metro Style Design – Content Before Chrome

Page 33: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

Metro Style Design – The Edge

• Left and right edges are for system UI• Top and bottom edges are for

application UI

Page 34: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

Metro Style Design – Comfort and Touch

Page 35: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

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

Page 36: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

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

Page 37: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

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

Page 38: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

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

Page 39: Whats Next for.NET Developers An introduction toWindows 8 Windows Runtime Metro.NET 4.5 C# 5 Visual Studio 11 Ivan Towlson, Mindscape.

Thanks!

• Windows 8– http://www.buildwindows.com/– http://blogs.msdn.com/b/b8/

• Me– http://hestia.typepad.com/flatlander/– http://www.mindscapehq.com/– [email protected][email protected]


Recommended