SlideShare a Scribd company logo
Новости в .NET CLR 2.0 Светлин Наков Българска асоциация на разработчиците на софтуер
Developer Roadmap “ Orcas” release Windows “Longhorn” integration New UI tools and designers  Extensive managed interfaces Visual Studio Orcas “Longhorn” Visual Studio .NET 2003 “ Everett Release” Windows Server 2003 integration Support for .NET Compact Framework and device development  Improved performance Visual Studio 2005 “Yukon” “ Whidbey” release SQL Server integration Improved IDE productivity and community support Extended support for  XML Web services Office programmability
Agenda Extending the Platform SQL Server Integration Moving to 64 bit Improving the Platform Performance work RAD Debugging Security improvements Innovating in the Platform Generics support BCL Enhancements
SQL Server Integration Design  Goal Bring framework programming model into the database tier Allow business logic to easily migrate to the most appropriate tier Enable  safe  database extensions Result : Stored Procedures, Triggers, data types defined in managed code
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
Sql Programming Model  Splitting a string The old way….  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 ), … 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 )
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 The new way….  VB.NET
Moving to 64 bit 64 bit for Servers and workstations X64 and IA64 bit support Enable SQL Server 2005 and ASP.NET Verifiable managed binaries just run! Support for WoW64 Enables 32bit apps to run on 64 bit machines 1.0 and 1.1 apps always run in the WoW VS: Runs as a 32bit application You can develop, deploy, and debug 32 and 64bit applications
Performance Objectives: make .NET an even greater programming platform Long-Term: make the performance characteristics of the CLR similar to native code Reduce marginal cost of additional managed processes Reduce startup time and working set NGen Compiles IL code to native code, saving results to disk Advantages: no need to recompile IL to native code, and class layout already set so better startup time VS 2005: Significant reductions in the amount of private, non-shareable working set OS: ‘no-Jit’ plan, all managed code will be NGened
Performance everywhere New, Performant APIs APIs for faster resource lookup Lightweight CodeGen: only generates essential code (contrast to Reflect Emit) Existing APIs Improved Cross AppDomain Remoting Between 1.1 and 200x faster. Biggest gains for simpler items (strings, integers, serializable objects) Delegate invoke performance has more than doubled AppDomain Footprints: significantly reduced UTF8Encoding: translation is 2.5x faster
RAD Debugging Edit and Continue: Edit Code at runtime Allowed Edits: Examples Add private fields to a class Add private non-virtual methods to a class Change a function body, even while stepping Disallowed Edits: Examples Removing fields/methods Edits to generic classes Serialization will not recognize new fields Display Attributes for a better debugging experience
CLR Security New cryptography support PKCS7 support XML encryption support Enhanced support for X509 certificates Enhanced Application Security Permission Calculator Integration with ClickOnce Debug-In-Zone Managed ACL Support
Generics public class List { private object[] elements; private int count; public void Add(object element) { if (count == elements.Length) Resize(count * 2); elements[count++] = element; } public object this[int index] { get { return elements[index]; } set { elements[index] = value; } } public int Count { get { return count; } } } public class  List<T> { private  T [] elements; private int count; public void Add( T  element) { if (count == elements.Length) Resize(count * 2); elements[count++] = element; } public  T  this[int index] { get { return elements[index]; } set { elements[index] = value; } } public int Count { get { return count; } } } List intList = new List(); intList.Add(1); intList.Add(2); intList.Add(“3&quot;); int i = (int)intList[0]; List intList = new List(); intList.Add(1);  // Argument is boxed intList.Add(2);  // Argument is boxed intList.Add(“3&quot;);  // Should be an error int i = (int)intList[0];  // Cast required List <int>  intList = new List <int> (); intList.Add(1);  // No boxing intList.Add(2);  // No boxing intList.Add(“3&quot;);  // Compile-time error int i = intList[0];  // No cast required C#
Generics Why generics? Compile-time type checking Performance (no boxing, no downcasts) Reduced code bloat (typed collections) VB, C#, MC++ produce & consume generics Use generics freely in internal APIs Consider using generics in public APIs Generics are not yet in CLS To be CLS compliant, provide a non-generic API alternative Microsoft is actively pursuing standardization of generics in runtime and languages
Generics in VB Public Class  List(Of ItemType )       Private elements() As  ItemType       Private elementcount As Integer       Public Sub Add(ByVal element As  ItemType )            If elementcount = elements.Length Then Resize(elementcount * 2)            elements(elementcount) = element            count += 1       End Sub       Public Default Property Item(ByVal index As Integer) As  ItemType            Get                Return elements(index)            End Get            Set (ByVal Value As  ItemType )               elements(index) = Value            End Set       End Property       Public ReadOnly Property Count As Integer            Get                Return elementcount            End Get       End Property End Class Dim intList As New List(Of Integer)  intList.Add(1)            ‘ No boxing  intList.Add(2)            ‘ No boxing  intList.Add(“3&quot;)      ‘ Compile-time error  Dim i As Integer = intList(0)   ’ No cast required VB
Generics in C++ generic<typename  T > public ref class List {     array <T> ^ elements;     int count; public:     void Add( T  element) {        if (count == elements->Length) Resize(count * 2);        elements[count++] = element;     }     property  T  default [int index] {        T  get() { return elements[index]; }        void set( T  value) { elements[index] = value; }     }     property int Count {        int get() { return count; }     } }; List<int> ^ intList = gcnew  List<int> (); intList->Add(1);            // No boxing intList->Add(2);            // No boxing intList->Add(“3&quot;);       // Compile-time error   int i = intList[0];          // No cast required C++
Enhancing the Base Library Generic Collections System.Collections.Generic classes List<T> Dictionary<K, V> Stack<T> Queue<T> System.Collections.Generic interfaces IList<T> IDictionary<K, V> ICollection<T> IEnumerable<T> IEnumerator<T> IComparable<T> IComparer<T>
Enhancing The Base Library Other Generics to look out for Nullable( Of T ) Extremely useful for situations where null is a value, such as database valuetypes T will be constrained to valueTypes EventHandler <T> Saves on making your own EventHandlers 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 ;
VS 2005 Tracing Features Additional Listeners Pre - VS 2005   Formatting of Trace information was predefined, and not controllable No Console listener, ASP had their own tracing mechanism VS 2005 Predefined listeners (Console, ETW) and you can make your own Integrated ASP Tracing into our own Support formatting of output, into defined formats, such as delimitered, or XML MySource;Error;13;Wrong key;;;;;;318361290184;
VS 2005  Tracing Features Simple Thread Identification Pre - VS 2005  : specific threads were difficult to identify, and filter on VS 2005  : Correlation ID has been added, which allows quick and easy identification of a thread, and simple subsequent filtering Auto-generated Data Pre - VS 2005  : Standard information such as timestamp or callstack would have to be explicitly generated VS 2005  : An Admin can easily generate this data automatically, via config settings < listeners > < add   name =&quot;example.log&quot;  TraceOutputOptions =  &quot;Timestamp, CorrelationId&quot;
VS 2005  Tracing Features Listener Filtering Pre - VS 2005  : Filtering of Trace information was predefined, and not controllable VS 2005  : Assign filtering to listeners, so only certain messages are traced. This allows filtering on any property of a message. E.g., ID, TimeStamp, etc. Switches Pre - VS 2005  : Couldn’t determine what tracing a component supported VS 2005  : Support the ability to determine what tracing mechanisms a component has
Summary Extending the Platform SQL Server Integration Moving to 64 bit Improving the Platform Performance work RAD Debugging Security improvements Innovating in the Platform Generics support BCL Enhancements
Resources BCL Blog http://weblogs.asp.net/bclteam BCL Website http://www.gotdotnet.com/team/clr/bcl/default.aspx BCL public mail alias [email_address] Reference (Brad Abrams) .NET Framework Standard Library Annotated Reference
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   Sofia .NET User Group http://www.sofiadev.org/ Community sites http://www.microsoft.com/communities/related/default.mspx
Q & A:  We want your feedback!
© 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.

More Related Content

PPT
PresentacióN1felipe
PPS
Etrangenature Pm 1
PPT
La compu y las personas
PDF
Press Release 1 T03 Tele Celular Sul
PDF
Press Release 4 T07
PPT
Los dragones: pequeños científicos
PDF
ConferêNcia Bear Stearns 2006 Telecom & MíDia AméRica Do Sul
PPT
Runtime Environment Of .Net Divya Rathore
PresentacióN1felipe
Etrangenature Pm 1
La compu y las personas
Press Release 1 T03 Tele Celular Sul
Press Release 4 T07
Los dragones: pequeños científicos
ConferêNcia Bear Stearns 2006 Telecom & MíDia AméRica Do Sul
Runtime Environment Of .Net Divya Rathore

Similar to Svetlin Nakov - What's New In CLR 2.0 (20)

PPTX
04 standard class library c#
PPTX
VB.NET Datatypes.pptx
PPTX
PPTX
Core C# Programming Constructs, Part 1
PDF
Rc018 corenet online
PDF
Lesson 2 Understanding Types And Usage In Dot Net
PPTX
SQL Server Development Tools & Processes Using Visual Studio 2010
PDF
Core c sharp and .net quick reference
PDF
Core csharp and net quick reference
PPTX
c#(loops,arrays)
PDF
Doodads quickref
PPTX
Chapter 6 data types
PPTX
SQL Server 2012 Best Practices
PPTX
TechDays Tunisia - Visual Studio & SQL Server, Better Together - Ayman El-Hattab
PPTX
.Net Collection Classes Deep Dive - Rocksolid Tour 2013
PPTX
How To Code in C#
PPTX
13string in c#
PPTX
SQL Server - CLR integration
PPTX
Sql Basics And Advanced
04 standard class library c#
VB.NET Datatypes.pptx
Core C# Programming Constructs, Part 1
Rc018 corenet online
Lesson 2 Understanding Types And Usage In Dot Net
SQL Server Development Tools & Processes Using Visual Studio 2010
Core c sharp and .net quick reference
Core csharp and net quick reference
c#(loops,arrays)
Doodads quickref
Chapter 6 data types
SQL Server 2012 Best Practices
TechDays Tunisia - Visual Studio & SQL Server, Better Together - Ayman El-Hattab
.Net Collection Classes Deep Dive - Rocksolid Tour 2013
How To Code in C#
13string in c#
SQL Server - CLR integration
Sql Basics And Advanced
Ad

More from Svetlin Nakov (20)

PPTX
AI and the Future of Devs: Nakov @ Techniverse (Nov 2024)
PPTX
AI за ежедневието - Наков @ Techniverse (Nov 2024)
PPTX
AI инструменти за бизнеса - Наков - Nov 2024
PPTX
AI Adoption in Business - Nakov at Forbes HR Forum - Sept 2024
PPTX
Software Engineers in the AI Era - Sept 2024
PPTX
Най-търсените направления в ИТ сферата за 2024
PPTX
BG-IT-Edu: отворено учебно съдържание за ИТ учители
PPTX
Programming World in 2024
PDF
AI Tools for Business and Startups
PPTX
AI Tools for Scientists - Nakov (Oct 2023)
PPTX
AI Tools for Entrepreneurs
PPTX
Bulgarian Tech Industry - Nakov at Dev.BG All in One Conference 2023
PPTX
AI Tools for Business and Personal Life
PDF
Дипломна работа: учебно съдържание по ООП - Светлин Наков
PPTX
Дипломна работа: учебно съдържание по ООП
PPTX
Свободно ИТ учебно съдържание за учители по програмиране и ИТ
PPTX
AI and the Professions of the Future
PPTX
Programming Languages Trends for 2023
PPTX
IT Professions and How to Become a Developer
PPTX
GitHub Actions (Nakov at RuseConf, Sept 2022)
AI and the Future of Devs: Nakov @ Techniverse (Nov 2024)
AI за ежедневието - Наков @ Techniverse (Nov 2024)
AI инструменти за бизнеса - Наков - Nov 2024
AI Adoption in Business - Nakov at Forbes HR Forum - Sept 2024
Software Engineers in the AI Era - Sept 2024
Най-търсените направления в ИТ сферата за 2024
BG-IT-Edu: отворено учебно съдържание за ИТ учители
Programming World in 2024
AI Tools for Business and Startups
AI Tools for Scientists - Nakov (Oct 2023)
AI Tools for Entrepreneurs
Bulgarian Tech Industry - Nakov at Dev.BG All in One Conference 2023
AI Tools for Business and Personal Life
Дипломна работа: учебно съдържание по ООП - Светлин Наков
Дипломна работа: учебно съдържание по ООП
Свободно ИТ учебно съдържание за учители по програмиране и ИТ
AI and the Professions of the Future
Programming Languages Trends for 2023
IT Professions and How to Become a Developer
GitHub Actions (Nakov at RuseConf, Sept 2022)
Ad

Recently uploaded (20)

PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Encapsulation theory and applications.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Empathic Computing: Creating Shared Understanding
PDF
Encapsulation_ Review paper, used for researhc scholars
DOCX
The AUB Centre for AI in Media Proposal.docx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
A Presentation on Artificial Intelligence
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Unlocking AI with Model Context Protocol (MCP)
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Review of recent advances in non-invasive hemoglobin estimation
Digital-Transformation-Roadmap-for-Companies.pptx
Encapsulation theory and applications.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Empathic Computing: Creating Shared Understanding
Encapsulation_ Review paper, used for researhc scholars
The AUB Centre for AI in Media Proposal.docx
“AI and Expert System Decision Support & Business Intelligence Systems”
Understanding_Digital_Forensics_Presentation.pptx
A Presentation on Artificial Intelligence
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
NewMind AI Weekly Chronicles - August'25 Week I
Advanced methodologies resolving dimensionality complications for autism neur...
Unlocking AI with Model Context Protocol (MCP)

Svetlin Nakov - What's New In CLR 2.0

  • 1. Новости в .NET CLR 2.0 Светлин Наков Българска асоциация на разработчиците на софтуер
  • 2. Developer Roadmap “ Orcas” release Windows “Longhorn” integration New UI tools and designers Extensive managed interfaces Visual Studio Orcas “Longhorn” Visual Studio .NET 2003 “ Everett Release” Windows Server 2003 integration Support for .NET Compact Framework and device development Improved performance Visual Studio 2005 “Yukon” “ Whidbey” release SQL Server integration Improved IDE productivity and community support Extended support for XML Web services Office programmability
  • 3. Agenda Extending the Platform SQL Server Integration Moving to 64 bit Improving the Platform Performance work RAD Debugging Security improvements Innovating in the Platform Generics support BCL Enhancements
  • 4. SQL Server Integration Design Goal Bring framework programming model into the database tier Allow business logic to easily migrate to the most appropriate tier Enable safe database extensions Result : Stored Procedures, Triggers, data types defined in managed code
  • 5. 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
  • 6. Sql Programming Model Splitting a string The old way…. 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 ), … 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 )
  • 7. 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 The new way…. VB.NET
  • 8. Moving to 64 bit 64 bit for Servers and workstations X64 and IA64 bit support Enable SQL Server 2005 and ASP.NET Verifiable managed binaries just run! Support for WoW64 Enables 32bit apps to run on 64 bit machines 1.0 and 1.1 apps always run in the WoW VS: Runs as a 32bit application You can develop, deploy, and debug 32 and 64bit applications
  • 9. Performance Objectives: make .NET an even greater programming platform Long-Term: make the performance characteristics of the CLR similar to native code Reduce marginal cost of additional managed processes Reduce startup time and working set NGen Compiles IL code to native code, saving results to disk Advantages: no need to recompile IL to native code, and class layout already set so better startup time VS 2005: Significant reductions in the amount of private, non-shareable working set OS: ‘no-Jit’ plan, all managed code will be NGened
  • 10. Performance everywhere New, Performant APIs APIs for faster resource lookup Lightweight CodeGen: only generates essential code (contrast to Reflect Emit) Existing APIs Improved Cross AppDomain Remoting Between 1.1 and 200x faster. Biggest gains for simpler items (strings, integers, serializable objects) Delegate invoke performance has more than doubled AppDomain Footprints: significantly reduced UTF8Encoding: translation is 2.5x faster
  • 11. RAD Debugging Edit and Continue: Edit Code at runtime Allowed Edits: Examples Add private fields to a class Add private non-virtual methods to a class Change a function body, even while stepping Disallowed Edits: Examples Removing fields/methods Edits to generic classes Serialization will not recognize new fields Display Attributes for a better debugging experience
  • 12. CLR Security New cryptography support PKCS7 support XML encryption support Enhanced support for X509 certificates Enhanced Application Security Permission Calculator Integration with ClickOnce Debug-In-Zone Managed ACL Support
  • 13. Generics public class List { private object[] elements; private int count; public void Add(object element) { if (count == elements.Length) Resize(count * 2); elements[count++] = element; } public object this[int index] { get { return elements[index]; } set { elements[index] = value; } } public int Count { get { return count; } } } public class List<T> { private T [] elements; private int count; public void Add( T element) { if (count == elements.Length) Resize(count * 2); elements[count++] = element; } public T this[int index] { get { return elements[index]; } set { elements[index] = value; } } public int Count { get { return count; } } } List intList = new List(); intList.Add(1); intList.Add(2); intList.Add(“3&quot;); int i = (int)intList[0]; List intList = new List(); intList.Add(1); // Argument is boxed intList.Add(2); // Argument is boxed intList.Add(“3&quot;); // Should be an error int i = (int)intList[0]; // Cast required List <int> intList = new List <int> (); intList.Add(1); // No boxing intList.Add(2); // No boxing intList.Add(“3&quot;); // Compile-time error int i = intList[0]; // No cast required C#
  • 14. Generics Why generics? Compile-time type checking Performance (no boxing, no downcasts) Reduced code bloat (typed collections) VB, C#, MC++ produce & consume generics Use generics freely in internal APIs Consider using generics in public APIs Generics are not yet in CLS To be CLS compliant, provide a non-generic API alternative Microsoft is actively pursuing standardization of generics in runtime and languages
  • 15. Generics in VB Public Class List(Of ItemType )      Private elements() As ItemType      Private elementcount As Integer      Public Sub Add(ByVal element As ItemType )           If elementcount = elements.Length Then Resize(elementcount * 2)           elements(elementcount) = element           count += 1      End Sub      Public Default Property Item(ByVal index As Integer) As ItemType           Get               Return elements(index)           End Get           Set (ByVal Value As ItemType )               elements(index) = Value           End Set      End Property      Public ReadOnly Property Count As Integer           Get               Return elementcount           End Get      End Property End Class Dim intList As New List(Of Integer) intList.Add(1)           ‘ No boxing intList.Add(2)           ‘ No boxing intList.Add(“3&quot;)     ‘ Compile-time error Dim i As Integer = intList(0)   ’ No cast required VB
  • 16. Generics in C++ generic<typename T > public ref class List {    array <T> ^ elements;    int count; public:    void Add( T element) {       if (count == elements->Length) Resize(count * 2);       elements[count++] = element;    }    property T default [int index] {       T get() { return elements[index]; }       void set( T value) { elements[index] = value; }    }    property int Count {       int get() { return count; }    } }; List<int> ^ intList = gcnew List<int> (); intList->Add(1);            // No boxing intList->Add(2);            // No boxing intList->Add(“3&quot;);      // Compile-time error   int i = intList[0];        // No cast required C++
  • 17. Enhancing the Base Library Generic Collections System.Collections.Generic classes List<T> Dictionary<K, V> Stack<T> Queue<T> System.Collections.Generic interfaces IList<T> IDictionary<K, V> ICollection<T> IEnumerable<T> IEnumerator<T> IComparable<T> IComparer<T>
  • 18. Enhancing The Base Library Other Generics to look out for Nullable( Of T ) Extremely useful for situations where null is a value, such as database valuetypes T will be constrained to valueTypes EventHandler <T> Saves on making your own EventHandlers 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 ;
  • 19. VS 2005 Tracing Features Additional Listeners Pre - VS 2005 Formatting of Trace information was predefined, and not controllable No Console listener, ASP had their own tracing mechanism VS 2005 Predefined listeners (Console, ETW) and you can make your own Integrated ASP Tracing into our own Support formatting of output, into defined formats, such as delimitered, or XML MySource;Error;13;Wrong key;;;;;;318361290184;
  • 20. VS 2005 Tracing Features Simple Thread Identification Pre - VS 2005 : specific threads were difficult to identify, and filter on VS 2005 : Correlation ID has been added, which allows quick and easy identification of a thread, and simple subsequent filtering Auto-generated Data Pre - VS 2005 : Standard information such as timestamp or callstack would have to be explicitly generated VS 2005 : An Admin can easily generate this data automatically, via config settings < listeners > < add name =&quot;example.log&quot; TraceOutputOptions = &quot;Timestamp, CorrelationId&quot;
  • 21. VS 2005 Tracing Features Listener Filtering Pre - VS 2005 : Filtering of Trace information was predefined, and not controllable VS 2005 : Assign filtering to listeners, so only certain messages are traced. This allows filtering on any property of a message. E.g., ID, TimeStamp, etc. Switches Pre - VS 2005 : Couldn’t determine what tracing a component supported VS 2005 : Support the ability to determine what tracing mechanisms a component has
  • 22. Summary Extending the Platform SQL Server Integration Moving to 64 bit Improving the Platform Performance work RAD Debugging Security improvements Innovating in the Platform Generics support BCL Enhancements
  • 23. Resources BCL Blog http://weblogs.asp.net/bclteam BCL Website http://www.gotdotnet.com/team/clr/bcl/default.aspx BCL public mail alias [email_address] Reference (Brad Abrams) .NET Framework Standard Library Annotated Reference
  • 24. 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 Sofia .NET User Group http://www.sofiadev.org/ Community sites http://www.microsoft.com/communities/related/default.mspx
  • 25. Q & A: We want your feedback!
  • 26. © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.