sluguk build round-up

35
build Is Silverlight Dead or Not? / / / / round-up

Upload: derek-lakin

Post on 28-Jan-2015

106 views

Category:

Technology


0 download

DESCRIPTION

Presentation to the Silverlight User Group in London on October 12th to provide a round-up of the recent BUILD conference in LA and an introduction to Windows 8 and the Windows Runtime.

TRANSCRIPT

Page 1: SLUGUK BUILD Round-up

build

Is Silverlight Dead or Not?

/// /round-up

Page 2: SLUGUK BUILD Round-up

Who am I?»Derek Lakin @dereklakin» Senior User Experience Developer

@ Pixel Lab http://thinkpixellab.com

Agent 008 Ball

RunKeeperEvernote

SketchFlow for Windows Phone

Page 3: SLUGUK BUILD Round-up

Agenda» DEMO: Windows 8» Keynote highlights» Windows Runtime overview» DEMO: Converting Silverlight to WinRT» Silverlight and .NET on Windows 8» Summary» Q & A

Page 4: SLUGUK BUILD Round-up

Demo

Windows 8

Page 5: SLUGUK BUILD Round-up

Summary

Windows 8

» Metro style Start screen» Fast and fluid» Integrated web of applications» Sharing» Pickers» Search

» Touch-first

Page 6: SLUGUK BUILD Round-up

The good, the bad, and the funnyKeynote highlights

Page 7: SLUGUK BUILD Round-up

Windows 8 Experience

» Fast and fluid user experienceResponsive, alive and beautiful with animations and Metro style

» Immersive and full-screenFocuses attention on your apps

» Touch-first with full keyboard and mouseEnables your choice of interaction

» Web of apps working togetherApps are connected to each other and the cloud

» Experience for all PC devices & architecturesNo compromise across new factors, desktops and laptops

Page 8: SLUGUK BUILD Round-up

Developer Platform & Tools

» New APIs and tools to build Metro appsDelivers a modern platform, great tools, accelerated graphics

» Rapid and scalable development of Metro appsIncludes powerful touch-enabled controls, layouts, and templates

» Choice of world-class dev tools & languagesSupports coding in JavaScript, C#, VB, C++, HTML/CSS, XAML for x86/x64/ARM

» Business opportunity is the world of Windows 8 customersIntroduces the Windows Store

Page 9: SLUGUK BUILD Round-up

Hardware Platform» Smaller and faster on widest range of

hardware» Native SoC implementation across

x86/x64/ARM» Integrated support for broad range of

new mobile peripherals

Page 10: SLUGUK BUILD Round-up

Cloud Services» New Metro style apps for Mail, Photos,

Calendar, PeopleConnects to Live and the other services you use

» Sync across your PC devices and phoneEnables clean start on new device and roaming between devices

» SkyDrive for the information you create and care aboutStores and shares your photos, documents, and files to the cloud

» Live APIs for SkyDriveBuild your own cloud connected Metro style apps

Page 11: SLUGUK BUILD Round-up

Path to RTM» Windows 8 Developer Preview

Including VS 11 Express, Blend 5, SDK, AppsDeveloper Pre-Release

» Next milestone is Beta. Then RC, RTM, GADriven by quality, not date

» Updates along the way» Learning more

» blogs.msdn.com/B8» connect.microsoft.com» dev.windows.com» Feedback tool

Page 12: SLUGUK BUILD Round-up

What is it? What’s the difference?Windows Runtime

Page 13: SLUGUK BUILD Round-up

Summary» The Windows Runtime is the solid,

efficient foundation for the new Windows 8 developer platform» Build Metro style apps easily with the

Windows Runtime» Windows available in your choice of

language and environment» One Windows API, Natural and Familiar

Everywhere

» Don’t need to understand how it works

but …

Page 14: SLUGUK BUILD Round-up

Metro Style Application APIs

DevicesSensors

Geolocation

Portable

NFC

Communications & DataContracts

XML

Web

SMSNetworking

Notifications

Local & Cloud Storage

Streams

Background Transfer

User InterfaceHTML5/CSS XAML DirectX Controls

InputAccessibilit

yPrinting

Data Binding

TilesSVG

FundamentalsApplication

ServicesAuthenticatio

nCryptography

Globalization

Memory Management

Threading/Timers

MediaVisual Effects

Playback

PlayTo

Capture

Page 15: SLUGUK BUILD Round-up

Windows 8

Windows Kernel Services

JavaScript(Chakra)

C/C++ C#, VB

Metro style Apps

Communication

& Data

Application Model

Devices & Printing

Windows Runtime APIs

Graphics & Media

XAMLHTML /

CSS

HTMLJavaScrip

t

CC++

C#VB

Desktop Apps

Win32

.NETSL

IESyst

em

Serv

ices

Vie w

Mod

el

Con

trolle

r

Kern

el

Page 16: SLUGUK BUILD Round-up

Windows Runtime Architecture

Windows Core

Runtime Broker

Web Host (HTML, CSS,

JavaScript))

Language Support

(CLR, WinJS, CRT)

Windows Runtime Core

XAML Storage …Network

UI Pickers MediaControls

Windows Metadat

a & Namespa

ce

Language Projection

Metro style app

Page 17: SLUGUK BUILD Round-up

Windows Metadata» Concise, complete description of the

Windows Runtime» Generated natively from C++ or

C#/VB compiler» Efficient binary format» Rich enough to allow multi-language

projection generation» Full IntelliSense on statically known

information

Page 18: SLUGUK BUILD Round-up

Basic TypesExample Description

Strings HSTRING Avoids copying in multiple languages

Basic Types INT32, UINT64 * Pointers allowed in limited cases

Enumerations enum AsyncStatus

Flag or non-flag styles

Structures struct Rect; Can contain strings, but not interfaces

Simple Arrays INT32 [] For very basic collections

Interfaces Inspectable Methods are defined in interfaces

Generic Interfaces

IVector<T> Type-generic interface

Runtime class Windows.Storage.StorageFile

Binds interfaces to make a class

Page 19: SLUGUK BUILD Round-up

Common PatternsExample Description

Collections IVector<T>, IVectorView<T>, IMap<T>

Iterators, collections and events cross-language

Delegates delegate AsyncActionCompletedHandler

Encapsulate the context to call back to an object

Events IApplicationLayout::LayoutChanged

Lists of callback recipients

PropertySet Interface IPropertySet Collection of items with varying types

Async Interface

ReceivePropertiesOperation A way to get a delayed result without blocking

Contracts Windows.ApplicationMode.DataTransferManager

Connect apps to Windows extension points

Page 20: SLUGUK BUILD Round-up

Asynchronous Objects

» Basic requirement for Metro style apps» Always responsive, ready» “Long running” APIs must be delivered as async

» Simpler to allow apps to make synchronous calls» But then bad apps can overwhelm quality of

system

» Instead, build async into API shape» And have language projections integrate it deeply

» Example coming up in the demo

Page 21: SLUGUK BUILD Round-up

Is That It?» No, there’s much more» Language Projections» Runtime Object brokering» Threading» Versioning

» Check out the detailed sessions for more information if you need it

Page 22: SLUGUK BUILD Round-up

Demo

Converting Silverlight to WinRT

Page 23: SLUGUK BUILD Round-up

Summary

Converting Silverlight to WinRT

» No Blend support for XAML … yet!» No behaviors; use attached

properties» No designer-supported font

embedding» No RichTextBox; use RichTextBlock» No pixel shaders (Effect property)» No NavigateUri on HyperlinkButton

Page 24: SLUGUK BUILD Round-up

Where do Silverlight and .NET fit into Windows 8?Silverlight & .NET

Page 25: SLUGUK BUILD Round-up

.NET Lives!Windows Phone

Silverlight 5

.NET Framework 4.5

.NET Profile for Metro style apps

Page 26: SLUGUK BUILD Round-up

The .NET Perspectiveusing Windows.Storage;using System;using System.IO;using System.Threading.Tasks; class Sample { static async Task WriteAsync(

StorageFolder wrtfolder, string filename, string text) {  var wrtFile = await wrtFolder.CreateFileAsync(filename);

var wrtStream = await wrtFile.OpenAsync(FileAccessMode.ReadWrite);

using (Stream stream = wrtStream.OpenWrite()) {

using (var writer = new StreamWriter(stream)) { writer.WriteLine(text); } } }}

Native namespace

Native type

Native method

C# feature

Managed argument passed

to native APIManaged type returned from a

seemingly native method

Page 27: SLUGUK BUILD Round-up

Removed, Replaced, Changed» System.Web» System.Data» System.Runtime.Remoting» Private reflection» Application Domains

Page 28: SLUGUK BUILD Round-up

Removed, Replaced, ChangedCurrent Windows Runtime

System.Windows Windows.UI.Xaml

System.Security.IsolatedStorage

Windows.Storage.ApplicationData

System.Resources Windows.ApplicationModel.Resources

System.Net.Sockets Windows.Networking.Sockets

System.Net.WebClient Windows.Networking.BackgroundTransferandSystem.Net.HttpClient

Page 29: SLUGUK BUILD Round-up

Removed, Replaced, ChangedCurrent Windows Runtime

Serialization Use Data Contract for general serialization Use XML serialization for fine control

Reflection System.Type now represents a type reference System.Reflection.TypeInfo is the new

System.Type

XML XML Linq is the main XML parser Use XmlReader/Writer as a low-level abstraction

Collections Non-generic collections are gone New collection abstractions added:

IReadOnlyList<T>

Threading Sychronization primitives mainly unchanged Thread control in Windows.Foundation.Threading Task.Run is the new high level way of doing

background processing

Async Async everywhere

Page 30: SLUGUK BUILD Round-up

Anything Else?

» xmlnsxmlns:local="clr-namespace:<namespace>;assembly=MyAssembly>"

» DispatcherDispatcher.BeginInvoke( (s, a) => { … });

» Async// Lots of convoluted code

» xmlnsxmlns:local="using:<namespace>;"

» DispatcherDispatcher.Invoke( CoreDispatcherPriority.Normal, (s, a) => { … }, this, null);

» Asyncvar x = await foo.DoAsync();

Page 31: SLUGUK BUILD Round-up

So, is Silverlight dead or not?

Summary

Page 32: SLUGUK BUILD Round-up

Predictions» Windows 8 will have multiple SKUs

with and without the Desktop and Metro shell

» The next major update to Windows Phone will move to Windows Runtime

» HTML5 + JavaScript is the next “big thing”

» There won’t be another major update to Silverlight (beyond v5) or WPF

» But … XAML isn’t going anywhereDisclaimer: These are my personal thoughts and opinions and are not based on any insider information, neither do they necessarily reflect the opinions of anyone else, let alone my employer.

Page 33: SLUGUK BUILD Round-up

Resources» Metro from the Trenches

http://metrotrenches.wordpress.com» Windows Dev Center

http://dev.windows.com» Windows Dev Forums

http://forums.dev.windows.com

Page 34: SLUGUK BUILD Round-up

Parting Thoughts» “this is the most excited I've been

about Microsoft for 5 years” - Robby Ingebretsen

» “Microsoft is really investing in user experience” - Laurent Bugnion

» “The new Windows 8 Start screen isn’t just a good idea, it’s a great interface that will make sense on phones, tablets, PCs of all stripes, and even servers. And before you know it, you’ll forget all about that old-fashioned Start menu.” – Paul Thurrott

Page 35: SLUGUK BUILD Round-up

Q & A

What do you want to know?