Visual Studio 2012 Delivers Rich Toolset for Windows 8, Web Development

 
 
By Jeff Cogswell  |  Posted 2012-12-04
 
 
 

Visual Studio 2012 Delivers Rich Toolset for Windows 8, Web Development


Visual Studio 2012 includes many new features, the biggest of which focus on development specifically for the new Windows 8 interface (previously known as "Metro"). I've been using Visual Studio since its original form with Visual C++ 1.0 almost 20 years ago.

This review will point out the new features, as well as a look at a related product that ships with it, Blend. Please note that I'm using Visual Studio 2012 RTM (release to manufacturing) along with the Office Developer Tools Preview 2 and LightSwitch HTML Preview 2, both of which are available as updates to Visual Studio through the Web Platform Installer.

The RTM version is always virtually identical to the final product that Microsoft releases for sale.

Visual Studio 2012 includes a version of the Blend user interface development tool.  With previous versions of Visual Studio, Blend was a totally separate product. This version of Blend includes only two project types, both meant for building Windows 8 apps for sale in Microsoft's Windows Store. One is for building HTML apps in JavaScript, and the other is for using Microsoft's Extensible Application Markup Language (XAML), along with either C#, Visual Basic or Visual C++ (Microsoft's .NET-managed form of C++).

The Blend interface looks just as drab as it always did, with dark gray tones that look like an old, burned-down house. (They offer a "light" theme, which is still all gray, just not quite as charred-looking.)

As with earlier versions of Blend, when you create a new project, you get a solution file and project file that can also be opened in Visual Studio. Using Blend, I created a "Split" app for Windows 8, which includes two pages; each page gets it own directory in the file system and includes a .css file, an .html file and a .js file.

Additionally there's a js directory that includes three JavaScript files. But take note: These JavaScript files don't just include silly little JavaScript samples for animating buttons on a Web page. The JavaScript code uses advanced features of JavaScript such as closures. In other words, if you're a Web designer and want to build apps for Windows 8 using HTML and JavaScript, you'll want to make sure that you have honed your JavaScript skills.

The main Visual Studio integrated development environment (IDE) also lets you create these same types of projects. So what's the difference? Blend lets you graphically design your HTML forms and includes a few other features not present in Visual Studio, such as the ability to debug Cascading Style Sheets (CSS) and HTML. (For example, you can check the computed CSS values of HTML elements.) Visual Studio, on the other hand, focuses more on code-based development. However, the visual XAML editor works in both products.

Visual Studio 2012 Delivers Rich Toolset for Windows 8, Web Development


People like me who have worked in the Web development world are aware that there are two overlapping professions: Programmers who develop applications that run in the Web browser and Web designers who build Websites. Both have their place (and both find plenty of paying clients). The difference between Visual Studio and Blend seems to accommodate these two groups of people; Visual Studio is more geared toward Web application developers, while Blend is more geared toward designers.

Visual Studio Also Includes LightSwitch

You might remember some hoopla a couple years ago about something called LightSwitch, which lets you rapidly create database applications and is now fully integrated into Visual Studio. The idea is similar to such products as Alpha Five, or Filemaker Pro.

In fact, I suspected that the creation of LightSwitch was partly due to the failure of Microsoft to deliver a true Web-development version of Access, which resulted in a lot of people moving to competing tools, such as the aforementioned Alpha Five.

LightSwitch, unlike Access-based applications, lets you run your final app in a Web browser. Although LightSwitch hasn't really been embraced much by the developer community, there are some new features that might help it gain acceptance.

For example, the latest version, with the HTML Client, lets you finally ditch Silverlight and use HTML5 instead. That means you can release your apps to a browser without requiring the users to install Silverlight. You can also easily connect to remote data sources using Microsoft's Open Data protocol. This may or may not prove to be an important product for Microsoft with these new changes. As such, I'll provide a full review of these new LightSwitch features next month here on eWEEK.

Windows 8 Development

By far the biggest update with Visual Studio 2012 is the ability to create Windows 8 applications, particularly apps that you can distribute through the Windows Store. You can use several different languages for building these apps. I already mentioned JavaScript. Additionally, you can use C#, Visual Basic or Visual C++.

One thing I found, however, is that developing for Windows 8 is very different from previous tools used to build earlier versions of Windows. But there is a caveat: You can still develop traditional desktop-style applications as you always could, and you can still run Windows 8 in desktop mode without using the new interface. But to develop for the new interface, you take a different approach, even if you use C# instead of JavaScript. There's a new set of APIs, new controls, new event structures.

If you create a Windows 8 application in C# or VB.NET, you get an XAML-based application. Since it's XAML, you can use the visual designer to create your forms. This is very similar to developing for Silverlight, except you're developing for the Windows 8 interface.

In addition to including the latest Microsoft Foundation Classes (they still make that thing?), Visual Studio also includes support for several different languages such as F# built right in. And optionally, you can add on other languages, including Python support.

Visual Studio 2012 Delivers Rich Toolset for Windows 8, Web Development


There are many other general improvements, some small but useful. For example, the code editor windows can now be "pinned" where they stay to the left for quick access. (I'm not sure yet how useful I'll find this feature.)

One interesting feature I'll likely use is that you can undock your editor windows and drop them onto your second monitor. Although you could always do that, previously the windows were separate and you had to manually switch between them, with only one maximized in front. Now you can combine them into a single tabbed window just like in the main editor area.

In addition, you can open a second instance of the Solution Explorer. If you move this over to the other monitor, you can double-click on files in it and they open in the new tabbed window in the second monitor. That's handy.

The next feature I tried took me a moment to figure out, but it's going to prove useful. If you do a find-in-files operation, as usual you get a list of results at the bottom in a tool window. But the new feature appears if you click on a line inside the results. That file containing that line immediately opens in the text-editor area.

But it's not "really" open; it's only a preview with a tab appearing on the right end of the tab bar. Click a line from another file and the preview goes away and is replaced with a preview of the new file you clicked on. If you want to keep the file open, there's a little icon on the tab labeled "Keep Open." Click it and the tab moves to the left and the file opens like any other file.

Another new feature is IDE search. On the Visual Studio title bar, toward the right, is a little text box where you can type in a feature search. (Think "search" on the Windows start menu). A dropdown menu appears below the search box with the results.

I typed "debug" and saw a list of items that contain the word "debug," including "start without debugging," (which is normally a menu item or command).  Selecting this causes the program to run. Selecting "debugging—edit and continue" opens up the edit and continue setting in the Visual Studio Options dialog box. The menu, therefore, includes many different elements—menu commands, windows and so on. I can definitely see myself using this so I don't have to search through piles of menus.

There are many more features than I can possibly describe here. But this is a summary of the ones I tried out. You can find more information on the Visual Studio section of Microsoft's Website.

Rocket Fuel