VisualStudio2012-WhatsNew-TechEd_v3-9

Post on 13-Dec-2014

698 views 0 download

Tags:

description

 

Transcript of VisualStudio2012-WhatsNew-TechEd_v3-9

What’s new in Visual Studio 2012

Adam CoganChief Architect @ SSW and Microsoft Regional Director

#DEV211

V3.9

AgendaHistoryIDE Improvements

UISearch EverywherePerformance Tweaks

Developer GoodiesWeb developer friendlinessUnit TestingIntelliTraceMTM - Exploratory TestingFeedback ToolsStoryboarding

About Adam

Chief Architect at SSWDeveloping custom solutionsPerform Software Audits

Microsoft Gold PartnerMicrosoft Regional DirectorASP InsiderALM MVP

MVP of the year

@AdamCogan

VS 2002

Web FormsXML Web ServicesWindows Forms

VS 2003

.NET 1.1Mobile Devices(ASP.NET)Compact FrameworkEnterprise Templates

VS 2005

.NET 2.0ASP.NET 2.0GenericsLocal web serverClick once

VS 2008

.NET 3.5LINQ, LINQ to SQLWPF/HTML DesignersJavaScript IntelliSense

VS 2010

.NET 4.0F#Parallel ExtensionsQuick Search (Navigate to)IntelliTrace

* Resharper: Control+t

VS 2012

.NET 4.5ASP.NET MVC 4HTML5Parallel Computing“Metro” AppsNew Solution ExplorerWeb SocketsPortable Class LibrariesUPPERCASE and more Grey

VS 2012

Metro

? The Metro lookThe Metro look“Modern UI Style” look

CTRL + SHIFT + H (Find and Replace All)e.g. http://www.theverge.com/2012/8/10/3232921/microsoft-modern-ui-style-metro-style-replacement

VS 2012

Colour!

VS 2012

Colour!

In .NET 1.0 + 1.1 - ArrayLists(System.Collections) ArrayList greeks = new ArrayList();greeks.Add("Alexopoulos");greeks.Add("Gianopoulos");greeks.Add("Michaelides"); //andArrayList names = new ArrayList();foreach(string g in greeks){    if(g.IndexOf(“opoulos”) > -1)    {        

names.Add(g);    } }

In .NET 2.0 - Generic Lists - enforces type, more OO, reduce code if different types(System.Collections.Generic) List<string> greeks = new List<string>();greeks.Add("Alexopoulos");greeks.Add("Gianopoulos");greeks.Add("Michaelides"); 

//andList<string> names = new List<string>();foreach(string g in greeks){    if(g.Contains(“opoulos”))    {        

names.Add(g);    }}

In .NET 3.5 - Iqueryables - nicer to query(System.Linq) List<string> greeks = new List<string>();greeks.Add("Alexopoulos");greeks.Add("Gianopoulos");greeks.Add("Michaelides");  //andIEnumerable<string> opoulos = greeks.Where(x => x.Contains(“opoulos”));

In .NET 4.0  (thread safe)(System.Collections.Concurrent) public class ConcurrentBag<T> : IProducerConsumerCollection<T>,         

IEnumerable<T>, ICollection, IEnumerable  // Represents a thread-safe, unordered collection of objects.   static void Main()    {        // Construct and populate the ConcurrentBag        ConcurrentBag<string> cb = new ConcurrentBag<string>();        cb.Add("Alexopoulos");        cb.Add("Gianopoulos");        cb.Add("Michaelides");         // Consume the items in the bag         int item;        while (!cb.IsEmpty)        {            if (cb.TryTake(out item))               

Console.WriteLine(item);            else               

Console.WriteLine("TryTake failed for non-empty bag");        }         // Bag should be empty at this point         if (cb.TryPeek(out item))           

Console.WriteLine("TryPeek succeeded for empty bag!");    }

In .NET 4.5   (casting backwards - read only)(System.Collections.Generic)

public class Greek : Person{..} List<Greek> greeks = new List<Greek>(){    new Greek() { LastName  = "Alexopoulos" },   

new Greek () { LastName = "Gianopoulos" },    new Greek () { LastName  = "Michaelides" },};

// IReadOnly

//List supports covarianceIReadOnlyList<Person> people = greeks;Person first = people[0];

Search is Everywhere!

You can search for items in most windowsSolution ExplorerTeam ExplorerAdd New ItemsAdd References…

Solution Explorer

Team Explorer

Add New ItemsCtrl+E (grr)

Add References

Example notation: Go to “Team Explorer” and then click the “Work Items” hub, this will open the “Work Items” page. Then in the Queries section, expand “Current Sprint” and open the Test Cases Query

Hubs, Pages, Sections, and Actions

ITeamExplorerPage Page – Plugin that provides a TE page. ITeamExplorerSectionSection – Plugin that provides a section that extends a TE page. ITeamExplorerNavigationItem Navigation items are plugins that take you to a primary feature area page like My Work, Pending Changes, Work Items, etc.  ITeamExplorerNavigationLink Child links underneath an ITENavigationItem on the Home page (ex:  Request Code Review, SCE, New Query).

Building Team Explorer plugins?Hubs, Pages, Sections, and Actions

The things you never want to do (as a developer)…

Hit F1Click on the COM tab in Add ReferencesClose a solution…

Remember the ~30 seconds of unresponsiveness when closing a large solution in Visual Studio 2010 SP1

Alt-F12object viewer

F1help

Add References

Superfast

Developer Goodies

Web Developer friendlyCSS & HTML5…Debug in any other browser other than IE…Page Inspector…

HTML & CSS

HTML5 validation Better IntelliSenseColor picker...

HTML & CSS

HTML5 validation Better IntelliSenseColor picker

Images taken from http://www.hanselman.com/blog/VisualStudio2012RCIsReleasedTheBigWebRollup.aspx

When coding HTML5, CSS styles show in IntelliSense

Better Debugging tools

Launch in IE, Chrome, Firefox, Safari and others?Page Inspector…

Shows you the razor source

Select DOM elements like Firebug

Shows you the HTML output

Suggestion

Page Inspector should put the more specific CSS styles up the top instead of the most general onesThe general styles at the top doesn’t help me solve any issues

Suggestion

Chrome and Firefox both show the more specific style first.

Page Inspector <> GlimpseClient side <> Server side

Glimpse <> FiddlerServer side <> Listener

Suggestion: Dim the built in Microsoft records

Better Debugging tools

Scenario #1: The DatePicker is not showing on my MVC page for a date field

1st – Page Inspector to see which view is rendering the field2nd – Use Glimpse to see which controllers are being hithttp://rules.ssw.com.au/SoftwareDevelopment/RulesToBetterMVC/Pages/Do-you-use-Glimpse.aspx

3rd – Set a good old Breakpoint to step through the C# code

Scenario #2: The page is showing a photo for a person when you have not logged in

Page Inspector (N/A) because the wrong data has already been returned1st – Use Glimpse to see which controllers are being hit2nd – Set a good old Breakpoint to step through the C# code

The Visual Studio 2012 Unit Testing experience is focused

on developers writing and running unit tests while they

write their code.

Developer Focused Unit Test Experience

Red-Green Bar

Most important

tests shown first

Timings

Shows tests from any

framework

Search

Run Details

IntelliTrace in Production

No more unreproduceable bugs!!!!!!Run IntelliTrace collector on production machine Load the .iTrace file onto a dev machine:

Locate the source of the errorInspect variables at the time of the errorCheck SQL queries

http://msdn.microsoft.com/en-us/library/hh398365(v=vs.110).aspx

Expand the IntelliTraceCollection.cab

Import IntelliTrace PowerShell module and start collecting

Browse the website

Stop IntelliTrace Collection

View the iTrace file

The error we saw

The callstack

The customer or address is probably null

IntelliTraceBug or Task? ArbitraryRocks?

IntelliTrace (daily workflow in context)

(What we’ve had for years)VS 2010 + Test Manager 2010 (IntelliTrace for testers)

Testers would report bugs with an .iTrace fileWork Item createdDevelopers then open and double click .iTrace file

IntelliTrace (serious problem in context)

VS 2010 + Test Manager 2010 (IntelliTrace for testers)But what happens in rare cases that Testers cannot repro…Check the logs eg. EventLogAsk developers why they are not using ELMAHe.g. http://www.ssw.com.au/ssw/standards/rules/rulestobettererrorhandling.aspx#EMAB

Turn off Custom ErrorsAsk for Remote Debugging

VS 2012 gives us the final solution

(if they say ‘yes’ then report them to be sacked)

Exploratory Testing

Feedback Tools

Request feedback

Feedback Tools

Request feedback

PowerPoint Storyboarding

Lots more…VS 2012 + TFS 2012 + .NET Framework 4.5 are now in RTM and available to download! (or TFSPreview)Windows 8 and Windows Phone 8 project templates now come out of the boxVS comes with tools to help you deploy to AzureTFS 2012 is much better with offline workspaces and useful web access for managing your projectsLightSwitch Better SharePoint development tools Backlog tools (web UI / TFSPreview)My WorkSuspend / ResumeJavascript debugging improvements (http://blogs.msdn.com/b/visualstudio/archive/2012/04/10/javascript-debugging-enhancements.aspx)Extensions for PowerShell development (http://powerguivsx.codeplex.com/)Tools for Code and Architecture Reviews*

Track Resources

http://rules.ssw.com.au/

Report a bug – VS Feedback Tool

Suggestions – User Voice

http://tv.ssw.com

SummaryHistoryIDE Improvements

UISearch EverywherePerformance Tweaks

Developer GoodiesWeb developer friendlinessUnit TestingIntelliTraceMTM - Exploratory TestingFeedback ToolsStoryboarding

Cheers Slideshare: http://www.slideshare.net/SSWconsulting/visual-studio2012-whatsnewteched

Thank You

Sydney | Melbourne | Brisbane | Adelaide

info@ssw.com.auwww.ssw.com.au

Adam Cogan

Win a Sculpt Touch Mouse!Complete your session evaluation on Schedule Builder for your chance to win a Sculpt Touch Mouse.

Windows 8, Windows RT & Windows 7

BlueTrack Technology

4-way touch scrolling for navigation

Designed for comfort and portability

Keep learning and connecting. Download the TechEd resources:australia.msteched.com/techedresources/

Channel 9

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the

part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Take to the cloud…with the Windows Server 2012

Tweet I want a ride in the #WinServ Heli at #auteched coz…..

Terms and Conditions available at all Information Desks