What’s new in Visual Studio 2012 & .NET 4.5

45
What’s new in .NET 4.5 & Visual Studio 2012? Robert MacLean Technology Specialist, Microsoft MVP BBD PART 1

description

Slides from TechEd Africa 2013 for both part 1 & part 2 for the talk: What’s new in Visual Studio 2012 & .NET 4.5

Transcript of What’s new in Visual Studio 2012 & .NET 4.5

Page 1: What’s new in Visual Studio 2012 & .NET 4.5

What’s new in .NET 4.5 & Visual Studio 2012?

Robert MacLeanTechnology Specialist, Microsoft MVPBBD

PART 1

Page 2: What’s new in Visual Studio 2012 & .NET 4.5

Join the user group at www.DeveloperUG.org.za

Join the DeveloperUG

Monthly user group meetings & workshops

Range of topics, from crafting code to web & app technologies

Page 3: What’s new in Visual Studio 2012 & .NET 4.5

What to expect?

A platter of .NET 4.5 & VS 2012 features

Lots of demos at a high level

See it here! Dig into it in other sessions!

3

Page 4: What’s new in Visual Studio 2012 & .NET 4.5

So what is new?

Trajectory

WCF

WebSockets

UDP

Better Tooling

Cleaner configs

Validate config in build

Async support

Binary encoder compression support

Multiple authentication support

IDN

Portable Class Libraries

CLR

Less restarts

Culture Changes

Arrays > 2Gb

Better GC

Multicore JIT

RegEx Timeouts

UTF-16 for Console

SortVersion

Better perf for resources

Better ZIP compression

IDN support

String compare changes on Win 8 kernel

Changes to Reflection

MEF

Generics

Convention support

Multiple scopes

Windows Store support

Networking

Better HTTP support

WebSockets

RFC compliant URI’s

EAI & IDN

Better IPv6

Dual-mode sockets

WPF

Ribbon

INotifyDataErrorInfo

Better VirtualizingPanel

Better perf for large data sets

Data binding to static properties

Live shaping

Check for disconnected data context

Delay updating to target

Better weak event support

WF

State machine

Storage of view state

NoPersistScope

Contract-first workflow services

Parallel

Perf improvements (400%)

Better PLINQ support

Partitioning, reductions, timeouts

DataFlow

Tooling

Entity Framework

Enum support

LocalDB

New Cadence

Designer Improvements

ASP.NET

Cadence

Responsive Templates

BEST IDE

Web Forms Partity

Web API

SignalR

SPA

C#

Async

Caller Info

VB.NET

Async

Iterators

Call Hierarchy

Caller Info

Global Keyword

Code Editing

C++

STL improvements

Range based loops

Stateless Lambdas

Scoped Enums

Auto verctorizer

Auto parallelizer

AMP

F#

Type Providers

Query Expressions

Auto-implemented properties

Page 5: What’s new in Visual Studio 2012 & .NET 4.5

Agenda: Part 1

History & Trajectory

My favourite mini tricks

Workflow Foundation

Async

5

Page 6: What’s new in Visual Studio 2012 & .NET 4.5

Agenda: Part 2

Entity Framework

Web Development

6

ASP.NET

Page 7: What’s new in Visual Studio 2012 & .NET 4.5

What NOT to expect?

ALM: TFS, Git, Unit Testing etc…

Windows Store App dev

LightSwitch (because you are coming to my other talk)

7

Page 8: What’s new in Visual Studio 2012 & .NET 4.5

History lesson

CLR 1.0 CLR 1.1 CLR 4.0CLR 2.0

.NE

T 1

.0

C#

1.0

VB

7.0

.NE

T 1

.1

C#

1.2

VB

7.1

.NE

T 2

.0

C#

2.0

VB

8.0.N

ET 3

.0

C#

2.0

VB

8.0.N

ET 3

.5

C#

3.0

VB

9.0.N

ET 3

.5

SP 1

C#

3.0

VB

9.0

.NE

T 4

C#

4.0

VB

10

.0

.NE

T 4

.5

C#

5.0

VB

11

.0Released 13 Feb 2002

Page 9: What’s new in Visual Studio 2012 & .NET 4.5

Cadence

VS & TFS: Cumulative updates that ship ~3 months

ASP.NET & EF : Using Nuget to update more often

Since August 2012

10 updates from various teams that update VS

Page 10: What’s new in Visual Studio 2012 & .NET 4.5

Cadence

Lots of new functionality in the Gallery

Since August 2012

Almost 20 extensions released by Microsoft

That means a new extension almost every 13 days!

Excluding updates!

Page 11: What’s new in Visual Studio 2012 & .NET 4.5

My favourite mini tricks

Upgrading to VS 2012

New culture options & how Windows 8 will break your appsHow CallerMemberName will make your MVVM better

Page 12: What’s new in Visual Studio 2012 & .NET 4.5

My favourite mini tricks

Page 13: What’s new in Visual Studio 2012 & .NET 4.5

Did you see what Microsoft changed in Win8?

Page 14: What’s new in Visual Studio 2012 & .NET 4.5

Impact of that little change?

Office: I am learning a whole new set of pain

.NET: .Format, .ToString & .Parse

SharePoint: Built on .NET – impacted by this

Your existing data in a database

Page 15: What’s new in Visual Studio 2012 & .NET 4.5

Review: My favourite mini tricks

VS 2012 upgrading is a much lower risk

Culture can be globally controlled

CallerMemberName = awesome

Page 16: What’s new in Visual Studio 2012 & .NET 4.5

Workflow Foundation

Look at the much improved designer

We finally get C# support

Review of workflow persistence, good, bad & what fixes it!

Page 17: What’s new in Visual Studio 2012 & .NET 4.5

Workflow Foundation

Page 18: What’s new in Visual Studio 2012 & .NET 4.5

Workflow Persistence: What is it?

Wait for later time

Crashes

Wait for event

Timer

Admin

Event

CodeWorkflow

Database Server

Page 19: What’s new in Visual Studio 2012 & .NET 4.5

Workflow Persistence: Problem?

Wait for later time

Crashes

Wait for event

Timer

Admin

Event

CodeWorkflow

Database Server

Page 20: What’s new in Visual Studio 2012 & .NET 4.5

Workflow Persistence in .NET 4.5

Workflow 4.5 has versioning

Side by side versioning

Dynamic update versioning

Page 21: What’s new in Visual Studio 2012 & .NET 4.5

Review: Workflow Foundation

Designer has been vastly improved

C# support

Workflow persistence

Page 22: What’s new in Visual Studio 2012 & .NET 4.5

Async

Look at async & await modifiers

See how to use your existing Task skills

New TPL features: WhenAll, WhenAny, Delay

Review how the framework is leveraging this

Page 23: What’s new in Visual Studio 2012 & .NET 4.5

Async

Image © Kathy Cassidy on Flickr

Page 24: What’s new in Visual Studio 2012 & .NET 4.5

Review: Async

async & await modifiers give us syntactic sugar

Build using the Tasks – so your current Task skills carry over

New TPL features: WhenAll, WhenAny, Delay

Plenty of .NET API’s offering async modes

Page 25: What’s new in Visual Studio 2012 & .NET 4.5

Review

History & Trajectory – expect more features more often

VS Update is low risk

Mini tricks: CallerMemberName & Culture

Workflow development & versioning

25

Async: another tool in your concurrency tool belt

Page 26: What’s new in Visual Studio 2012 & .NET 4.5

Contact

@rmaclean

www.sadev.co.za

See you soon for PART 2 – Thank you!

Page 27: What’s new in Visual Studio 2012 & .NET 4.5

What’s new in .NET 4.5 & Visual Studio 2012?

Robert MacLeanTechnology Specialist, Microsoft MVPBBD

PART 2

Page 28: What’s new in Visual Studio 2012 & .NET 4.5

What to expect?

A platter of .NET 4.5 & VS 2012 features

Lots of demos at a high level

See it here! Dig into it in other sessions!

28

Page 29: What’s new in Visual Studio 2012 & .NET 4.5

So what is new?

Trajectory

WCF

WebSockets

UDP

Better Tooling

Cleaner configs

Validate config in build

Async support

Binary encoder compression support

Multiple authentication support

IDN

Portable Class Libraries

CLR

Less restarts

Culture Changes

Arrays > 2Gb

Better GC

Multicore JIT

RegEx Timeouts

UTF-16 for Console

SortVersion

Better perf for resources

Better ZIP compression

IDN support

String compare changes on Win 8 kernel

Changes to Reflection

MEF

Generics

Convention support

Multiple scopes

Windows Store support

Networking

Better HTTP support

WebSockets

RFC compliant URI’s

EAI & IDN

Better IPv6

Dual-mode sockets

WPF

Ribbon

INotifyDataErrorInfo

Better VirtualizingPanel

Better perf for large data sets

Data binding to static properties

Live shaping

Check for disconnected data context

Delay updating to target

Better weak event support

WF

State machine

Storage of view state

NoPersistScope

Contract-first workflow services

Parallel

Perf improvements (400%)

Better PLINQ support

Partitioning, reductions, timeouts

DataFlow

Tooling

Entity Framework

Enum support

LocalDB

New Cadence

Designer Improvements

ASP.NET

Cadence

Responsive Templates

BEST IDE

Web Forms Partity

Web API

SignalR

SPA

C#

Async

Caller Info

VB.NET

Async

Iterators

Call Hierarchy

Caller Info

Global Keyword

Code Editing

C++

STL improvements

Range based loops

Stateless Lambdas

Scoped Enums

Auto verctorizer

Auto parallelizer

AMP

F#

Type Providers

Query Expressions

Auto-implemented properties

Page 30: What’s new in Visual Studio 2012 & .NET 4.5

Agenda: Part 1

History & Trajectory

My favourite mini tricks

Workflow Foundation

Async

30

Page 31: What’s new in Visual Studio 2012 & .NET 4.5

Agenda: Part 2

Entity Framework

Web Development

31

ASP.NET

Page 32: What’s new in Visual Studio 2012 & .NET 4.5

What NOT to expect?

ALM: TFS, Git, Unit Testing etc…

Windows Store App dev

LightSwitch (because you are coming to my other talk)

32

Page 33: What’s new in Visual Studio 2012 & .NET 4.5

Entity Framework

Look at how easy it is to start with EF

Showing the designer & code first improvements

Show off the awesome new LocalDB

33

Page 34: What’s new in Visual Studio 2012 & .NET 4.5

Entity Framework

Image © puntxote on Flickr

Page 35: What’s new in Visual Studio 2012 & .NET 4.5

Review: Entity Framework

Runs on it’s own cadence – EF 6 is coming

Enumerator support

Support for LocalDB

Designer Improvements

35

Page 36: What’s new in Visual Studio 2012 & .NET 4.5

Web development

Visual Studio is the best IDE for web dev & I’ll prove it

Latest web trends: responsive, SPA, bundling

New powerful services: Web API

36

We are going to jump around a bit

Page 37: What’s new in Visual Studio 2012 & .NET 4.5

What is new in Web Dev?

Page 38: What’s new in Visual Studio 2012 & .NET 4.5

SPA – other templates

Knockout.js – out of the boxEmberJSDurandalJS

A template that mergesjQueryDurandalJSBreezeJSKnockoutJSrequireJSToastr.jsTwitter Bootstrap

Page 39: What’s new in Visual Studio 2012 & .NET 4.5

Bundles

Before324,34 KB

After110,58 KB

Page 40: What’s new in Visual Studio 2012 & .NET 4.5

Bundles

Before 121,8 KB

After121,31 KB

0,4% Improvement… uh so what?

That becomes a 1.05% improvement!

Max connections 6 to 8 + latency improvements

Average HTTP heads is 700 to 800 - Google SPDY Research White Paper

Page 41: What’s new in Visual Studio 2012 & .NET 4.5

Web Essentials 2012 – at time of slide creation• TypeScript

• Regions

• Source Maps

• Compiler Options

• Minifications

• StyleSheets• Options

• Vendor specific extensions

• Add missing standard properties

• Keep vendor tags in sync while editing

• Display Browser Support

• Modenizer Support

• !important

• Always up to date with browsers

• Add region

• Custom fonts

• iOS Scrollbars

• CSS 3 animation names

• Inline URL picker

• Browser compat warnings

• Remove duplicate properties

• CSS Gradients

• Lighten/darken key shortcuts

• Move properties up & down

• F1 opens correct specification

• Team wide colour schemes

• LESS

• Embed URL as Base64

• Minification

• Font preview

• Image preview

• Sort properties

• Drag & drop for images & fonts

• Add smart tags

• Better intellisense

• JavaScript• JSHint

• Regions

• Minification

• JsDoc

• Outlining

• Auto-complete braces

• Smarter indent

• Zen Coding• Lorem Ipsem Generator• Mark down preview

Page 42: What’s new in Visual Studio 2012 & .NET 4.5

Review: Web Development

Cadence – more toys; more often

Responsive templates

Visual Studio improvements for web devs

Web Forms feature parity with MVC

42

Page 43: What’s new in Visual Studio 2012 & .NET 4.5

Review: ASP.NET

Web API

Bundles

Single Page Applications

43

Page 44: What’s new in Visual Studio 2012 & .NET 4.5

Review

Entity Framework: the features you have asked for!

ASP.NET – SO MUCH STUFF!!!!

Visual Studio – the best web development IDE

44

Page 45: What’s new in Visual Studio 2012 & .NET 4.5

Contact

@rmaclean

www.sadev.co.za

Thank you!