1 / 36

.NET 4.0

Dave Sussman. .NET 4.0. Agenda. Versioning Languages ASP.NET Visual Studio 2010. New version of CLR. Side by Side. 3.5. 3.0. .NET 1.0. .NET 1.1. .NET 2.0. .NET 4.0. IIS. Existing Applications. Language. Co-evolution of VB.net & C# C# Enhancements VB Enhancements

Audrey
Download Presentation

.NET 4.0

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Dave Sussman .NET 4.0

  2. Agenda • Versioning • Languages • ASP.NET • Visual Studio 2010

  3. New version of CLR • Side by Side 3.5 3.0 .NET 1.0 .NET 1.1 .NET 2.0 .NET 4.0 IIS

  4. Existing Applications

  5. Language • Co-evolution of VB.net & C# • C# Enhancements • VB Enhancements • Covariance & Contravariance • Dynamic Language Runtime

  6. C# Enhancements • Optional Parameters public void MyFunction (string param1="a", string param2="b"){...} • Named Parameters: Print(DocumentName:"readme.txt", Width:400)

  7. VB Enhancements (1) • Line continuation LongFunction("Iamaveryveryveryveryveryvlong", "Iamaveryveryveryveryverylong", "Iamaveryveryveryveryverylong") • Auto implemented properties: Property FilmTitle() As string

  8. VB Enhancements (2) • Collection initializers: Dim Films as new List(of string( from {"Terminator", "Blade Runner"})) • Array Literals - following array will now be automatically typed as an integer: Dim myArray = {2, 3, 5}

  9. VB Enhancements (3) • Jagged Arrays: Dim Movies= {({"Hot", "Heavy", "Purple"}), ({"Cold","Light"})} • Nullable Optional Parameters • Anonymous Method Support Dim add=Function(x as integer, y as integer) Return x+y End function

  10. Variance • Variant type parameters can only be declared on interfaces and delegates • Make covariant by prefixing with the out keyword (using more specific when more general should be used) • Make contravariant by using in keyword (using more general when more specific should be used) • http://blogs.msdn.com/charlie/archive/2008/10/28/linq-farm-covariance-and-contravariance-in-visual-studio-2010.aspx

  11. Dynamic Language Runtime • DLR runs above CLR • Works out type of object it is dealing with and where to route code

  12. Dynamic • Allows you to work with types not known at compile time and in an intuitive and easy to read way: dynamic obj1 = new thingie(); dynamic obj2 = new stuff(); string myString; obj1.Do(myString, obj2, null);

  13. Dynamic Code • More readable and intuitive • Allow language developers to utilize .NET • Allow .NET developers to call other frameworks • Enables Iron Ruby/Python

  14. Easier to work with COM • No more intermediary PIA (Primary Interop Assembly) files • DLR and language enhancement make code more readable e.g. ((Excel.Range) excel.Cells[1, 1]).Value2 = "Hello"; Can now be written as: excel.Cells[1, 1].Value = "Hello"; No more: Object test (“test.docx”, missing, missing, missing, missing, missing, missing etc..)

  15. Parallelization 256 core Task Manager Intel labs (http://www.geeks3d.com/?p=3053&cpage=1)

  16. Parallel Programming • Most computers now multi-core • Not all code can be parallelised • Parallel version of loops • PLINQ • Tasks • Enhancements to IDE for easier debugging • New types and classes CountDownEvent, LazyInit, ConcurrentBag, LinkedList etc

  17. Parallel Loops System.Threading.Parallel.For (0, Stocks.Count, i => { StockService.CallSomeLongRunningService (Stocks[i]); });

  18. Tasks • New set of classes to perform work in parallel • A task is a light weight unit of work • Runs on CLR 4 thread pool • Task is a wrapper to the thread pool which is itself a wrapper to working with threads • Easy scheduling and synchronization and aggregates exceptions

  19. Parallel Programming - Tasks Controlling order and synchronization much easier task = Task.StartNew ( Delegate { StockService.CallLongRunningService (Stocks[0]); } ); task1.Wait(); Task.WaitAll(task2, task3);

  20. PLINQ varparallelQuery = from s in Stocks.AsParallel() let result = StockService.CallSomeLongRunningService(s) select result;

  21. ASP.NET 4.0 • Will be included, out of the box • jQuery • Ajax Control Toolkit (partial) • Dynamic Data • MVC

  22. ASP.NET 4.0 • Granular control of ViewState • CSS Support • Client IDs • Snippets • Ajax Client Binding • Auto-start Web applications

  23. Proposed New Cache Functionality • A new, extensible, object cache API in its own namespace and assembly • Supports both client and server applications • Can be made available on both desktop and client SKUs • A factored version of the ASP.NET cache engine • Extensible ASP.NET output caching • Consistent APIs for programming against • Disk-based output caches • Custom object caches • Cloud-based object caches • Distributed object caches

  24. Visual Studio 2010 • WPF Backed • Extensibility • Code adornments • Start Page

  25. Quicker code • Generate stub’s

  26. Highlight References • Automatically activated after few seconds • Ctrl + Shift + Up or Down

  27. Call Hierarchy • Show all instances where method being called • Navigate methods easily

  28. Multi targeting • Will support • 2.0, 3.0, 3.5 and 4.0 • Future versions based up 4.0 CLR • Better tool support • More features respond to targeted version • eg toolbox

  29. Deployment

  30. Performance • Property Grid updates of controls in Designer • Website rebuild • First open of WAP • Reopen of WAP • First open a website • Reopen of a website • First open of a large solution with multiple WAPs • Reopen of a large solution with multiple WAPs • Intellisense in nuggets • Build WAP • Edit WAP and do incremental build • Full rebuild of WAP • Incremental build on website • Format HTML • Format CSS • Format JScript • Undo format HTML • Undo format CSS • Undo format JScript • First switch to DV • First drop of control onto designer • Second switch to DV • Typing text in nested HTML containers in DV • Typing text in table • Updates from SV to DV • Intellisense schema generation • Validation of markup • Add new webform • Open existing webform • First view in browser • Second view in browser • Shutting down IDE

  31. Resources • http://www.asp.net/ • http://codeplex.com/aspnet • http://weblogs.asp.net/scottgu • http://mostlylucid.net • http://blogs.msdn.com/webdevtools/

  32. FIN.

More Related