Presentation is loading. Please wait.

Presentation is loading. Please wait.

Silverlight 2 CoreCLR Andrew Pardoe Program Manager CLR Execution Engine

Similar presentations


Presentation on theme: "Silverlight 2 CoreCLR Andrew Pardoe Program Manager CLR Execution Engine"— Presentation transcript:

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

2 Rich interactive applications Web deployment gives broad reach Windows, Mac OS X, Linux IE, Firefox, Safari, Konquerer Sandboxing provides security Productive design and development Reusable knowledge (XAML &.NET) Best developer tools in the industry Separate design and development

3 Mac OS X 10.4+ Silverlight 1.0 supports all hardware Silverlight 2 supports Intel Mac Mac is fully supported by Microsoft Major Linux distributions Moonlight runtime implemented by Mono Full cooperation of Microsoft Access to documentation and tests Legal covenant protecting Mono users

4 Sandboxed applications No user elevation or security prompts within the browser—just click a URL Applications prevented from doing malicious things Limited local interaction Safe isolated storage Client based file upload controls Cross domain networking support

5 Silverlight “code-behind” model Code lives behind the page Updating the code doesn’t change the design Productive design and development Reusable knowledge (XAML &.NET) Best developer tools in the industry Separate design and development

6 Designers and developers are different.

7 Developers work from the inside outward.

8 Getting started

9 Silverlight 2 Beta 1 Notepad No SDK required, everything is text A better option… Silverlight Tools for Visual Studio 2008 Expression Blend 2.5 March Preview Everything you need is online http://www.silverlight.net

10

11

12 .NET is a desktop technology. Why use it on the web? Developers, developers, developers! Performance and expressiveness Silverlight lets you use what you already know C#, VB, JScript—Silverlight CoreCLR supports all.NET languages SL2 DLR adds popular dynamic languages like IronPython and IronRuby

13 CoreCLR builds from same source code as the desktop CLR 100% compatible execution environment Much smaller package 4.3 MB download for SL2 Beta 1 What’s different in CoreCLR? We’ll look at the desktop CLR and compare it to CoreCLR

14 Browser hosts through ActiveX Presentation Core UI Core JS Interop Inputs, Controls, Media, DRM CoreCLR BCL DLR

15 MSIL + Metadata Write a program in.NET C# source Runs with Base Class Library Running code loads the CLR EE Managed protected environment Compile to MSIL executable Layout objects in memory JIT produces native code VM & GC Code +.NET

16 Small size allows on-demand install Fewer scenarios than desktop CLR Sandboxed code Smaller Base Class Library Only hosted by ActiveX controls Supported on Intel Apple Mac OS X

17 Dynamic Language Runtime Execution engine JIT compiler Garbage collector Virtual machine New security model Security Transparency replaces Code Access Security Transparency may be supported in desktop

18 Not just C# and VB (C++/CLI, F#) Ada Cobol Eiffel Forth Fortran Nemerle Lisp Perl Pascal many more

19

20 DLR adds popular web languages DLR creates MSIL at runtime Built on a message-passing system Objects respond to messages Behavior based on language semantics Messages converted to MSIL Built on dynamic method dispatch and dynamic type system Messages are bound to methods Dynamic types are CLR types

21 DLR Console DEMO

22 OpenFileDialog for read-only local file system access IsolatedStorageFile provides storage Define the scope with a using directive Exiting scope disposes file objects

23 Web-hosting reduces scenarios Click-time install reduces size Simplified BCL is based on.NET CF Non-generic collections removed Localization culture information from OS BackgroundWorker for most threading See BCL team blog for more details Guidance available to help port existing.NET code to Silverlight’s smaller BCL

24 Versioning and binding are transparent ActiveX host loads CoreCLR, creates appdomain and applies policies Full access to XAML and HTML DOMs XAML can be written dynamically Javascript objects and DOM elements wrapped in managed wrappers

25 SL 2 app in separate browser SL 1.0: XAML and Javascript Different browser gets new CoreCLR SL 2 with shared CoreCLR Another SL 2 app shares same CoreCLR Browser tabs share a single CoreCLR

26 You need a CLR to run managed code Could use the CLR on Windows… …but changing code changes behavior CoreCLR runs in-process with CLR Managed browsers can host SL Multiple CoreCLRs in-process 100% Silverlight compatibility no matter what CLR is already on your machine

27 CoreCLR and CLR side-by-side DEMO

28 Same JIT on Mac and Windows No NGen in Silverlight 2

29 CoreCLR runs on Mac OS X 10.4+ Only supported on Intel Macs CoreCLR, Base Class Libraries and other platform assemblies Mac OS X 10.4+ (Intel) Windows (32-bit) Platform Adaptation Layer

30 Same execution engine as CLR Core functionality: JIT, GC Virtual machine: EH, threading Simplified security model CAS is gone! Transparent, Safe Critical and Critical All user code is transparent

31 No more evidence, permissions, policy levels or code groups No more complicated documentation No more stackwalks for code access - Transparent code can call public methods, use public types and override methods… If it’s platform or same application’s code If it’s Safe Critical or Transparent security

32 WINAPI CreateFile (Critical code) creates file without any validation User code (transparent) wants to write a file System.IO.IsolatedStorageFile StreamWriter (SafeCritical code) verifies the request and calls Windows API

33 MSIL + Metadata Use same.NET skills C# source Web has simpler scenarios Code uses smaller BCL Same CLR means no surprises DLR adds new languages Same CoreCLR on any host Security Transparency is easy VM & GC Code +.NET

34 Woodgrove Financial DEMO

35 Chess: Javascript vs. CoreCLR DEMO

36 Questions? Q&A

37 Shawn Farkas’ blog on CLR security http://blogs.msdn.com/shawnfa Silverlight – Get Started http://silverlight.net/GetStarted BCL team blog http://blogs.msdn.com/bclteam http://blogs.msdn.com/bclteam Where to find these slides http://blogs.msdn.com/apardoe

38 © 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.


Download ppt "Silverlight 2 CoreCLR Andrew Pardoe Program Manager CLR Execution Engine"

Similar presentations


Ads by Google