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

More Related Content

What's hot

NGRX Apps in Depth
NGRX Apps in DepthNGRX Apps in Depth
NGRX Apps in DepthTrayan Iliev
 
Streaming Inference with Apache Beam and TFX
Streaming Inference with Apache Beam and TFXStreaming Inference with Apache Beam and TFX
Streaming Inference with Apache Beam and TFXDatabricks
 
Building scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thriftBuilding scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thriftTalentica Software
 
Talend Open Studio For Data Integration Training Curriculum
Talend Open Studio For Data Integration Training CurriculumTalend Open Studio For Data Integration Training Curriculum
Talend Open Studio For Data Integration Training CurriculumBharat Khanna
 
GraphGen: Conducting Graph Analytics over Relational Databases
GraphGen: Conducting Graph Analytics over Relational DatabasesGraphGen: Conducting Graph Analytics over Relational Databases
GraphGen: Conducting Graph Analytics over Relational DatabasesKonstantinos Xirogiannopoulos
 
Reproducible AI using MLflow and PyTorch
Reproducible AI using MLflow and PyTorchReproducible AI using MLflow and PyTorch
Reproducible AI using MLflow and PyTorchDatabricks
 
Asynchronous Epoch Commits for Fast and Reliable Data Stream Execution in Apa...
Asynchronous Epoch Commits for Fast and Reliable Data Stream Execution in Apa...Asynchronous Epoch Commits for Fast and Reliable Data Stream Execution in Apa...
Asynchronous Epoch Commits for Fast and Reliable Data Stream Execution in Apa...Paris Carbone
 
Pattern: PMML for Cascading and Hadoop
Pattern: PMML for Cascading and HadoopPattern: PMML for Cascading and Hadoop
Pattern: PMML for Cascading and HadoopPaco Nathan
 
KFServing, Model Monitoring with Apache Spark and a Feature Store
KFServing, Model Monitoring with Apache Spark and a Feature StoreKFServing, Model Monitoring with Apache Spark and a Feature Store
KFServing, Model Monitoring with Apache Spark and a Feature StoreDatabricks
 
Ukfs Snr Dev Arch Forum Pres2 St
Ukfs Snr Dev Arch Forum Pres2 StUkfs Snr Dev Arch Forum Pres2 St
Ukfs Snr Dev Arch Forum Pres2 StAllyWick
 
ACM Bay Area Data Mining Workshop: Pattern, PMML, Hadoop
ACM Bay Area Data Mining Workshop: Pattern, PMML, HadoopACM Bay Area Data Mining Workshop: Pattern, PMML, Hadoop
ACM Bay Area Data Mining Workshop: Pattern, PMML, HadoopPaco Nathan
 
Ukfs Snr Dev Arch Forum Pres3 Re
Ukfs Snr Dev Arch Forum Pres3 ReUkfs Snr Dev Arch Forum Pres3 Re
Ukfs Snr Dev Arch Forum Pres3 ReAllyWick
 
SQL Server 2008 for Developers
SQL Server 2008 for DevelopersSQL Server 2008 for Developers
SQL Server 2008 for Developersllangit
 
Tech Days09 Sqldev
Tech Days09 SqldevTech Days09 Sqldev
Tech Days09 Sqldevllangit
 
Ukfs Snr Dev Arch Forum Pres1 Jb
Ukfs Snr Dev Arch Forum Pres1 JbUkfs Snr Dev Arch Forum Pres1 Jb
Ukfs Snr Dev Arch Forum Pres1 JbAllyWick
 
AppliFire Blue Print Design Guidelines
AppliFire Blue Print Design GuidelinesAppliFire Blue Print Design Guidelines
AppliFire Blue Print Design GuidelinesAppliFire Platform
 
Azure for SharePoint Developers - Workshop - Part 3: Web Services
Azure for SharePoint Developers - Workshop - Part 3: Web ServicesAzure for SharePoint Developers - Workshop - Part 3: Web Services
Azure for SharePoint Developers - Workshop - Part 3: Web ServicesBob German
 
Soprex framework on .net in action
Soprex framework on .net in actionSoprex framework on .net in action
Soprex framework on .net in actionMilan Vukoje
 
Meetup: Big Data NLP with HPCC Systems® - A Development Ride from Spray to TH...
Meetup: Big Data NLP with HPCC Systems® - A Development Ride from Spray to TH...Meetup: Big Data NLP with HPCC Systems® - A Development Ride from Spray to TH...
Meetup: Big Data NLP with HPCC Systems® - A Development Ride from Spray to TH...HPCC Systems
 
Graphs are everywhere! Distributed graph computing with Spark GraphX
Graphs are everywhere! Distributed graph computing with Spark GraphXGraphs are everywhere! Distributed graph computing with Spark GraphX
Graphs are everywhere! Distributed graph computing with Spark GraphXAndrea Iacono
 

What's hot (20)

NGRX Apps in Depth
NGRX Apps in DepthNGRX Apps in Depth
NGRX Apps in Depth
 
Streaming Inference with Apache Beam and TFX
Streaming Inference with Apache Beam and TFXStreaming Inference with Apache Beam and TFX
Streaming Inference with Apache Beam and TFX
 
Building scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thriftBuilding scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thrift
 
Talend Open Studio For Data Integration Training Curriculum
Talend Open Studio For Data Integration Training CurriculumTalend Open Studio For Data Integration Training Curriculum
Talend Open Studio For Data Integration Training Curriculum
 
GraphGen: Conducting Graph Analytics over Relational Databases
GraphGen: Conducting Graph Analytics over Relational DatabasesGraphGen: Conducting Graph Analytics over Relational Databases
GraphGen: Conducting Graph Analytics over Relational Databases
 
Reproducible AI using MLflow and PyTorch
Reproducible AI using MLflow and PyTorchReproducible AI using MLflow and PyTorch
Reproducible AI using MLflow and PyTorch
 
Asynchronous Epoch Commits for Fast and Reliable Data Stream Execution in Apa...
Asynchronous Epoch Commits for Fast and Reliable Data Stream Execution in Apa...Asynchronous Epoch Commits for Fast and Reliable Data Stream Execution in Apa...
Asynchronous Epoch Commits for Fast and Reliable Data Stream Execution in Apa...
 
Pattern: PMML for Cascading and Hadoop
Pattern: PMML for Cascading and HadoopPattern: PMML for Cascading and Hadoop
Pattern: PMML for Cascading and Hadoop
 
KFServing, Model Monitoring with Apache Spark and a Feature Store
KFServing, Model Monitoring with Apache Spark and a Feature StoreKFServing, Model Monitoring with Apache Spark and a Feature Store
KFServing, Model Monitoring with Apache Spark and a Feature Store
 
Ukfs Snr Dev Arch Forum Pres2 St
Ukfs Snr Dev Arch Forum Pres2 StUkfs Snr Dev Arch Forum Pres2 St
Ukfs Snr Dev Arch Forum Pres2 St
 
ACM Bay Area Data Mining Workshop: Pattern, PMML, Hadoop
ACM Bay Area Data Mining Workshop: Pattern, PMML, HadoopACM Bay Area Data Mining Workshop: Pattern, PMML, Hadoop
ACM Bay Area Data Mining Workshop: Pattern, PMML, Hadoop
 
Ukfs Snr Dev Arch Forum Pres3 Re
Ukfs Snr Dev Arch Forum Pres3 ReUkfs Snr Dev Arch Forum Pres3 Re
Ukfs Snr Dev Arch Forum Pres3 Re
 
SQL Server 2008 for Developers
SQL Server 2008 for DevelopersSQL Server 2008 for Developers
SQL Server 2008 for Developers
 
Tech Days09 Sqldev
Tech Days09 SqldevTech Days09 Sqldev
Tech Days09 Sqldev
 
Ukfs Snr Dev Arch Forum Pres1 Jb
Ukfs Snr Dev Arch Forum Pres1 JbUkfs Snr Dev Arch Forum Pres1 Jb
Ukfs Snr Dev Arch Forum Pres1 Jb
 
AppliFire Blue Print Design Guidelines
AppliFire Blue Print Design GuidelinesAppliFire Blue Print Design Guidelines
AppliFire Blue Print Design Guidelines
 
Azure for SharePoint Developers - Workshop - Part 3: Web Services
Azure for SharePoint Developers - Workshop - Part 3: Web ServicesAzure for SharePoint Developers - Workshop - Part 3: Web Services
Azure for SharePoint Developers - Workshop - Part 3: Web Services
 
Soprex framework on .net in action
Soprex framework on .net in actionSoprex framework on .net in action
Soprex framework on .net in action
 
Meetup: Big Data NLP with HPCC Systems® - A Development Ride from Spray to TH...
Meetup: Big Data NLP with HPCC Systems® - A Development Ride from Spray to TH...Meetup: Big Data NLP with HPCC Systems® - A Development Ride from Spray to TH...
Meetup: Big Data NLP with HPCC Systems® - A Development Ride from Spray to TH...
 
Graphs are everywhere! Distributed graph computing with Spark GraphX
Graphs are everywhere! Distributed graph computing with Spark GraphXGraphs are everywhere! Distributed graph computing with Spark GraphX
Graphs are everywhere! Distributed graph computing with Spark GraphX
 

Viewers also liked

Gaining the Knowledge of the Open Data Protocol (OData) - Prairie Dev Con
Gaining the Knowledge of the Open Data Protocol (OData) - Prairie Dev ConGaining the Knowledge of the Open Data Protocol (OData) - Prairie Dev Con
Gaining the Knowledge of the Open Data Protocol (OData) - Prairie Dev ConWoodruff Solutions LLC
 
How OData Opens Your Data To Enterprise Mobile Applications
How OData Opens Your Data To Enterprise Mobile ApplicationsHow OData Opens Your Data To Enterprise Mobile Applications
How OData Opens Your Data To Enterprise Mobile ApplicationsProgress
 
Mike Taulty OData (NxtGen User Group UK)
Mike Taulty OData (NxtGen User Group UK)Mike Taulty OData (NxtGen User Group UK)
Mike Taulty OData (NxtGen User Group UK)ukdpe
 
Setting Your Data Free With OData
Setting Your Data Free With ODataSetting Your Data Free With OData
Setting Your Data Free With ODataBruce Johnson
 
OData, External objects & Lightning Connect
OData, External objects & Lightning ConnectOData, External objects & Lightning Connect
OData, External objects & Lightning ConnectPrasanna Deshpande ☁
 
OData and the future of business objects universes
OData and the future of business objects universesOData and the future of business objects universes
OData and the future of business objects universesSumit Sarkar
 

Viewers also liked (6)

Gaining the Knowledge of the Open Data Protocol (OData) - Prairie Dev Con
Gaining the Knowledge of the Open Data Protocol (OData) - Prairie Dev ConGaining the Knowledge of the Open Data Protocol (OData) - Prairie Dev Con
Gaining the Knowledge of the Open Data Protocol (OData) - Prairie Dev Con
 
How OData Opens Your Data To Enterprise Mobile Applications
How OData Opens Your Data To Enterprise Mobile ApplicationsHow OData Opens Your Data To Enterprise Mobile Applications
How OData Opens Your Data To Enterprise Mobile Applications
 
Mike Taulty OData (NxtGen User Group UK)
Mike Taulty OData (NxtGen User Group UK)Mike Taulty OData (NxtGen User Group UK)
Mike Taulty OData (NxtGen User Group UK)
 
Setting Your Data Free With OData
Setting Your Data Free With ODataSetting Your Data Free With OData
Setting Your Data Free With OData
 
OData, External objects & Lightning Connect
OData, External objects & Lightning ConnectOData, External objects & Lightning Connect
OData, External objects & Lightning Connect
 
OData and the future of business objects universes
OData and the future of business objects universesOData and the future of business objects universes
OData and the future of business objects universes
 

Similar to VS2010 and .NET 4 Overview: New Features for Developers

MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for DevelopersMSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for DevelopersDave Bost
 
Lap around .net 4
Lap around .net 4Lap around .net 4
Lap around .net 4Abdul Khan
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010Satish Verma
 
Whidbey old
Whidbey old Whidbey old
Whidbey old grenaud
 
Experiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure teamExperiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure teamBrian Benz
 
A Lap Around Visual Studio 2010
A Lap Around Visual Studio 2010A Lap Around Visual Studio 2010
A Lap Around Visual Studio 2010Abram John Limpin
 
Building and deploying LLM applications with Apache Airflow
Building and deploying LLM applications with Apache AirflowBuilding and deploying LLM applications with Apache Airflow
Building and deploying LLM applications with Apache AirflowKaxil Naik
 
Data Driven WPF and Silverlight Applications
Data Driven WPF and Silverlight ApplicationsData Driven WPF and Silverlight Applications
Data Driven WPF and Silverlight ApplicationsDave Allen
 
ArcReady - Architecting For The Cloud
ArcReady - Architecting For The CloudArcReady - Architecting For The Cloud
ArcReady - Architecting For The CloudMicrosoft ArcReady
 
Whats New In 2010 (Msdn & Visual Studio)
Whats New In 2010 (Msdn & Visual Studio)Whats New In 2010 (Msdn & Visual Studio)
Whats New In 2010 (Msdn & Visual Studio)Steve Lange
 
Windows Azure & How to Deploy Wordress
Windows Azure & How to Deploy WordressWindows Azure & How to Deploy Wordress
Windows Azure & How to Deploy WordressGeorge Kanellopoulos
 
Vijay Oscon
Vijay OsconVijay Oscon
Vijay Osconvijayrvr
 
ASPNET for PHP Developers
ASPNET for PHP DevelopersASPNET for PHP Developers
ASPNET for PHP DevelopersWes Yanaga
 
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...Maarten Balliauw
 

Similar to VS2010 and .NET 4 Overview: New Features for Developers (20)

MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for DevelopersMSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
 
Vb essentials
Vb essentialsVb essentials
Vb essentials
 
Lap around .net 4
Lap around .net 4Lap around .net 4
Lap around .net 4
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010
 
Migrating Apps To Azure
Migrating Apps To AzureMigrating Apps To Azure
Migrating Apps To Azure
 
Whidbey old
Whidbey old Whidbey old
Whidbey old
 
Sky High With Azure
Sky High With AzureSky High With Azure
Sky High With Azure
 
RavenDB overview
RavenDB overviewRavenDB overview
RavenDB overview
 
Experiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure teamExperiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure team
 
.net Framework
.net Framework.net Framework
.net Framework
 
A Lap Around Visual Studio 2010
A Lap Around Visual Studio 2010A Lap Around Visual Studio 2010
A Lap Around Visual Studio 2010
 
Building and deploying LLM applications with Apache Airflow
Building and deploying LLM applications with Apache AirflowBuilding and deploying LLM applications with Apache Airflow
Building and deploying LLM applications with Apache Airflow
 
Data Driven WPF and Silverlight Applications
Data Driven WPF and Silverlight ApplicationsData Driven WPF and Silverlight Applications
Data Driven WPF and Silverlight Applications
 
ArcReady - Architecting For The Cloud
ArcReady - Architecting For The CloudArcReady - Architecting For The Cloud
ArcReady - Architecting For The Cloud
 
Whats New In 2010 (Msdn & Visual Studio)
Whats New In 2010 (Msdn & Visual Studio)Whats New In 2010 (Msdn & Visual Studio)
Whats New In 2010 (Msdn & Visual Studio)
 
Windows Azure & How to Deploy Wordress
Windows Azure & How to Deploy WordressWindows Azure & How to Deploy Wordress
Windows Azure & How to Deploy Wordress
 
Running PHP In The Cloud
Running PHP In The CloudRunning PHP In The Cloud
Running PHP In The Cloud
 
Vijay Oscon
Vijay OsconVijay Oscon
Vijay Oscon
 
ASPNET for PHP Developers
ASPNET for PHP DevelopersASPNET for PHP Developers
ASPNET for PHP Developers
 
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
 

More from Bruce Johnson

Introducing ASP.NET vNext
Introducing ASP.NET vNextIntroducing ASP.NET vNext
Introducing ASP.NET vNextBruce Johnson
 
Unit Testing and Mocking using MOQ
Unit Testing and Mocking using MOQUnit Testing and Mocking using MOQ
Unit Testing and Mocking using MOQBruce Johnson
 
Silverlight 4 Out Of Browser
Silverlight 4 Out Of BrowserSilverlight 4 Out Of Browser
Silverlight 4 Out Of BrowserBruce Johnson
 
Silverlight 4 and Expression Blend
Silverlight 4 and Expression BlendSilverlight 4 and Expression Blend
Silverlight 4 and Expression BlendBruce Johnson
 
Code Contracts In .Net
Code Contracts In .NetCode Contracts In .Net
Code Contracts In .NetBruce Johnson
 
Whats New In Silverlight 3
Whats New In Silverlight 3Whats New In Silverlight 3
Whats New In Silverlight 3Bruce Johnson
 

More from Bruce Johnson (7)

Introducing ASP.NET vNext
Introducing ASP.NET vNextIntroducing ASP.NET vNext
Introducing ASP.NET vNext
 
Unit Testing and Mocking using MOQ
Unit Testing and Mocking using MOQUnit Testing and Mocking using MOQ
Unit Testing and Mocking using MOQ
 
Silverlight 4 Out Of Browser
Silverlight 4 Out Of BrowserSilverlight 4 Out Of Browser
Silverlight 4 Out Of Browser
 
Silverlight 4 and Expression Blend
Silverlight 4 and Expression BlendSilverlight 4 and Expression Blend
Silverlight 4 and Expression Blend
 
Data Bondage in WPF
Data Bondage in WPFData Bondage in WPF
Data Bondage in WPF
 
Code Contracts In .Net
Code Contracts In .NetCode Contracts In .Net
Code Contracts In .Net
 
Whats New In Silverlight 3
Whats New In Silverlight 3Whats New In Silverlight 3
Whats New In Silverlight 3
 

VS2010 and .NET 4 Overview: New Features for Developers

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

Editor's Notes

  1. Launch VS2010Note that Start Page is now WPF =&gt; customizable Management of Recent Projects much easier – pinning, removalCreate a Web Project – Empty ASP.NET application called HelloWorldWeb Notice multi-targetingRight Click in the Project-&gt; Add New Item, Write Web Form in the search box and name it Page Default.aspx Point out searchingOpen Default.aspx, and choose the Design surface if not chosen alreadyOpen Toolbox, expand “Standard” Drop a Button and Label onto our page from the ToolboxRename Button -&gt; btnSend. Change Button.Text -&gt; “Press Me”Rename Label -&gt; lblMessage. Remove value from Label.TextDouble-Click our Button in the designer to create a click event handler in code-behind.In the event handler, type “Mes” Note that even though “Mes” was typed, lblMessage was foundChoose lblMessage from Intellisense and set its Text property to “Clicked!”Highlight the line of code we just wrote.Extract Method: Right Click -&gt; Refector -&gt; Extract MethodCall the method ChangeTextAdd a string parameter named message to the ChangeText method, and pass in “Clicked!” from the Button’s click event handler.Press “ctrl+,” (hold down control and press comma) to bring up Quick Search dialog.Enter “Page” as search item.Delete “Page” search item and type “PL” instead.Press enter to “OK” and accept dialog.In the Page_Load method, call our ChangeText to set text to “Not Clicked”Click the cursor on the name of our ChangeText method.Right Click on the name of the ChangeText method -&gt; View Call Hierarchy.
  2. MESSAGING:New Library = just an assembly, a normal .dll, used by any .NET languageDynamically Composed = composition takes place at runtime and composition behavior differs depending on how it is configured.
  3. MESSAGING:Now this has a great impact on the capabilities of our applications. Thanks to the ever-increasing power of our computers, computing power has been on a steady incline. And for the most part, our applications have been able to track this computing power increase merely by relying on the fact that faster computers will be released that will, in turn, make their own applications faster (just by running on the faster hardware). In this world, sequential programming wasn’t a problem because the ever-increasing computer power allowed our sequential programs to keep on running faster and faster as new hardware was released.However, along this computing power trend, a shift was made to CPUs containing multiple cores. Computers now contained multiple cores, where each single core was slightly less powerful than a complete processor was before. And while it would be nice to think our applications could continue to follow the computing power trend just as they did before, that’s not reality.The reality is that if we continue to use the same programming models as we use today, our performance will plateau. Not only will it plateau, there is a possibility that performance will decrease a bit as many cores are introduced that each are just a little less powerful than their predecessors (for less power consumption, less heat dissapation, etc.). Cleary, new tools for us developers to write applications with are necessary.
  4. MESSAGING:Today, concurrency usually has to be done by the brightest developers in a business. The problem with this is that the brightest developers are then being consumed by concurrency minutia rather than being able to be focused on core business problems and helping the business’s bottom line. By providing new libraries and tools that make it easy to write parallel code, we hope to allow the best and brightest developers focus on the business problems at hand. This in turn enables other developers to be able to address concurrency and parallelism.This is the long term goal of Microsoft with the Parallel Computing Initiative. Visual Studio 2010 and .NET Framework 4 is merely the first step being taken in this direction.
  5. MESSAGING:There are three primary improvement areas in Visual Studio 2010 and .NET Framework 4 that we will discuss in this talk: System.Threading improvements, introduction of Parallel Extensions to the .NET Framework, and a new unified cancellation model coming in .NET Framework 4.
  6. MESSAGING:Several important new primitives coming to System.ThreadingBarrier and CountdownEvent make coordinating multithreaded code easier than it was beforeTechnical descriptions are boring and not the best candidate for learningLet’s learn Barrier and CountdownEvent through analogy
  7. MESSAGING:The new Barrier synchronization primitive allows you to provide “sync-points” where all threads/tasks of execution meet at. Then, no threads/tasks continue until all of them have arrived at the barrier. This is a way that now you can easily introduce “check points” into your parallel operations if there are naturally areas where you want different execution units to meet. A Barrier can be re-used multiple times to issue many “check points” that could occur in the code.As an example, think about a road trip. If some friends are taking a road trip to Seattle, for instance, they might all meet at the gas station first. They shouldn’t leave the gas station until all of them arrive so they can leave together. In this case, the gas station itself could represent the barrier. There is a natural “check point” that occurs before all of them leave and start driving again to Seattle.
  8. MESSAGING:A new unified cancellation model is being introduced with .NET Framework 4. This new model allows many different operations (like separate threads of execution, I/O calls, etc.) to be organized in such a way that they can all be cancelled with one simple call in a unified way (no matter what the operation itself is).The new CancellationTokenSource and CancellationToken constructs is what the new unified cancellation model is comprised of. The CancellationTokenSource is the core of this model. From a CancellationTokenSource, you can pass out as many CancellationTokens as you wish to various types of operations that are or are not happening in parallel. Then you can use the CancellationTokenSource to signify that everything needs to be cancelled by calling a Cancel() method. Then the cancellation is reflected in all the various tokens.One key aspect of this new model is that the individual tokens that are passed out have no way to signify cancellation themselves. There is also no way to get from a reference to a CancellationToken back to the original CancellationTokenSource. This is by design. When you are passing out tokens to as many operations as you need to in order to keep your cancellation unified, the last thing you want to do is to allow some random token to be able to signify a Cancel() request and then cancel all the other processing that is happening.Think of this another way, compare cancellation tokens by the devices handed out at some restaurants to signify that you (as the customer) are ready to be seated. Though you have the device in your hand, there is no possible way for you personally to make it go off (that would kind of defeat the purpose). The only party that can signal that you are “ready to be seated” is the restaurant itself. This is the same relationship the CancellationTokenSource and CancellationToken have to each other.
  9. MESSAGING:Parallel Extensions is simply a .NET library (meaning, normal .NET code that can be used by any .NET-based language). It contains three different pieces: PLINQ, TPL, and CDS (System.Collections.Concurrent). Parallel Extensions addresses everything from declarative and imperative data parallelism, to imperative task parallelism.
  10. MESSAGING:The task scheduler in Parallel Extensions is very smart and powerful. There are two aspects that make it so: the ability for different worker threads to “steal work” from other threads when there is work to be done, and the addressing of data locality when a thread is determining what work to actually do.When a thread needs to find more work to do, it looks in three different places (in the following order):It’s local queueThe global queueOther thread’s queues that have work to be doneIt’s important to know that data locality is addressed when a thread needs to grab more work to do:When pulling from the local queue, the worker pulls the last item added to the queue. This is because the last item added to the queue has the greatest chance of still being fresh in the cache, as opposed to older items which are more likely have expired and been flushed from cache.When pulling from another worker’s queue, the current worker pulls the oldest item added to the queue. This is because the oldest item added to the queue has the greatest chance of not being in the cache even for its local worker (and hence needing to load in anyways).
  11. MESSAGING:With the introduction of the new Parallel static class, it becomes much easier to parallelize independent statements. The great thing is that if program statements are completely independent from each other (i.e. they don’t share any common shared stated between the various calls are require the calls to take place in a given order), they can easily be parallelized using the new Parallel.Invoke() method. There are other static methods declared off the Parallel class that make other parallel operations easy as well (like Parallel.For() and Parallel.ForEach(). We’ll take a look at some of these in the demo.So one might ask: “Well, if it’s that simple, why doesn’t the compiler just do this for automatically?” The problem is that it’s not quite that simple. In our world of imperative code and shared state, there’s no easy way to guarantee that these methods being called don’t have some sort of state somewhere that they are sharing. It could be five method calls deep, it could be ten, it could be more. You, as the developer, are the one with the necessary knowledge to know where this is true. Therefore, Parallel.Invoke() is strictly an opt-in process. Otherwise, we could do more damage than good.
  12. MESSAGING:PLINQ is a technology that allows developers to _easily_ leveragemanycore. The great thing about PLINQ is that if you are using LINQ-to-objects, there is a very minimal impact to your code in order for it to use PLINQ. All it takes to use PLINQ is adding “.AsParallel()” to your query. This will turn the query into a PLINQ query and will use the PLINQ execution engine when executed.One small change, and your code now takes advantage of all the hardware available to you.NOTES:AsParallel() works by returning an IParallelEnumerable so every subsequent query operator works against the new IParallelEnumerable rather than the normal IEnumerable. See the hands-on lab for Parallel Extensions for more details.