visual studio .net2010

42
Ofir Aspis 1/2010 www.bna.co.il [email protected]

Upload: satish-verma

Post on 30-Nov-2014

3.568 views

Category:

Education


1 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Visual Studio .NET2010

Ofir Aspis 1/[email protected]

Page 2: Visual Studio .NET2010

VS 2010 Targets High Level - IDE New Features VS 2010 As Editor and Platform Demo

◦ Editor features◦ Extending the IDE◦ Web MVC 2 and TDD

Break What’s new in .Net Framework 4.0 and C#

4.0◦ New Language Features◦ New Framework Application Blocks

Page 3: Visual Studio .NET2010

Audience

Featu

re S

et

Minimal

Complete

Hobbyist Enterprise

ProfessionalProfessional

UltimateUltimate

ExpressExpress

PremiumPremium

Page 4: Visual Studio .NET2010

VSTS Team Suitew/ MSDN PremiumVSTS Team Suite

w/ MSDN Premium

VSTS Development Ed.w/ MSDN Premium

VSTS Development Ed.w/ MSDN Premium

VSTS Database Ed.w/ MSDN PremiumVSTS Database Ed.w/ MSDN Premium

VSTS Test Ed.w/ MSDN Premium

VSTS Test Ed.w/ MSDN Premium

VSTS Architecture Ed.w/ MSDN Premium

VSTS Architecture Ed.w/ MSDN Premium

Visual Studio Professionalw/ MSDN Professional

Visual Studio Professionalw/ MSDN Premium

Visual Studio Professional

Visual Studio Standard

VS 2010 Ultimatew/ MSDN

VS 2010 Ultimatew/ MSDN

VS 2010 Premiumw/ MSDN

VS 2010 Premiumw/ MSDN

VS 2010 Professionalw/ MSDN

VS 2010 Professional

Page 5: Visual Studio .NET2010

Visual Studio 2010ProfessionalVisual Studio 2010Professional

New WPF EditorNew WPF Editor

Generate FromUsage

Generate FromUsage

Customizable IDECustomizable IDE

Silverlight ToolingSilverlight Tooling

Multi-CoreDevelopment

Multi-CoreDevelopment

CloudDevelopment

CloudDevelopment

WebDevelopment

WebDevelopment

WindowsDevelopment

WindowsDevelopment

OfficeDevelopment

OfficeDevelopment

SharePointDevelopment

SharePointDevelopment

Page 6: Visual Studio .NET2010

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

JQuery Intellisense

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

New features, the tip of the iceberg…

Improved WPF Tooling

Page 7: Visual Studio .NET2010

Visual Studio As An Editor

Visual Studio As A Platform

Page 8: Visual Studio .NET2010

An improved focus on …

Writing code,

Understanding code,

Navigating code,

Publishing code

Page 9: Visual Studio .NET2010

Demo

Page 10: Visual Studio .NET2010

New Extensible Editor allows editor to be easily extended to provide a rich and robust editing experience

Online Visual Studio Gallery integrated directly into Visual Studio

Page 11: Visual Studio .NET2010

Enabling the Visual Studio Ecosystem through:

Online Templates

Extensions and Extension Manager

All Contributable by Community

Page 12: Visual Studio .NET2010

Demo

Page 13: Visual Studio .NET2010

Beta 2, October 19th, 2009

RTM, March 22nd, 2010

Page 14: Visual Studio .NET2010
Page 15: Visual Studio .NET2010

.Net Framework - A Brief Review

.Net Framework 4.0 Highlights

Managed Extensibility Framework (MEF)

Managed Languages

C# 4.0 New Features

Dynamic Language Runtime (DLR)

F#

Page 16: Visual Studio .NET2010

Base Class LibrariesBase Class Libraries

The CLRJIT & NGENJIT & NGEN

Garbage CollectorGarbage Collector

Security Model

Security Model

Exception HandlingException Handling

Loader & Binder

Loader & Binder

WPFWPF Win FormsWin

Forms DLRDLR ASP.NETASP.NET WCFWCF And more!And more!LINQLINQ

Page 17: Visual Studio .NET2010

.NET 1.0.NET 1.0 .NET 1.1.NET 1.1 .NET 2.0.NET 2.0

3.03.0

3.53.5

.NET 4.NET 4

2002 2003 2008 CTP2005-08

CLR 1.0CLR 1.0 CLR 1.1CLR 1.1 CLR 2.0CLR 2.0 CLR 4CLR 4

SP1SP1

Page 18: Visual Studio .NET2010

Client ApplicationsClient Applications

WPF 4MEF

Web ApplicationsWeb Applications

Web Forms 4AJAX 4

Client/ServerClient/Server

WCF 4

Page 19: Visual Studio .NET2010

The Managed Extensibility Framework (MEF) is a new library in the .NET Framework that enables greater reuse of applications and components.

Using MEF, .NET applications can make the shift from being statically compiled to dynamically composed

Page 20: Visual Studio .NET2010

Our managed languages are starting to share some very similar features:

Functional

Concise

Declarative

Page 21: Visual Studio .NET2010

Imperative Declarative

What

How

Page 22: Visual Studio .NET2010

Before

IList<Person> FindParentsWithChildNamed(string childName)

{var matches = new List<Person>();

foreach(var person in _people) { foreach(var child in person.Children) { if (child.Name.Equals(childName)) { matches.Add(person); break; } }

}return matches;

}

Page 23: Visual Studio .NET2010

IList<Person> FindParentsWithChildNamed(string childName) }

var matches = from person in people from child in person.Children

where child.Name.Equals(childName) select person;

return matches.ToList;(){

After

Page 24: Visual Studio .NET2010

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;

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;

Page 25: Visual Studio .NET2010
Page 26: Visual Studio .NET2010

C# 1.0C# 1.0

C# 2.0C# 2.0

C# 3.0C# 3.0

Managed Code

Generics

LINQ

C# 4.0C# 4.0

Dynamic

Page 27: Visual Studio .NET2010

1. Late-Binding Support

2. Named and Optional Parameters

3. Improved COM Interop

4. Covariance and Contravariance

Page 28: Visual Studio .NET2010

Consider this example:public void M(int x, int y = 5, int z = 7) { }

In this method, the parameters y and z are assigned default values. Calls to this method might look like this:

M(1, 2, 3); // ordinary call of MM(1, 2); // omitting z – equivalent to M(1, 2, 7)M(1);  // omitting both y and z – equivalent to M(1, 5, 7)M(1, z: 3); // passing z by nameM(x: 1, z: 3); // passing both x and z by nameM(z: 3, x: 1); // reversing the order of arguments

Page 29: Visual Studio .NET2010

Interop Assemblies translate between managed code and COM

For each interface, struct, enum, delegate, and member, contains a managed equivalent with marshalling data

Page 30: Visual Studio .NET2010

Primary Interop Assemblies cause many

pain points…

Page 31: Visual Studio .NET2010

1. Compilers embed the portions of the interop assemblies that the add-ins actually use

2. Runtime ensures the embedded definitions of these types are considered equivalent

Page 32: Visual Studio .NET2010
Page 33: Visual Studio .NET2010

Common Language Runtime

Statically-Typed

C#VB

RubyPython

Dynamically-Typed

Page 34: Visual Studio .NET2010

Common Language Runtime

Statically-Typed

C#VB

RubyPython

Dynamically-Typed

Dynamic Language Runtime

Page 35: Visual Studio .NET2010

PythonBinderPythonBinder

RubyBinderRuby

BinderCOM

BinderCOM

BinderJScriptBinderJScriptBinder

ObjectBinderObjectBinder

Dynamic Language RuntimeDynamic Language Runtime

Expression TreesExpression TreesExpression TreesExpression Trees Dynamic Dynamic DispatchDispatchDynamic Dynamic DispatchDispatch Call Site CachingCall Site CachingCall Site CachingCall Site Caching

IronPython

IronPython IronRubyIronRuby C#C# VB.NETVB.NET Others…Others…

Page 36: Visual Studio .NET2010

Calculator calc = GetCalculator;)(int sum = calc.Add(10, 20);

object calc = GetCalculator;)(Type calcType = calc.GetType;)(

object res = calcType.InvokeMember("Add",

BindingFlags.InvokeMethod, null, new object[] { 10, 20 };)

int sum = Convert.ToInt32(res);

ScriptObject calc = GetCalculator;)(object res = calc.Invoke("Add", 10, 20);int sum = Convert.ToInt32(res);

dynamic calc = GetCalculator;)(int sum = calc.Add(10, 20);

Statically typed to be

dynamic

Statically typed to be

dynamic

Dynamic method

invocation

Dynamic method

invocation

Dynamic conversionDynamic

conversion

Page 37: Visual Studio .NET2010
Page 38: Visual Studio .NET2010

F# is .NET managed programming language combining functional programming and object-oriented programming.

It’s ideally suited for parallel, algorithmic, technical and explorative development

F# is a strongly-typed language like C#, but with a lightweight syntax often seen in a dynamic language like Python

Page 39: Visual Studio .NET2010

“Programming in The Small” with Tuples and functions

Simple, and more error-free asynchronous programming

Strong types for floating point code

Integrated with Visual Studio 2010

Page 40: Visual Studio .NET2010

let data = (1,2,3) let rotations (x, y, z) = [ (x, y, z); (z, x, y); (y, z, x) ] let derivative f x = let p1 = f (x - 0.05) let p2 = f (x + 0.05) (p2 - p1) / 0.1 let f x = 2.0*x*x - 6.0*x + 3.0 let df = derivative f System.Console.WriteLine("The derivative of f at x=4 is {0}", df 4.0)

Page 41: Visual Studio .NET2010

let http url = async { let req = WebRequest.Create(Uri url) let! resp = req.AsyncGetResponse() let stream = resp.GetResponseStream() let reader = new StreamReader(stream) let! contents = reader.AsyncReadToEnd() return contents } let sites = ["http://bing.com"; "http://microsoft.com"; "http://msdn.com"; "http://msnbc.com"] let htmlOfSites = Async.Parallel [for site in sites -> http(site)] |> Async.RunSynchronously

Page 42: Visual Studio .NET2010

Visual Studio 2010/.NET Framework 4.0 Training Kit◦ November Preview: http://tinyurl.com/5zf8y8

Visual Studio Topic Area on Channel 9◦ http://channel9.msdn.com/visualstudio◦ Includes videos from VS2010 and VSTS2010 weeks on

Channel 9

VS2010/NETFX4 Futures on MSDN◦ http://msdn.microsoft.com/en-us/vs2008/products/

cc948977.aspx