Overview of VS2010 and .NET 4.0
-
Upload
bruce-johnson -
Category
Documents
-
view
1.710 -
download
3
description
Transcript of Overview of VS2010 and .NET 4.0
![Page 1: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/1.jpg)
![Page 2: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/2.jpg)
An Overview of VS2010 and .NET 4.0
![Page 3: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/3.jpg)
Visual Studio Targets Many…
Audience
Feat
ure
Set
Minimal
Complete
Hobbyist Enterprise
Professional
Team System
Express
![Page 4: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/4.jpg)
…and there are Four Pillars
Understanding The Code
Building WebApplications
Creating OfficeBusiness
Applications
Using ThePower of
C++
![Page 5: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/5.jpg)
New Look & Feel
Web Deploy
web.config Transformation
Call Hierarchy
Inline Call Tree
Highlight References
Document Map Margin
Extensible Test Runner
WPF-based Editor
Sharepoint Tooling
JQueryIntellisense
HTML Snippets
Historical Debugging
Concurrency Profiler
Parallel Tasks Window
Parallel Stacks Window
Quick Search
Generate From Usage
Improved Multi-Monitor
MVC Tooling
Dynamic Data Tooling
Click-Once Enhancements for Office
64-bit Mixed-Mode
Minidump Debugging
Breakpoint Grouping
Breakpoint Labeling
Breakpoint Import/Export
Improved WPF Tooling
New Visual Studio 2010 Features…
![Page 6: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/6.jpg)
The Two Faces of Visual Studio 2010
Visual Studio As An Editor
An improved focus on… Writing code,
Understanding code,Navigating code,Publishing code
![Page 7: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/7.jpg)
NEW VS2010 CAPABILITIES
![Page 8: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/8.jpg)
The Two Faces of Visual Studio 2010
Visual Studio As A Platform
New Editor allows for easy extensibility to provide a rich and robust editing experience
Online Visual Studio Gallery integrated directly into Visual Studio
![Page 9: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/9.jpg)
Extension Manager
![Page 10: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/10.jpg)
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
![Page 11: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/11.jpg)
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
![Page 12: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/12.jpg)
Applications Made Out of Parts
![Page 13: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/13.jpg)
The Import/Export Business
Export
Import
Got
Need
Parts
![Page 14: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/14.jpg)
The Extensibility Scenario
Application
Extension A
Extension B
Need Menus
Got a Menu
Need a Toolwindow
Need a MenuService
Got a Toolwindow
Got a MenuService
![Page 15: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/15.jpg)
…Put into Geek Terms
Part
Part Part
ImportMenus
Export aMenu
Import “Toolwindow”
Export IMenuService
Export “Toolwindow”
Import IMenuService
![Page 16: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/16.jpg)
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
![Page 17: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/17.jpg)
EXTENDING VISUAL STUDIO
![Page 18: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/18.jpg)
The Target of CLR 4
• Working Better Together…
In-Proc SxS
Native/Managed InteropDLR Integration
Managed Extensibility Framework
Threading Parallel Extensions
Garbage Collection Profiling
Code Contracts DebuggingCorrupted State Exceptions
Faster
With Fewer Bugs…
Working Better Together…
![Page 19: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/19.jpg)
Side-by-Side (Sxs) at .NET 3.5
.NET 2.0
2.0 add-in
3.0
3.5
Host Process (i.e. Outlook)
3.0 add-in
3.5 add-in
1.1 add-in
.NET 1.1
![Page 20: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/20.jpg)
Side-By-Side (SxS) at .NET 4.0
.NET 2.0.NET 4.0
2.0 add-in
3.0
3.5
Host Process (i.e. Outlook)
3.0 add-in
3.5 add-in
4.0 add-in
![Page 21: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/21.jpg)
The target of CLR 4
In-Proc SxS
Native/Managed InteropDLR Integration
Managed Extensibility Framework
Threading Parallel Extensions
Garbage Collection Profiling
Code Contracts DebuggingCorrupted State Exceptions
Faster
With Fewer Bugs…
Working Better Together…
![Page 22: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/22.jpg)
The Parallel Computing Initiative
Based on the following premise:
“Concurrency for the masses”
Let the brightest developers solve business problems, not concurrency problems.
![Page 23: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/23.jpg)
Concurrency Landscape
For Visual Studio 2010 and the .NET Framework 4…
System.Threading Parallel Extensions
Unified Cancellation Model
![Page 24: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/24.jpg)
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!
![Page 25: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/25.jpg)
Barrier“Let’s all head to Wasaga! We’ll meet at the gas station and leave from there.”
Mac
Charlie
Dennis
Wasaga
Barrier
Gas Station
![Page 26: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/26.jpg)
Unified Cancellation“Sir, we are ready to seat you…” - Hostess
CancellationTokenSource
CancellationToken
![Page 27: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/27.jpg)
THE UNIFIED CANCELLATION MODEL
![Page 28: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/28.jpg)
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.
1. Parallel LINQ (PLINQ)
2. Task Parallel Library (TPL)
3. Coordination Data Structures (CDS)
![Page 29: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/29.jpg)
“Work Stealing” in Action
Worker Thread
1
Worker Thread
pProgram
ThreadTask 1
Task 2Task 3
Task 5Task 4
![Page 30: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/30.jpg)
Parallel Static Class
When program statements are independent…
…they can be parallelized
StatementA();StatementB();StatementC();
Parallel.Invoke( () => StatementA(), () => StatementB(), () => StatementC() );
![Page 31: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/31.jpg)
PARALLEL STATIC CLASS
![Page 32: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/32.jpg)
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 orderby p.Year ascending select p;
.AsParallel()
![Page 33: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/33.jpg)
PARALLELIZING LINQ
![Page 34: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/34.jpg)
The goal of CLR 4
In-Proc SxS
Native/Managed InteropDLR Integration
Managed Extensibility Framework
Threading Parallel Extensions
Garbage Collection Profiling
Code Contracts DebuggingCorrupted State Exceptions
Faster
With Fewer Bugs…
Working Better Together…
![Page 35: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/35.jpg)
Design By Contract
• Code Contracts introduce a way to specify contractual information that is not represented by a method or type’s signature alone.
![Page 36: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/36.jpg)
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’
![Page 37: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/37.jpg)
Why Contracts?
• Just because something compiles, doesn’t mean it works…
![Page 38: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/38.jpg)
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;}
![Page 39: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/39.jpg)
A Contract contains…
• Invariants - must always be true
[ContractInvariantMethod]protected void ObjectInvariant(){Contract.Invariant(denominator > 0);}
![Page 40: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/40.jpg)
CODE CONTRACTS
![Page 41: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/41.jpg)
Database ChoicesRe
sour
ces
Dedicated
Shared
Low High“Friction”/Control
SQL Azure (RDBMS)
Value Props:Auto HA, Fault-ToleranceFriction-free scaleSelf-provisioningHigh compatibility
Virtual DB serverResource governance @ LDB Security @ LDB
Hosted Hosted SQL Server or other Resource governance @ VM Security @ DB Server/OS
On-premise SQL Server or other s/w on-premise Resource governance @ machine Security @ DB Server/OS
Value Props:Full h/w control – size/scale100% compatibilityRoll-your-own HA/DR/scale
Value Props:100% of API surface area
Roll-your-own HA/DR/scale
SQL Azure V1 targets scenarios that live in the lower left quadrant
![Page 42: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/42.jpg)
Windows Azure PlatformCompute: 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
![Page 43: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/43.jpg)
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
![Page 44: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/44.jpg)
V1 Application Topologies
MSDatacenter
SOAP/RESTHTTP/S
SQL Azure access from within MS Datacenter (Azure compute – ADO.NET)
Windows Azure
T-SQL (TDS)
MSDatacenter
T-SQL (TDS)
App Code / Tools
SQL Azure access from outside MS Datacenter (On-premises – ADO.NET)
App Code(ASP.NET)
ADO.NET Data Svcs/REST - EFHTTP/S
Code Far
SQL Data Services
SQL Data Services
Application/ Browser
Code Near
![Page 45: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/45.jpg)
SQL AzureDeployment
SQL AzureTDS Gateway
DB Script
![Page 46: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/46.jpg)
SQL AzureAccessing databases
Your App
Change Connection String
SQL AzureTDS Gateway
![Page 47: Overview of VS2010 and .NET 4.0](https://reader034.fdocuments.in/reader034/viewer/2022042700/5578c5f4d8b42a85538b4eae/html5/thumbnails/47.jpg)
CONNECTING TO SQL AZURE