38
Silverlight 2 CoreCLR Andrew Pardoe Program Manager CLR Execution Engine Andrew.Pardoe@microsoft. com

Silverlight 2 CoreCLR

  • Upload
    lanai

  • View
    44

  • Download
    2

Embed Size (px)

DESCRIPTION

Silverlight 2 CoreCLR. Andrew Pardoe Program Manager CLR Execution Engine [email protected]. Why Silverlight?. Rich interactive applications Web deployment gives broad reach Windows, Mac OS X, Linux IE, Firefox, Safari, Konquerer Sandboxing provides security - PowerPoint PPT Presentation

Citation preview

Slide 1

Silverlight 2 CoreCLRAndrew PardoeProgram ManagerCLR Execution [email protected]

4/14/2008 10:58 AM 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

1Why Silverlight?Rich interactive applicationsWeb deployment gives broad reachWindows, Mac OS X, LinuxIE, Firefox, Safari, KonquererSandboxing provides security

Productive design and developmentReusable knowledge (XAML & .NET)Best developer tools in the industrySeparate design and development

4/14/2008 10:58 AM 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

2Non-Windows platformsMac OS X 10.4+Silverlight 1.0 supports all hardwareSilverlight 2 supports Intel MacMac is fully supported by Microsoft

Major Linux distributionsMoonlight runtime implemented by MonoFull cooperation of MicrosoftAccess to documentation and testsLegal covenant protecting Mono users

4/14/2008 10:58 AM 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

3Silverlight securitySandboxed applicationsNo user elevation or security prompts within the browserjust click a URLApplications prevented from doing malicious things

Limited local interactionSafe isolated storageClient based file upload controlsCross domain networking support

Code-behindSilverlight code-behind modelCode lives behind the pageUpdating the code doesnt change the design

Productive design and developmentReusable knowledge (XAML & .NET)Best developer tools in the industrySeparate design and development

4/14/2008 10:58 AM 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

5DesignersDesigners and developers are different.

4/14/2008 10:58 AM 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

6DevelopersDevelopers work from the inside outward.

4/14/2008 10:58 AM 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

7Getting started

4/14/2008 10:58 AM 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

8What you needSilverlight 2 Beta 1

NotepadNo SDK required, everything is text

A better optionSilverlight Tools for Visual Studio 2008Expression Blend 2.5 March Preview

Everything you need is onlinehttp://www.silverlight.net

From XAML to Silverlight

4/14/2008 10:58 AM 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

10From XAML to Silverlight

4/14/2008 10:58 AM 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

11.NET is a desktop technology. Why use it on the web?Developers, developers, developers!Performance and expressivenessSilverlight lets you use what you already knowC#, VB, JScriptSilverlight CoreCLR supports all .NET languagesSL2 DLR adds popular dynamic languages like IronPython and IronRubyWhy CoreCLR?4/14/2008 10:58 AM 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

12CoreCLR builds from same source code as the desktop CLR100% compatible execution environmentMuch smaller package4.3 MB download for SL2 Beta 1Whats different in CoreCLR? Well look at the desktop CLR and compare it to CoreCLR

Why CoreCLR?4/14/2008 10:58 AM 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

13Overview of Silverlight 2

Browser hosts through ActiveXPresentation Core

UI CoreJS InteropInputs, Controls,Media, DRM CoreCLRBCLDLRThe CLR is simple, right?MSIL + MetadataWrite a program in .NETC# sourceRuns with Base Class LibraryRunning code loads the CLR EEManaged protected environmentCompile to MSIL executable Layout objects in memoryJIT produces native codeVM & GCCode + .NET15 Notes

What's different in CoreCLR?Small size allows on-demand installFewer scenarios than desktop CLRSandboxed codeSmaller Base Class LibraryOnly hosted by ActiveX controlsSupported on Intel Apple Mac OS XWhat's the same?Dynamic Language RuntimeExecution engineJIT compilerGarbage collectorVirtual machineNew security modelSecurity Transparency replaces Code Access SecurityTransparency may be supported in desktopNot just C# and VB (C++/CLI, F#)AdaCobolEiffelForthFortranNemerleLispPerlPascalmany moreProgram in any .NET language

4/14/2008 10:58 AM 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

18All statically compiled

4/14/2008 10:58 AM 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

19DLR adds popular web languagesDLR creates MSIL at runtimeBuilt on a message-passing systemObjects respond to messagesBehavior based on language semanticsMessages converted to MSILBuilt on dynamic method dispatch and dynamic type systemMessages are bound to methodsDynamic types are CLR types

Dynamic Languages4/14/2008 10:58 AM 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

20

DLR Consoledemo4/14/2008 10:58 AM 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

21Local file system accessOpenFileDialog for read-only local file system accessIsolatedStorageFile provides storageDefine the scope with a using directive Exiting scope disposes file objects

Simplified Base Class LibraryWeb-hosting reduces scenariosClick-time install reduces sizeSimplified BCL is based on .NET CFNon-generic collections removedLocalization culture information from OSBackgroundWorker for most threadingSee BCL team blog for more detailsGuidance available to help port existing .NET code to Silverlights smaller BCL

Objects, versioning and bindingVersioning and binding are transparentActiveX host loads CoreCLR, creates appdomain and applies policiesFull access to XAML and HTML DOMsXAML can be written dynamicallyJavascript objects and DOM elements wrapped in managed wrappersAppdomains and processes

SL 2 app in separate browserSL 1.0: XAML and JavascriptDifferent browsergets new CoreCLRSL 2 with shared CoreCLR Another SL 2 app shares same CoreCLRBrowser tabs share a single CoreCLRYou need a CLR to run managed codeCould use the CLR on Windowsbut changing code changes behaviorCoreCLR runs in-process with CLRManaged browsers can host SLMultiple CoreCLRs in-process100% Silverlight compatibility no matter what CLR is already on your machine

Which CLR runs my code?4/14/2008 10:58 AM 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

26

CoreCLR and CLR side-by-sidedemo4/14/2008 10:58 AM 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

27Native code generationSame JIT on Mac and WindowsNo NGen in Silverlight 2

Intel Mac supportCoreCLR runs on Mac OS X 10.4+Only supported on Intel MacsCoreCLR, Base Class Libraries and other platform assembliesMac OS X 10.4+(Intel)Windows(32-bit)Platform Adaptation Layer Execution engine is the sameSame execution engine as CLRCore functionality: JIT, GCVirtual machine: EH, threadingSimplified security modelCAS is gone!Transparent, Safe Critical and CriticalAll user code is transparentSecurity Transparency ModelNo more evidence, permissions, policy levels or code groupsNo more complicated documentationNo more stackwalks for code access -Transparent code can call public methods, use public types and override methodsIf its platform or same applications codeIf its Safe Critical or Transparent securitySecurity Transparency exampleWINAPI CreateFile (Critical code) creates file without any validationUser code(transparent)wants to write a fileSystem.IO.IsolatedStorageFile StreamWriter (SafeCritical code)verifies the request and calls Windows APISilverlight is simple, right?MSIL + MetadataUse same .NET skillsC# sourceWeb has simpler scenariosCode uses smaller BCLSame CLR means no surprisesDLR adds new languagesSame CoreCLR on any hostSecurity Transparency is easyVM & GCCode + .NET33 Notes

Woodgrove Financialdemo4/14/2008 10:58 AM 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

34

Chess: Javascriptvs. CoreCLRdemo4/14/2008 10:58 AM 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

35

Questions?Q&A4/14/2008 10:58 AM 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

36

Shawn Farkas blog on CLR securityhttp://blogs.msdn.com/shawnfa

Silverlight Get Startedhttp://silverlight.net/GetStarted

BCL team bloghttp://blogs.msdn.com/bclteamResources

Where to find these slideshttp://blogs.msdn.com/apardoe 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.4/14/2008 10:58 AM 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

38