.Net Framework Joel Pereira (joelcdp@microsoft.com) Software Design Engineer WinFS API Team Microsoft Corporation
Agenda <ul><li>Part I - Fundamentals </li></ul><ul><ul><li>Programming Models </li></ul></ul><ul><ul><li>Design Goals and ...
Unify Programming Models Windows API .NET Framework Consistent API availability regardless of language and programming mod...
Make It Simple To Use <ul><li>Organization </li></ul><ul><ul><li>Code organized in hierarchical namespaces and classes </l...
How Much Simpler? HWND hwndMain = CreateWindowEx( 0, &quot;MainWClass&quot;, &quot;Main Window&quot;, WS_OVERLAPPEDWINDOW ...
Hello World Demo <ul><li>What you need </li></ul>
Agenda <ul><li>Part I - Fundamentals </li></ul><ul><ul><li>Programming Models </li></ul></ul><ul><ul><li>Design Goals and ...
Common Language Runtime Design Goals <ul><li>Dramatically simplifies development and deployment </li></ul><ul><li>Unifies ...
Architectural Overview Common Language Runtime Framework Class loader and layout GC, stack walk, code manager Base Classes...
Compilation And Execution Source Code Compilation At installation or the first time each method is called Code (IL) Metada...
Languages <ul><li>The CLR is Language Neutral </li></ul><ul><ul><li>All languages are first class players </li></ul></ul><...
Hello World Demo <ul><li>What you need </li></ul><ul><li>MSIL </li></ul>
Agenda <ul><li>Part I - Fundamentals </li></ul><ul><ul><li>Programming Models </li></ul></ul><ul><ul><li>Design Goals and ...
Component-Based Programming <ul><li>3 core technologies make building and  using components easy </li></ul><ul><ul><li>Typ...
Type Safety <ul><li>Type safety ensures that objects are used the way they were intended to be used </li></ul><ul><ul><li>...
Automatic Memory Management <ul><li>The CLR tracks the code’s use of objects and ensures </li></ul><ul><ul><li>Objects are...
Metadata <ul><li>Set of data tables embedded in an EXE/DLL </li></ul><ul><ul><li>The tables describe what is defined in th...
Metadata:  Creation And Use Metadata (and code) Debugger Schema  Generator Profiler Compilers Proxy Generator Type Browser...
Runtime Execution Model Class Loader CPU Managed Native Code Assembly First call to method First reference  to  type Assem...
JIT Compiler - Inline
Standardization <ul><li>A subset of the .NET Framework and C# submitted to ECMA </li></ul><ul><ul><li>ECMA and ISO Interna...
Rotor (SSCLI)  <ul><li>Shared-Source version of the CLR+BCL+C# compiler </li></ul><ul><li>Ports available: Windows, FreeBS...
Developer Roadmap <ul><li>“ Orcas” release </li></ul><ul><li>Windows “Longhorn” integration </li></ul><ul><li>New UI tools...
Agenda <ul><li>Part I - Fundamentals </li></ul><ul><ul><li>Design Goals  </li></ul></ul><ul><ul><li>Architecture </li></ul...
SQL Server Integration Design  Goal <ul><li>Bring framework programming model into the database tier </li></ul><ul><li>All...
SQL CLR Functionality  VS .NET Project CLR hosted by SQL (in-proc) Define Location.Distance() Assembly: geom.dll VB, C#, …...
Sql Programming Model  Splitting a string <ul><li>The old way….  </li></ul>declare @str varchar(200) select @Str = 'Micros...
Sql Programming Model    Splitting a string Public Shared Sub SplitString() Dim s As String s = &quot;Microsoft Corporatio...
Moving to 64 bit <ul><li>64 bit for Servers and workstations </li></ul><ul><ul><li>X64 and IA64 bit support </li></ul></ul...
Agenda <ul><li>Part I - Fundamentals </li></ul><ul><ul><li>Design Goals  </li></ul></ul><ul><ul><li>Architecture </li></ul...
Performance <ul><li>Objectives: make .NET an even greater programming platform </li></ul><ul><ul><li>Long-Term: make the p...
Performance everywhere <ul><li>New, Performant APIs </li></ul><ul><li>APIs for faster resource lookup </li></ul><ul><li>Li...
TryParse
RAD Debugging <ul><li>Edit and Continue: Edit Code at runtime </li></ul><ul><ul><li>Allowed Edits: Examples </li></ul></ul...
CLR Security <ul><li>New cryptography support </li></ul><ul><ul><li>PKI and PKCS7 support </li></ul></ul><ul><ul><li>XML e...
Agenda <ul><li>Part I - Fundamentals </li></ul><ul><ul><li>Design Goals  </li></ul></ul><ul><ul><li>Architecture </li></ul...
Generics <ul><li>Why generics? </li></ul><ul><ul><li>Compile-time type checking </li></ul></ul><ul><ul><li>Performance (no...
Enhancing The Base Library Other Generics to look out for <ul><li>Nullable( Of T ) </li></ul><ul><ul><li>Extremely useful ...
Whidbey Tracing Features <ul><li>Pluggable Formatters </li></ul><ul><li>Pre-Whidbey  : Formatting of Trace information was...
Whidbey Tracing Features <ul><li>Auto-generated Data </li></ul><ul><li>Pre-Whidbey  : Standard information such as timesta...
Whidbey Tracing Features <ul><li>Listener Filtering </li></ul><ul><li>Pre-Whidbey  : Formatting of Trace information was p...
MemoryPressure
Attend a free chat or web cast http://www.microsoft.com/communities/chats/default.mspx   http://www.microsoft.com/usa/webc...
Resources <ul><li>BCL Blog </li></ul><ul><li>http://weblogs.asp.net/bclteam </li></ul><ul><li>BCL Website </li></ul><ul><l...
Q & A:  DIVYA RATHORE
Upcoming SlideShare
Loading in …5
×

Runtime Environment Of .Net Divya Rathore

895 views

Published on

Published in: Business, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
895
On SlideShare
0
From Embeds
0
Number of Embeds
9
Actions
Shares
0
Downloads
9
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Runtime Environment Of .Net Divya Rathore

    1. 1. .Net Framework Joel Pereira (joelcdp@microsoft.com) Software Design Engineer WinFS API Team Microsoft Corporation
    2. 2. Agenda <ul><li>Part I - Fundamentals </li></ul><ul><ul><li>Programming Models </li></ul></ul><ul><ul><li>Design Goals and Architecture </li></ul></ul><ul><ul><li>CLR Services </li></ul></ul><ul><li>Part II – Visual Studio 2005 </li></ul><ul><ul><li>Extending the Platform </li></ul></ul><ul><ul><li>Improving the Platform </li></ul></ul><ul><ul><li>Innovation in the Platform </li></ul></ul>
    3. 3. Unify Programming Models Windows API .NET Framework Consistent API availability regardless of language and programming model ASP Stateless, Code embedded in HTML pages MFC/ATL Subclassing, Power, Expressiveness VB Forms RAD, Composition, Delegation
    4. 4. Make It Simple To Use <ul><li>Organization </li></ul><ul><ul><li>Code organized in hierarchical namespaces and classes </li></ul></ul><ul><li>Unified type system </li></ul><ul><ul><li>Everything is an object, no variants, one string type, all character data is Unicode </li></ul></ul><ul><li>Component Oriented </li></ul><ul><ul><li>Properties, methods, events, and attributes are first class constructs </li></ul></ul><ul><ul><li>Design-time functionality </li></ul></ul>
    5. 5. How Much Simpler? HWND hwndMain = CreateWindowEx( 0, &quot;MainWClass&quot;, &quot;Main Window&quot;, WS_OVERLAPPEDWINDOW | WS_HSCROLL | WS_VSCROLL, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, (HWND)NULL, (HMENU)NULL, hInstance, NULL); ShowWindow(hwndMain, SW_SHOWDEFAULT); UpdateWindow(hwndMain); Form form = new Form(); form.Text = &quot;Main Window&quot;; form.Show(); Windows API .NET Framework
    6. 6. Hello World Demo <ul><li>What you need </li></ul>
    7. 7. Agenda <ul><li>Part I - Fundamentals </li></ul><ul><ul><li>Programming Models </li></ul></ul><ul><ul><li>Design Goals and Architecture </li></ul></ul><ul><ul><li>CLR Services </li></ul></ul><ul><li>Part II – Visual Studio 2005 </li></ul><ul><ul><li>Extending the Platform </li></ul></ul><ul><ul><li>Improving the Platform </li></ul></ul><ul><ul><li>Innovation in the Platform </li></ul></ul>
    8. 8. Common Language Runtime Design Goals <ul><li>Dramatically simplifies development and deployment </li></ul><ul><li>Unifies programming models </li></ul><ul><li>Provides robust and secure execution environment </li></ul><ul><li>Supports multiple programming languages </li></ul>
    9. 9. Architectural Overview Common Language Runtime Framework Class loader and layout GC, stack walk, code manager Base Classes IL to native code compilers Security Execution Support
    10. 10. Compilation And Execution Source Code Compilation At installation or the first time each method is called Code (IL) Metadata Assembly Language Compiler Execution JIT Compiler Native Code
    11. 11. Languages <ul><li>The CLR is Language Neutral </li></ul><ul><ul><li>All languages are first class players </li></ul></ul><ul><ul><li>You can leverage your existing skills </li></ul></ul><ul><li>Common Language Specification </li></ul><ul><ul><li>Set of features guaranteed to be in all languages </li></ul></ul><ul><li>We are providing </li></ul><ul><ul><li>VB, C++, C#, J#, JScript </li></ul></ul><ul><li>Third-parties are building </li></ul><ul><ul><li>APL, COBOL, Pascal, Eiffel, Haskell, ML, Oberon, Perl, Python, Scheme, Smalltalk… </li></ul></ul>
    12. 12. Hello World Demo <ul><li>What you need </li></ul><ul><li>MSIL </li></ul>
    13. 13. Agenda <ul><li>Part I - Fundamentals </li></ul><ul><ul><li>Programming Models </li></ul></ul><ul><ul><li>Design Goals and Architecture </li></ul></ul><ul><ul><li>CLR Services </li></ul></ul><ul><li>Part II – Visual Studio 2005 </li></ul><ul><ul><li>Extending the Platform </li></ul></ul><ul><ul><li>Improving the Platform </li></ul></ul><ul><ul><li>Innovation in the Platform </li></ul></ul>
    14. 14. Component-Based Programming <ul><li>3 core technologies make building and using components easy </li></ul><ul><ul><li>Type safety </li></ul></ul><ul><ul><li>Automatic memory management </li></ul></ul><ul><ul><li>Metadata </li></ul></ul><ul><li>This greatly simplifies application development </li></ul>
    15. 15. Type Safety <ul><li>Type safety ensures that objects are used the way they were intended to be used </li></ul><ul><ul><li>Prevents an object’s state from being corrupted </li></ul></ul><ul><li>The CLR enforces type safety </li></ul><ul><ul><li>Attempting to coerce an object to an incompatible type causes the CLR to throw an exception </li></ul></ul><ul><li>Type safety means code confidence </li></ul><ul><ul><li>Common programmer errors will be found immediately </li></ul></ul><ul><ul><ul><li>Rectangle(hwnd, 0, 0, 10, 10); </li></ul></ul></ul><ul><ul><ul><ul><li>//hwnd should be an hdc </li></ul></ul></ul></ul><ul><ul><ul><li>MessageBox(hwnd, “”, “”, IDOK); </li></ul></ul></ul><ul><ul><ul><ul><li>//IDOK should be MB_OK </li></ul></ul></ul></ul>
    16. 16. Automatic Memory Management <ul><li>The CLR tracks the code’s use of objects and ensures </li></ul><ul><ul><li>Objects are not freed while still in use (no memory corruption) </li></ul></ul><ul><ul><li>Objects are freed when no longer in use (no memory leaks) </li></ul></ul><ul><li>Code is easier to write because there is no question as to which component is responsible to free an object </li></ul><ul><ul><li>When passed a buffer, who frees it: caller or callee? </li></ul></ul><ul><li>Each process has 1 heap used by all components </li></ul><ul><ul><li>Objects can’t be allocated from different heaps </li></ul></ul><ul><ul><li>You don’t have to know which heap memory was allocated in or which API to call to free the memory </li></ul></ul><ul><ul><ul><li>In fact, there is no API to free memory, the GC does it </li></ul></ul></ul>
    17. 17. Metadata <ul><li>Set of data tables embedded in an EXE/DLL </li></ul><ul><ul><li>The tables describe what is defined in the file (Type, fields, methods, etc.) </li></ul></ul><ul><li>Every component’s interface is described by metadata tables </li></ul><ul><ul><li>A component’s implementation is described by Intermediate Language </li></ul></ul><ul><li>The existence of metadata tables enables many features </li></ul><ul><ul><li>No header files </li></ul></ul><ul><ul><li>Visual Studio’s IntelliSense </li></ul></ul><ul><ul><li>Components don’t have to be registered in the registry </li></ul></ul><ul><ul><li>Components don’t need separate IDL or TLB files </li></ul></ul><ul><ul><li>The GC knows when an object’s fields refer to other objects </li></ul></ul><ul><ul><li>An object’s fields can be automatically serialized/deserialized </li></ul></ul><ul><ul><li>At runtime, an application can determine what types are in a file and what members the type defines (also known as late binding) </li></ul></ul><ul><ul><li>Components can be written/used by different languages </li></ul></ul>
    18. 18. Metadata: Creation And Use Metadata (and code) Debugger Schema Generator Profiler Compilers Proxy Generator Type Browser Compiler Source Code XML encoding (SDL or SUDS) Serialization Designers Reflection TLB Exporter
    19. 19. Runtime Execution Model Class Loader CPU Managed Native Code Assembly First call to method First reference to type Assembly Resolver First reference to Assembly IL to native conversion
    20. 20. JIT Compiler - Inline
    21. 21. Standardization <ul><li>A subset of the .NET Framework and C# submitted to ECMA </li></ul><ul><ul><li>ECMA and ISO International Standards </li></ul></ul><ul><ul><li>Co-sponsored with Intel, Hewlett-Packard </li></ul></ul><ul><li>Common Language Infrastructure </li></ul><ul><ul><li>Based on Common Language Runtime and Base Framework </li></ul></ul><ul><ul><li>Layered into increasing levels of functionality </li></ul></ul>
    22. 22. Rotor (SSCLI) <ul><li>Shared-Source version of the CLR+BCL+C# compiler </li></ul><ul><li>Ports available: Windows, FreeBSD, OSX, etc </li></ul><ul><li>Real product code offers real world learning </li></ul><ul><li>http://sscli.org </li></ul>
    23. 23. Developer Roadmap <ul><li>“ Orcas” release </li></ul><ul><li>Windows “Longhorn” integration </li></ul><ul><li>New UI tools and designers </li></ul><ul><li>Extensive managed interfaces </li></ul>Visual Studio Orcas “Longhorn” Visual Studio .NET 2003 <ul><li>“ Everett Release” </li></ul><ul><li>Windows Server 2003 integration </li></ul><ul><li>Support for .NET Compact Framework and device development </li></ul><ul><li>Improved performance </li></ul>Visual Studio 2005 “Yukon” <ul><li>“ Whidbey” release </li></ul><ul><li>SQL Server integration </li></ul><ul><li>Improved IDE productivity and community support </li></ul><ul><li>Extended support for XML Web services </li></ul><ul><li>Office programmability </li></ul>
    24. 24. Agenda <ul><li>Part I - Fundamentals </li></ul><ul><ul><li>Design Goals </li></ul></ul><ul><ul><li>Architecture </li></ul></ul><ul><ul><li>CLR Services </li></ul></ul><ul><li>Part II – Visual Studio 2005 </li></ul><ul><ul><li>Extending the Platform </li></ul></ul><ul><ul><li>Improving the Platform </li></ul></ul><ul><ul><li>Innovation in the Platform </li></ul></ul>
    25. 25. SQL Server Integration Design Goal <ul><li>Bring framework programming model into the database tier </li></ul><ul><li>Allow business logic to easily migrate to the most appropriate tier </li></ul><ul><li>Enable safe database extensions </li></ul><ul><li>Result: Stored Procedures, Triggers, data types defined in managed code </li></ul>
    26. 26. SQL CLR Functionality VS .NET Project CLR hosted by SQL (in-proc) Define Location.Distance() Assembly: geom.dll VB, C#, … Build SQL Server SQL Data Definition: create assembly … create function … create procedure … create trigger … create type … SQL Queries: SELECT name FROM Supplier WHERE Location.Distance ( @point ) < 3
    27. 27. Sql Programming Model Splitting a string <ul><li>The old way…. </li></ul>declare @str varchar(200) select @Str = 'Microsoft Corporation|SQL Server|2003|SQL-CLR|2002-08-20|11:32:00|Document|3.b.3' SELECT substring(@Str + '|', 0 + 1, charindex('|', @Str + '|', 0 + 1) - 0 - 1 ), substring(@Str + '|', charindex('|', @Str + '|') + 1, charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) - charindex('|', @Str + '|') - 1 ), substring(@Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1, charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) - charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) - 1 ), substring(@Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1, charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) - charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) - 1 ), substring(@Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1, charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) - charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) - 1 ), substring(@Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1, charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) - charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) - 1 ), substring(@Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + 1, charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + 1) - charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) - 1 ), substring(@Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + 1) + 1, charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + 1) + 1) - charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + 1) - 1 ) T-SQL declare @str varchar(200) select @Str = 'Microsoft Corporation|SQL Server|2003|SQL-CLR|2002-08-20|11:32:00|Document|3.b.3' SELECT substring(@Str + '|', 0 + 1, charindex('|', @Str + '|', 0 + 1) - 0 - 1 ), substring(@Str + '|', charindex('|', @Str + '|') + 1, charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) - charindex('|', @Str + '|') - 1 ), substring(@Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1, charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) - charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) - 1 ), substring(@Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1, charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) - charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) - 1 ), substring(@Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1, charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) - charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) - 1 ), substring(@Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1, charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) - charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) - 1 ), substring(@Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + 1, charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + 1) - charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) - 1 ), substring(@Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + 1) + 1, charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + 1) + 1) - charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + 1) - 1 )
    28. 28. Sql Programming Model Splitting a string Public Shared Sub SplitString() Dim s As String s = &quot;Microsoft Corporation|SQL Server|2003|SQL-CLR|2002-08- 20|11:32:00|Document|3.b.3&quot; Dim myArray() As String = Split(s, &quot;|&quot;) End Sub <ul><li>The new way…. </li></ul>VB
    29. 29. Moving to 64 bit <ul><li>64 bit for Servers and workstations </li></ul><ul><ul><li>X64 and IA64 bit support </li></ul></ul><ul><ul><li>Enable Yukon and ASP.NET </li></ul></ul><ul><li>Verifiable managed binaries just run! </li></ul><ul><li>VS: Runs as a 32bit application </li></ul><ul><ul><li>You can develop, deploy, and debug 32 and 64bit applications </li></ul></ul>
    30. 30. Agenda <ul><li>Part I - Fundamentals </li></ul><ul><ul><li>Design Goals </li></ul></ul><ul><ul><li>Architecture </li></ul></ul><ul><ul><li>CLR Services </li></ul></ul><ul><li>Part II – Visual Studio 2005 </li></ul><ul><ul><li>Extending the Platform </li></ul></ul><ul><ul><li>Improving the Platform </li></ul></ul><ul><ul><li>Innovation in the Platform </li></ul></ul>
    31. 31. Performance <ul><li>Objectives: make .NET an even greater programming platform </li></ul><ul><ul><li>Long-Term: make the performance characteristics of the CLR similar to native code </li></ul></ul><ul><ul><li>Reduce marginal cost of additional managed processes </li></ul></ul><ul><ul><li>Reduce startup time and working set </li></ul></ul><ul><li>NGen </li></ul><ul><ul><li>Compiles IL code to native code, saving results to disk </li></ul></ul><ul><ul><li>Advantages: no need to recompile IL to native code, and class layout already set so better startup time </li></ul></ul><ul><ul><li>Whidbey: Significant reductions in the amount of private, non-shareable working set </li></ul></ul><ul><ul><li>OS: ‘no-Jit’ plan, all managed code will be NGened </li></ul></ul>
    32. 32. Performance everywhere <ul><li>New, Performant APIs </li></ul><ul><li>APIs for faster resource lookup </li></ul><ul><li>Lightweight CodeGen: only generates essential code (contrast to Reflect Emit) </li></ul><ul><li>Existing APIs Improved </li></ul><ul><li>Cross AppDomain Remoting </li></ul><ul><li>Between 1.1 and 200x faster. Biggest gains for simpler items (strings, integers, serializable objects) </li></ul><ul><li>Delegate invoke performance has more than doubled </li></ul><ul><li>AppDomain Footprints: significantly reduced </li></ul><ul><li>UTF8Encoding: translation is 2.5x faster </li></ul>
    33. 33. TryParse
    34. 34. RAD Debugging <ul><li>Edit and Continue: Edit Code at runtime </li></ul><ul><ul><li>Allowed Edits: Examples </li></ul></ul><ul><ul><li>Add private fields to a class </li></ul></ul><ul><ul><li>Add private non-virtual methods to a class </li></ul></ul><ul><ul><li>Change a function body, even while stepping </li></ul></ul><ul><ul><li>Disallowed Edits: Examples </li></ul></ul><ul><ul><li>Removing fields/methods </li></ul></ul><ul><ul><li>Edits to generic classes </li></ul></ul><ul><ul><li>Serialization will not recognize new fields </li></ul></ul><ul><li>Display Attributes for a better debugging experience </li></ul>
    35. 35. CLR Security <ul><li>New cryptography support </li></ul><ul><ul><li>PKI and PKCS7 support </li></ul></ul><ul><ul><li>XML encryption support </li></ul></ul><ul><ul><li>Enhanced support for X509 certificates </li></ul></ul><ul><li>Enhanced Application Security </li></ul><ul><ul><li>Permission Calculator </li></ul></ul><ul><ul><ul><li>Integration with ClickOnce </li></ul></ul></ul><ul><ul><li>Better SecurityException </li></ul></ul><ul><ul><li>Debug-In-Zone </li></ul></ul><ul><li>Managed ACL Support </li></ul>
    36. 36. Agenda <ul><li>Part I - Fundamentals </li></ul><ul><ul><li>Design Goals </li></ul></ul><ul><ul><li>Architecture </li></ul></ul><ul><ul><li>CLR Services </li></ul></ul><ul><li>Part II – Visual Studio 2005 </li></ul><ul><ul><li>Extending the Platform </li></ul></ul><ul><ul><li>Improving the Platform </li></ul></ul><ul><ul><li>Innovation in the Platform </li></ul></ul>
    37. 37. Generics <ul><li>Why generics? </li></ul><ul><ul><li>Compile-time type checking </li></ul></ul><ul><ul><li>Performance (no boxing, no downcasts) </li></ul></ul><ul><ul><li>Reduced code bloat (typed collections) </li></ul></ul><ul><li>VB, C#, MC++ produce & consume generics </li></ul><ul><li>Use generics freely in internal APIs </li></ul><ul><li>Consider using generics in public APIs </li></ul><ul><ul><li>Generics are not yet in CLS </li></ul></ul><ul><ul><li>To be CLS compliant, provide a non-generic API alternative </li></ul></ul><ul><li>Microsoft is actively pursuing standardization of generics in runtime and languages </li></ul>
    38. 38. Enhancing The Base Library Other Generics to look out for <ul><li>Nullable( Of T ) </li></ul><ul><ul><li>Extremely useful for situations where null is a value, such as database valuetypes </li></ul></ul><ul><li>EventHandler <T> </li></ul><ul><ul><li>Saves on making your own EventHandlers </li></ul></ul>Dim intVal as Nullable( Of Integer ) = 5 If intVal.HasValue Then ‘ checks for a value delegate void EventHandler <T> ( Object sender, T e) where T : EventArgs ;
    39. 39. Whidbey Tracing Features <ul><li>Pluggable Formatters </li></ul><ul><li>Pre-Whidbey : Formatting of Trace information was predefined, and not controllable </li></ul><ul><li>Whidbey : Predefined formatters (delimiter, xml) added, and you can make your own </li></ul><ul><li>MySource;Error;13;Wrong key;;;;;;318361290184; </li></ul><ul><li>Additional Listeners </li></ul><ul><li>Pre-Whidbey : No Console listener, ASP had their own tracing mechanism </li></ul><ul><li>Whidbey : Added Console listener. Integrated ASP tracing into our own, and added ETW listener </li></ul>
    40. 40. Whidbey Tracing Features <ul><li>Auto-generated Data </li></ul><ul><li>Pre-Whidbey : Standard information such as timestamp or callstack would have to be explicitly generated </li></ul><ul><li>Whidbey : An Admin can easily generate this data automatically, via config settings </li></ul><ul><li>< listeners > </li></ul><ul><li>< add name =&quot;examplelog&quot; type = … </li></ul><ul><li>Simple Thread Identification </li></ul><ul><li>Pre-Whidbey : specific threads were difficult to identify, and filter on </li></ul><ul><li>Whidbey : Correlation ID has been added, which allows quick and easy identification of a thread, and simple subsequent filtering </li></ul>
    41. 41. Whidbey Tracing Features <ul><li>Listener Filtering </li></ul><ul><li>Pre-Whidbey : Formatting of Trace information was predefined, and not controllable </li></ul><ul><li>Whidbey : Assign filtering to listeners, so only certain messages are traced. This allows filtering on any property of a message. E.g., ID, TimeStamp, etc. </li></ul><ul><li>Switches </li></ul><ul><li>Pre-Whidbey : Couldn’t determine what tracing a component supported </li></ul><ul><li>Whidbey : Support the ability to determine what tracing mechanisms a component has </li></ul>
    42. 42. MemoryPressure
    43. 43. Attend a free chat or web cast http://www.microsoft.com/communities/chats/default.mspx http://www.microsoft.com/usa/webcasts/default.asp List of newsgroups http://communities2.microsoft.com/ communities/newsgroups/en-us/default.aspx MS Community Sites http://www.microsoft.com/communities/default.mspx Local User Groups http://www.msdnbrasil.com.br Community sites http://www.microsoft.com/communities/related/default.mspx
    44. 44. Resources <ul><li>BCL Blog </li></ul><ul><li>http://weblogs.asp.net/bclteam </li></ul><ul><li>BCL Website </li></ul><ul><li>http://www.gotdotnet.com/team/clr/bcl/default.aspx </li></ul><ul><li>BCL public mail alias </li></ul><ul><li>[email_address] </li></ul><ul><li>Reference </li></ul><ul><li>.NET Framework Standard Library Annotated Reference </li></ul><ul><li>Applied Microsoft .Net Framework Programming </li></ul>
    45. 45. Q & A: DIVYA RATHORE

    ×