Visual Studio 2013

by Tim Anderson

Tim Anderson and Matt Nicholson take a look at the latest release of Microsoft’s flagship developer product.

HardCopy Issue: 62 | Published: February 24, 2014

Visual Studio 2013 looks much like Visual Studio 2012, and indeed at first sight seems more of an incremental update than a major new version. However lift the bonnet and you’ll find plenty of new features. One of the first things you notice is the facility to sign in with a Microsoft account. Do this and you will find that some of your settings, such as themes, fonts and colours, keyboard shortcuts and text editor options, become synchronised if you sign in elsewhere. Also useful is Peek Definition, which lets you view and even edit the code where a variable is defined without having to open multiple windows.

Another useful feature is CodeLens, although this is only available in Visual Studio’s Ultimate edition. CodeLens annotates your methods with key information including references to the code, unit tests that include it and whether or not they pass, change history, outstanding bugs, work items and code reviews. Each item is a hot link so you can drill down for more detail.

On the language and compiler side, Visual Studio 2013 is a relatively low-key release. Watch this space though as Microsoft is working on a major update to .NET code-named ‘Roslyn’ which will introduce support for ‘compiler as a service’.

Perhaps more significant is the new project type Cloud Business App which allows you to hook into and take advantage of many of the facilities offered by Office 365. For example, a business that is using Office 365 is also using Azure Active Directory. As a result, if a user leaves the organisation, access to custom Cloud Business Apps is automatically revoked.

As you would expect, Visual Studio 2013 brings considerable support for building apps for both Windows Phone and Windows Store. Most Windows Store apps have a user interface built with XAML or HTML, or games developers can choose DirectX and C++. Visual Studio 2013 comes with a basic XAML visual designer or it can integrate with a separate application, which comes free with Visual Studio, called Blend. Two-way updating between Visual Studio and Blend makes for relatively seamless integration. Visual Studio 2013 also comes with a Device panel so you can test your app against various simulated screen sizes and states.

When it comes to deploying your app, Visual Studio guides you through the process. This involves signing up for a developer account (free with an MSDN subscription), testing and validating the app with the Windows App Certification Kit, and uploading to the Store where it will be tested by Microsoft before going live.

Visual Studio 2013 has improved the development of Web applications by combining the older Web Forms model and ASP.NET MVC (Model View Controller) into a single project type called One ASP.NET. Starting a project involves choosing a template, such as Web Forms or ASP.NET MVC, but you can also add references to other frameworks, including Web API. Adding a Web Form page to an MVC project can be done with just a couple of mouse-clicks.

One ASP.NET makes it much easier to configure authentication, allowing you to choose between individual user accounts, which are best if you want to use a custom database or an external login from something like Google or Facebook; organisational accounts, if you are integrating with Office 365 or Azure Active Directory; and standard Windows authentication, if you’re using an internal Active Directory.

Visual Studio 2013 includes LightSwitch, an unusual but capable tool that can generate Silverlight clients for desktop browsers, but also has an HTML client project type specifically designed for mobile clients. By default LightSwitch screens use jQuery Mobile and touch-friendly controls. A Cloud Business App is based on LightSwitch’s HTML client project type. As you would expect there is strong integration between Visual Studio 2013 and its cloud platforms, and Microsoft has made the deployment of applications to Azure and Office 365 as straightforward as possible.

This new version of Visual Studio brings little in the way of new features for accessing data. However SQL Server 2014 is coming soon, bringing with it a new set of SQL Server Database Tools. These are now part of the SQL Server package rather than Visual Studio, although they will run within the Visual Studio IDE. Visual Studio 2013 does come with an SQL Server Database project type, but this is for designing and managing databases, rather than for creating database applications.

When it comes to debugging, Visual Studio 2013 has much to offer. For example, there is ‘Just my code’ which skips over library code so you can step through just the code that is specific to the project in hand. This feature did exist in Visual Studio 2012 but has now been extended to C++ and JavaScript Windows Store apps. Visual Studio 2013 also introduces Auto variables which make it easier to track the return value of methods that are not assigned to a specific variable.

New to Visual Studio 2013 is a managed code memory analyser which is useful for finding memory leaks in managed code. Managed code is prone to memory leaks because it is easy to hold objects in memory for longer than you intend, thanks to the way garbage collection works. As with IntelliTrace and a number of other useful tools for testing, the managed code memory analyser is only included in the Ultimate edition.

 

Team working

Microsoft’s solution for collaborative development is Visual Studio Team Foundation Server (TFS), a repository that hooks into a fairly comprehensive range of tools and services designed to help you manage a project of any size, from initial design through development and testing and on to deployment. The repository stores not only code but also ‘work items’ which can be bug reports, definitions of features that need to be implemented, test cases or any other task that needs to be completed. Work items form a ‘to-do’ list for team members, while also enabling the creation of reports for monitoring and reviewing overall progress. It includes Team Build, which lets you automate application builds on a remote server. Another useful feature is the ability to set check-in policy. For example, you can ensure that code cannot be checked in unless it can be successfully built.

Visual Studio 2013 IDE screenshot

The IDE for Visual Studio 2013 is a little more colourful

 

Microsoft has been keen to promote TFS as a tool for Agile software development, although it is equally suited to more traditional methodologies. New to the 2013 release is support for Git, a distributed version control system devised by Linus Torvalds. Check out using Git and you get a copy of the whole source code repository so that you can work with it independently. You can work with a local Git repository, or with a Git repository hosted on TFS or on other services such as CodePlex or GitHub (although using a third-party repository does prevent you from accessing some TFS features, such as Team Build).

Another new feature is support for Kanban boards, which can help you visualise and manage the work that needs to be done in an Agile project. Kanban boards can be found in factories and offices implemented using sticky notes on a wall-mounted board. Under TFS a Kanban board comes with default columns for New, Approved, Committed and Done, and you move tasks between columns by drag and drop. You can also customise the board as needed. Kanban boards were originally introduced as an update to the 2012 release, but have now been enhanced and fully integrated.

Team Foundation Server is available as a stand-alone product and is included, together with the necessary Client Access Licence (CAL), with the MSDN versions of Visual Studio. There is also Team Foundation Server Express which is a free download and supports teams of up to five developers.

Alternatively, Visual Studio Online is a cloud-based solution, hosted on Windows Azure, which comes in a variety of incarnations. Visual Studio Online Basic is effectively a hosted version of Team Foundation Server Express, in that it is free for up to five users. However it does allow additional users to subscribe on a monthly basis. Visual Studio Online Professional is limited to a maximum of 10 users, each paying a monthly charge, but includes a subscription version of Visual Studio Professional for each user. Visual Studio Online Advanced supports an unlimited number of users and comes with a more comprehensive range of project management tools.

 

Choosing editions

The Visual Studio family currently comes in eight editions, ranging from free downloads to subscription services that give you access to a substantial proportion of Microsoft’s product range. This is thanks to Microsoft Developer Network (MSDN), which continues to be Microsoft’s main vehicle for supporting professional developers who are working with the Microsoft platform. MSDN comes in six different flavours, four of which are bundled with various editions of Visual Studio. All come with a comprehensive range of software and driver development kits; a support contract that includes at least two ‘technical support incidents’; and access to at least one Microsoft E-Learning course collection containing some 20 hours of online material.

MSDN subscriptions come with a range of Microsoft client and server applications. However there is a catch in that, with just one exception, these applications are licensed on a per-user basis for development use only. You can install and use the software as platform for development, testing and demonstration, but you or your clients must purchase separate licences when the application is deployed. Furthermore, each person in the development team will need an MSDN licence to access the team’s server installations. The exception is the copy of Office Professional Plus 2013 which comes with the Premium and Ultimate editions. As well as using it to develop Office-based applications, the user can install one copy on a single machine for ordinary day-to-day use.

A typical team might have a number of developers using Visual Studio Professional with MSDN. This includes the latest versions of Windows, Windows Server, Windows Embedded, SQL Server and Team Foundation Server, together with monthly credits for accessing Windows Azure, which makes it a good platform for building applications that require database access. As its name implies it comes with Visual Studio Professional which provides a good range of development tools, but is limited when it comes to testing, architectural design or team management.

It is therefore a good idea to equip at least one team member with Visual Studio Test Professional with MSDN. This lacks the Visual Studio development environment but does come with a more useful range of test tools and comprehensive support for project management.

Visual Studio Premium with MSDN includes not only Windows, Windows Server, Windows Embedded and SQL Server, but also development installations of SharePoint, Exchange, Office and Dynamics. It also comes with double the amount of Azure credits, twice as many technical support incidents, and twice as much online tuition. Visual Studio Premium brings you a more comprehensive range of testing tools, lacking only the Web load and Performance Testing tools that are exclusive to the Ultimate edition. It includes some architecture and modelling facilities, but again not the complete range. The Premium edition is the one to go for if you are targeting the wider Microsoft platform, or want to give your team more general access to Visual Studio’s testing, design and management facilities.

Kanban board screenshot

Customising the columns in a Kanban board.

 

Visual Studio Ultimate with MSDN gives you everything that Visual Studio and MSDN have to offer. Features unique to the Ultimate edition include IntelliTrace, load and performance testing, CodeLens, Architecture Explorer and Architecture and Layer Diagrams. Larger teams would have at least some members using this edition.

One of the main benefits of an MSDN subscription is the knowledge that you can always be working with the most up-to-date version of the Microsoft platform. If a new version of Windows or Exchange is released, you will be able to download and install it – sometimes before it becomes generally available. Cease your subscription and your licences remain valid (unless you are on certain volume licensing schemes). However you will no longer receive updates or have access to the download site should you need to reinstall.

If you do not need MSDN, perhaps because you already have full licences to the Microsoft products you need, then you can buy a single licenced copy of Visual Studio Professional. This is cheaper, particularly if you are upgrading from an earlier version, but you will not receive the automatic updates to the latest release that MSDN brings. You will also need to buy additional Client Access Licences (CALs) if you wish to access Windows Server, Windows Azure or Team Foundation Server.

Then there are the four editions of Visual Studio Express, which can be downloaded free of charge. These are Visual Studio Express for Web for building Web applications, which includes facilities for publishing to Windows Azure; Visual Studio Express for Windows which allows you to build Windows Store Apps for installation under Windows 8; Visual Studio Express for Windows Desktop for building conventional desktop applications using Windows Presentation Foundation (WPF), Windows Forms and Win32; and Visual Studio Express for Windows Phone which includes the Windows Phone Software Development Kit. These editions support Visual Basic, C# and C++ and are fully functional, although they lack many of the features of Visual Studio Professional. They do not include the Exception Assistant, for example, which makes dealing with unexpected exceptions more time consuming.

Find Out More

For a more comprehensive overview of Visual Studio 2013, see our web supplement at: www.greymatter.com/hc/vs-guide.

You can find a feature comparison chart at www.greymatter.com/hc/VS2013ComparisonChart

For details on third party add-ons, see www.greymatter.com/hc/ThirdPartyProducts.

You can also call Grey Matter on 01364 654100 or email maildesk@greymatter.com if you would like to discuss your options further.

HardCopy 69 ad
 Microsoft Azures ads