What’s new in .NET 4.5 & Visual Studio 2012? Robert MacLean Technology Specialist, Microsoft MVP BBD PART 1
Nov 20, 2014
What’s new in .NET 4.5 & Visual Studio 2012?
Robert MacLeanTechnology Specialist, Microsoft MVPBBD
PART 1
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
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
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
Agenda: Part 1
History & Trajectory
My favourite mini tricks
Workflow Foundation
Async
5
Agenda: Part 2
Entity Framework
Web Development
6
ASP.NET
What NOT to expect?
ALM: TFS, Git, Unit Testing etc…
Windows Store App dev
LightSwitch (because you are coming to my other talk)
7
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
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
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!
My favourite mini tricks
Upgrading to VS 2012
New culture options & how Windows 8 will break your appsHow CallerMemberName will make your MVVM better
My favourite mini tricks
Did you see what Microsoft changed in Win8?
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
Review: My favourite mini tricks
VS 2012 upgrading is a much lower risk
Culture can be globally controlled
CallerMemberName = awesome
Workflow Foundation
Look at the much improved designer
We finally get C# support
Review of workflow persistence, good, bad & what fixes it!
Workflow Foundation
Workflow Persistence: What is it?
Wait for later time
Crashes
Wait for event
Timer
Admin
Event
CodeWorkflow
Database Server
Workflow Persistence: Problem?
Wait for later time
Crashes
Wait for event
Timer
Admin
Event
CodeWorkflow
Database Server
Workflow Persistence in .NET 4.5
Workflow 4.5 has versioning
Side by side versioning
Dynamic update versioning
Review: Workflow Foundation
Designer has been vastly improved
C# support
Workflow persistence
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
Async
Image © Kathy Cassidy on Flickr
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
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
Contact
@rmaclean
www.sadev.co.za
See you soon for PART 2 – Thank you!
What’s new in .NET 4.5 & Visual Studio 2012?
Robert MacLeanTechnology Specialist, Microsoft MVPBBD
PART 2
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
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
Agenda: Part 1
History & Trajectory
My favourite mini tricks
Workflow Foundation
Async
30
Agenda: Part 2
Entity Framework
Web Development
31
ASP.NET
What NOT to expect?
ALM: TFS, Git, Unit Testing etc…
Windows Store App dev
LightSwitch (because you are coming to my other talk)
32
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
Entity Framework
Image © puntxote on Flickr
Review: Entity Framework
Runs on it’s own cadence – EF 6 is coming
Enumerator support
Support for LocalDB
Designer Improvements
35
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
What is new in Web Dev?
SPA – other templates
Knockout.js – out of the boxEmberJSDurandalJS
A template that mergesjQueryDurandalJSBreezeJSKnockoutJSrequireJSToastr.jsTwitter Bootstrap
Bundles
Before324,34 KB
After110,58 KB
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
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
Review: Web Development
Cadence – more toys; more often
Responsive templates
Visual Studio improvements for web devs
Web Forms feature parity with MVC
42
Review: ASP.NET
Web API
Bundles
Single Page Applications
43
Review
Entity Framework: the features you have asked for!
ASP.NET – SO MUCH STUFF!!!!
Visual Studio – the best web development IDE
44
Contact
@rmaclean
www.sadev.co.za
Thank you!