Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Overview of VS2010 and .NET 4.0

2,163 views

Published on

This slide deck was used at the ObjectSharp At The Movies event as an overview of the new features of VS2010 and functionality added to .NET 4.0

  • Be the first to comment

  • Be the first to like this

Overview of VS2010 and .NET 4.0

  1. 1.
  2. 2. An Overview of VS2010 and .NET 4.0<br />
  3. 3. Visual Studio Targets Many…<br />Complete<br />Team System<br />Professional<br />Feature Set<br />Express<br />Minimal<br />Hobbyist<br />Enterprise<br />Audience<br />
  4. 4. …and there are Four Pillars<br />Understanding <br />The Code<br />Building Web<br />Applications<br />Creating Office<br />Business<br />Applications<br />Using The<br />Power of<br />C++<br />
  5. 5. Breakpoint Grouping<br />Parallel Tasks Window<br />New Look & Feel<br />Extensible Test Runner<br />Dynamic Data Tooling<br />Generate From Usage<br />Highlight References<br />WPF-based Editor<br />Click-Once Enhancements for Office<br />Breakpoint Labeling<br />Call Hierarchy<br />Web Deploy<br />Improved WPF Tooling<br />Sharepoint Tooling<br />Historical Debugging<br />MVC Tooling<br />Inline Call Tree<br />Minidump Debugging<br />Quick Search<br />JQueryIntellisense<br />Concurrency Profiler<br />Breakpoint Import/Export<br />Document Map Margin<br />64-bit Mixed-Mode<br />Parallel Stacks Window<br />HTML Snippets<br />Improved Multi-Monitor<br />web.config Transformation<br />New Visual Studio 2010 Features…<br />
  6. 6. The Two Faces of Visual Studio 2010<br />Visual Studio As An Editor<br />An improved focus on… <br />Writing code,<br />Understanding code,<br />Navigating code,<br />Publishing code<br />
  7. 7. New VS2010 Capabilities<br />
  8. 8. The Two Faces of Visual Studio 2010<br />Visual Studio As A Platform<br />New Editor allows for easy extensibilityto provide a rich and robust editing experience<br />Online Visual Studio Gallery integrated directly into Visual Studio<br />
  9. 9. Extension Manager<br />
  10. 10. But Didn’t You Say Extensibility?<br />Available through the Managed Extensibility Framework (MEF)<br />New library in the .NET Framework<br />Enables greater reuse of applications and components. <br />Shift applications from being statically to dynamically composed<br />
  11. 11. Composite Application?<br />Isn’t that like Prism?<br />Sort of<br />MEF != Prism<br />Prism is just UI guidance<br />Uses an IoC container (Unity)<br />MEF is a dependency injection framework<br />Closer to Unity<br />Can actually be used with Prism<br />
  12. 12. Applications Made Out of Parts<br />
  13. 13. The Import/Export Business<br />Import<br />Need<br />Export<br />Got<br />Parts<br />
  14. 14. The Extensibility Scenario<br />Application<br />Need <br />Menus<br />Need a Toolwindow<br />Got a MenuService<br />Got a Toolwindow<br />Got a Menu<br />Extension A<br />Extension B<br />Need a MenuService<br />
  15. 15. …Put into Geek Terms<br />Part<br />Import<br />Menus<br />Import “Toolwindow”<br />Import IMenuService<br />Export “Toolwindow”<br />Export aMenu<br />Part<br />Part<br />Export IMenuService<br />
  16. 16. And Why Should I Care?<br />Because the Visual Studio 2010 IDE is a MEF application<br />Integration with menus<br />Integration with toolbars<br />Integration with the editor<br />
  17. 17. Extending Visual Studio<br />
  18. 18. The Target of CLR 4<br />Working Better Together…<br />In-Proc SxS<br />Managed Extensibility Framework<br />Working Better Together…<br />Native/Managed Interop<br />DLR Integration<br />Faster<br />Threading<br />Parallel Extensions<br />Garbage Collection<br />Profiling<br />With Fewer Bugs…<br />Code Contracts<br />Debugging<br />Corrupted State Exceptions<br />
  19. 19. Base Class Library Improvements<br />Numerics<br />BigInteger, Complex<br />Data Structures<br />Tuple<br />SortedSet<T>, ISet<T><br />I/O<br />Memory-Mapped File<br />Unified Cancellation Model<br />
  20. 20. Side-by-Side (Sxs) at .NET 3.5<br />2.0 add-in<br />3.0 add-in<br />3.5 add-in<br />1.1 add-in<br />3.5<br />.NET 1.1<br />3.0<br />.NET 2.0<br />Host Process (i.e. Outlook)<br />
  21. 21. Side-By-Side (SxS) at .NET 4.0<br />2.0 add-in<br />3.0 add-in<br />3.5 add-in<br />4.0 add-in<br />3.5<br />.NET 4.0<br />3.0<br />.NET 2.0<br />Host Process (i.e. Outlook)<br />
  22. 22. The target of CLR 4<br />Working Better Together…<br />In-Proc SxS<br />Managed Extensibility Framework<br />Native/Managed Interop<br />DLR Integration<br />Faster<br />Threading<br />Parallel Extensions<br />Garbage Collection<br />Profiling<br />With Fewer Bugs…<br />Code Contracts<br />Debugging<br />Corrupted State Exceptions<br />
  23. 23. “Moore’s Law scaling should easily let us hit the 80-core mark in mainstream processors within the next ten years and quite possibly even sooner.”<br />- Justin Ratner, CTO, Intel<br />
  24. 24. The Parallel Computing Initiative<br />Based on the following premise:<br />Let the brightest developers solve business problems, not concurrency problems.<br />“Concurrency for the masses”<br />
  25. 25. Concurrency Landscape<br />For Visual Studio 2010 and the .NET Framework 4…<br />System.Threading<br />Parallel Extensions<br />Unified Cancellation Model<br />
  26. 26. New System.Threading Primitives<br />A Barrier is a synchronization primitive that enforces the stopping of execution between a number of threads or processes at a given point and prevents further execution until all threads or processors have reached the given point.<br />A CountdownEvent is a synchronization primitive that enables ongoing tracking of a given workload in order to determine if processing of that workload is finished or not.<br />YUCK!<br />
  27. 27. Barrier<br />“Let’s all head to Wasaga! We’ll meet at the gas station and leave from there.”<br />Dennis<br />Mac<br />Barrier<br />Wasaga<br />Charlie<br />Gas Station<br />
  28. 28. Unified Cancellation<br />“Sir, we are ready to seat you…” - Hostess<br />Cancellation<br />Token<br />Source<br />Cancellation<br />Token<br />
  29. 29. The Unified Cancellation Model<br />
  30. 30. Parallel Extensinos<br />A .NET Library that supports:<br />declarative and imperative data parallelism<br />imperative task parallelism<br />Also provides a set of data structures that make coordination easier.<br />Parallel LINQ (PLINQ)<br />Task Parallel Library (TPL)<br />Coordination Data Structures (CDS)<br />
  31. 31. “Work Stealing” in Action<br />Worker Thread 1<br />Worker Thread p<br />Program Thread<br />Task 3<br />Task 1<br />Task 4<br />Task 5<br />Task 2<br />
  32. 32. Parallel Static Class<br />When program statements are independent…<br /> …they can be parallelized<br />StatementA();<br />StatementB();<br />StatementC();<br />Parallel.Invoke(<br /> () => StatementA(),<br /> () => StatementB(),<br /> () => StatementC() );<br />
  33. 33. Parallel Static Class<br />
  34. 34. PLINQ<br />Parallel LINQ (PLINQ) enables developers to easily leverage manycore with a minimal impact to existing LINQ programming model<br />var q = from p in people<br />        where p.Name == queryInfo.Name && <br />p.State == queryInfo.State &&<br />p.Year >= yearStart &&<br />p.Year <= yearEnd<br />        orderbyp.Year ascending<br />        select p;<br />.AsParallel()<br />
  35. 35. Parallelizing LINQ<br />
  36. 36. The goal of CLR 4<br />Working Better Together…<br />In-Proc SxS<br />Managed Extensibility Framework<br />Native/Managed Interop<br />DLR Integration<br />Faster<br />Threading<br />Parallel Extensions<br />Garbage Collection<br />Profiling<br />With Fewer Bugs…<br />Code Contracts<br />Debugging<br />Corrupted State Exceptions<br />
  37. 37. Design By Contract<br />Code Contracts introduce a way to specify contractual information that is not represented by a method or type’s signature alone.<br />
  38. 38. What is a Contract?<br />A contract is…<br />An exchange of promises between two or more parties to do, or refrain from doing, something<br />Key concept here is ‘promise’<br />
  39. 39. Why Contracts?<br />Just because something compiles, doesn’t mean it works…<br />
  40. 40. A Contract contains…<br />Pre-conditions - must be true before<br />Post-conditions -must be true after<br />public Rational(int numerator, int denominator)<br />{<br />Contract.Requires(denominator > 0);<br /> …<br />}<br />public string GetPassword()<br />{<br />Contract.Ensures(Contract.Result<string>() != null);<br /> …<br /> return password;<br />}<br />
  41. 41. A Contract contains…<br />Invariants - must always be true<br />[ContractInvariantMethod]<br />protected void ObjectInvariant()<br />{<br />Contract.Invariant(denominator > 0);<br />}<br />
  42. 42. Code Contracts<br />
  43. 43. Database Choices<br />Value Props:<br />Full h/w control – size/scale<br />100% compatibility<br />Roll-your-own HA/DR/scale<br />Value Props:<br />100% of API surface area<br />Roll-your-own HA/DR/scale<br />Dedicated<br />On-premise<br /> SQL Server or other s/w on-premise<br /> Resource governance @ machine<br /> Security @ DB Server/OS<br />Value Props:<br />Auto HA, Fault-Tolerance<br />Friction-free scale<br />Self-provisioning<br />High compatibility<br />Resources<br />Hosted<br /> Hosted SQL Server or other<br /> Resource governance @ VM<br /> Security @ DB Server/OS<br />SQL Azure (RDBMS)<br /> Virtual DB server<br />Resource governance @ LDB<br /> Security @ LDB<br />Shared<br />Low<br />“Friction”/Control<br />High<br />SQL Azure V1 targets scenarios that live in the lower left quadrant<br />
  44. 44. Windows Azure Platform<br />Compute:Virtualized compute environment based on Windows Server<br />Storage: Durable, scalable, & available storage<br />Management: Automated, model-driven management of the service<br />Database:Relational processing for structured/unstructured data<br />Service Bus: General purpose application bus<br />Access Control: Rules-driven, claims-based access control<br />AppFabric<br />
  45. 45. Scenarios for V1<br />Departmental Applications<br />Simple application built by individual or department<br />Need simple deployment, self-management, IT: “Empowerment and Governance”<br />Web Applications<br />Small business or startup that uses the cloud as their IT<br />Simple deployment, self-management, scale on demand<br />ISV<br />ISV hosting software on behalf of customer<br />Multi-tenant support for billing and isolation<br />
  46. 46. V1 Application Topologies<br />SQL Azure access from outside MS Datacenter <br />(On-premises – ADO.NET)<br />SQL Azure access from within MS Datacenter <br />(Azure compute – ADO.NET)<br />Application/ <br />Browser<br />App Code / Tools<br />ADO.NET Data Svcs/REST - EF<br />HTTP/S<br />SOAP/REST<br />HTTP/S<br />App Code<br />(ASP.NET)<br />Windows Azure<br />T-SQL (TDS)<br />T-SQL (TDS)<br />SQL Data Services<br />SQL Data Services<br />MS<br />Datacenter<br />MS<br />Datacenter<br />Code Far<br />Code Near<br />
  47. 47. SQL AzureDeployment<br />DB Script<br />SQL Azure<br />TDS Gateway<br />
  48. 48. SQL AzureAccessing databases<br />Change Connection String<br />Your App<br />SQL Azure<br />TDS Gateway<br />
  49. 49. Connecting To SQL Azure<br />

×