Category Archives: visual studio

New Windows 8, new Visual Studio 2012

Microsoft has released the Release Candidate of Visual Studio 2012 (now the official name), which you can download here, to coincide with the release of Windows 8 Release Preview and Windows Server 2012 Release Preview.

Visual Studio also has a new logo, as you can see from the setup window below.

image

Microsoft’s Jason Zander has posted about the new release here. Some of the main areas of difference between the RC and the Beta are:

  • Better performance
  • User interface tweaks including the return of a little more colour to the product
  • Solution Explorer filtering
  • New Metro style app templates
  • Improved XAML and Blend designers
  • Updated ASP.NET 4.5 web forms to support the await keyword
  • Tweaks to LightSwitch, Team Foundation Server, Architectural Tools

There is also a more detailed post by Scott Hanselman on what’s new in web development here.

Developers like coding in the dark

Many developers prefer to code against dark backgrounds, according to this post by Monty Hammontree, Director of User Experience in Microsoft’s developer tools division.

Many of you have expressed a preference for coding within a dark editor. For example, dark editor themes dominate the list of all-time favorites at web sites such as http://studiostyl.es/ which serve as a repository for different Visual Studio styles.

Chief among the reasons many of you have expressed for preferring dark backgrounds is the reduced strain placed on the eyes when staring at the screen for many hours. Many developers state that light text on a dark background is easier to read over longer periods of time than dark text on a light background.

image

Personally I am not in this group. A white-ish background works well for me, and if it is too bright, simply reducing the monitor brightness is an effective fix.

Interesting post though, if only for the snippets of information about the new Visual Studio. Apparently it has around 6000 icons used in 28,000 locations. Another little fact:

Visual Studio’s UI is a mix of WPF, Windows Forms, Win32, HTML, and other UI technologies which made scrollbar theming a challenging project.

If you will be using Visual Studio 2012, are you on the dark side?

A little colour returns to Visual Studio 11 – but not much

Microsoft has responded to user feedback by re-introducing colour into the Visual Studio 11 IDE. The top request in the official feedback forum was for more colour in the toolbars and icons.

image

Now Microsoft’s Monty Hammontree, who is Director of User Experience, Microsoft Developer Tools Division – it is interesting that such a post exists – has blogged about the company’s response:

We’ve taken this feedback and based on what we heard have made a number of changes planned for Visual Studio 11 RC.

That said, developers expecting a return to the relatively colourful icons in Visual Studio 2010 will be disappointed. Hammontree posted the following side by side image:

image

This shows Visual Studio 10 first, then the beta, and then the forthcoming release candidate. Squint carefully and you can see a few new splashes of colour.

image

You can also see the the word toolbox is no longer all upper case, another source of complaint.

Hammontree explains that colour has been added to selected icons in order to help distinguish between common actions, differentiate icons within the Solution Explorer, and to reintroduce IntelliSense cues.

Did Microsoft do enough? Some users have welcomed the changes:

You have to appreciate a company that listens to there [sic] users and actually makes changes based off feedback. You guys rock!

while others are doubtful:

with respect, I fear that the changes are token ones and that whoever’s big idea this monochromatic look is, is stubbornly refusing to let go of it in spite of the users overwhelming rejection of it.

or the wittier:

I’m glad you noticed all the feedback about the Beta, when people were upset that you chose the wrong shade of gray.

While the changes are indeed subtle, they are undoubtedly an improvement for those hankering for more colour.

Another issue is that by the time a product hits beta in the Microsoft product cycle, it is in most cases too late to make really major changes. The contentious Metro UI in Windows 8 will be another interesting example.

That said, there are more important things in Visual Studio 11 than the colour scheme, despite the attention the issue has attracted.

Hands on: building an app for Windows 8 Metro

How difficult is it to build an app for the Windows Runtime (WinRT), which powers Metro-style apps in Windows 8?

Here is how I created a simple calculator app (this is one in an occasional series) using Visual Studio 11 beta. I started with a new Visual C# Windows Metro Style project, choosing a blank template.

image

A slight complication is that you are prompted to install a Developer License, which means logging into your Windows Live account.

image

Next, I had to layout the controls. Visual Studio creates a single-page app with a main page called BlankPage.xaml. I renamed this to Calc.xaml. I also used Visual Studio’s refactor menu to rename the page class from BlankPage to Calc.

image

The default application has a black background, which seems gloomy. I changed the Background of the container grid to white.

My basic calculator design is based on six rows and four columns, so I added 6 RowDefinitions and 4 ColumnDefinition to the XAML grid. The units for RowDefinitions and ColumnDefinitions can be set to Auto, Pixel or Star. Star means the unit is a weight which is calculated at runtime. For example, if you set the value of one RowDefinition.Height to 2 and the others to 1, the first one would be twice as high as the others. Here is my basic grid:

image

Next, I placed controls in the grid. The easiest way to get them to fill the space neatly is to set their HorizontalAlignment and VerticalAlignment properties to Stretch. Then you control the margin round the control with the Margin property. You can have a control fill more than one cell by using the Grid.ColumnSpan and Grid.RowSpan properties.

I found it easier to add the controls in code using copy and paste.

image

A Grid has no FontSize property, and although the Page has a FontSize property it does not seem to be inherited by the controls. I therefore set the FontSize individually for each control but there must be a better way of doing this.

I then wrote minimal code that performs calculations without always crashing, and tested the app.  When you debug, you can choose Local Machine, Simulator, or Remote Machine. I found it easier to debug using the simulator, since if you use Local Machine and Visual Studio is running on the main display, then the app you are debugging becomes invisible if you hit a breakpoint or exception. The simulator seems really good (it is actually a remote session into your own machine) and I would like some way of running all Metro apps in a window like this, not just for debugging!

image

A few reflections

A developer with experience of C# and XAML (which is also used by Windows Presentation Foundation and by Silverlight) will not have much trouble getting started with WinRT, though I noticed that XAML is substantially cut-down, as Patrick Klug observes here.

Visual Studio 2011 is an excellent IDE although I do not much like the new property editor; a minor point, but I find the latest go at prettification detrimental to usability; it is too busy. This may be a matter of familiarity and it is a minor point.

image

The XAML visual designer is slow to refresh even with my simple app, so this could be annoying with a more complex layout.

Layout with XAML works well, though it is more difficult than say Windows Forms for a new developer. It is easy to get peculiar results unless you do everything with pixel layout, which is not the best approach.

What about Metro itself? Apps always run full screen, and I had a problem with this in that my little calculator does not need all that space.

image

I am not a designer; and I suppose with a bit of effort you could add some decoration or effects to use the space, or add extra features. But why?

I was thinking about the Atari ST the other day, following the death of Jack Tramiel. The ST did not really multitask, but to get around the problem of needing to run a second app without closing the first, it had the concept of desktop accessories, available from a pull-down menu. My calculator would work well as a desktop accessory in Metro, except there is no such concept – unless you count the “Snap” split view. I wonder if Microsoft is too religious about its “Immersive UI” concept.

A few reservations then; but that does not take away from the overall impression of a strong integrated development experience for building Metro-style apps.

Windows Phone and Windows 8 convergence: a few more hints from Microsoft

The moment when Nokia is in the midst of the US launch for its Lumia 900 phone, which both Nokia and Microsoft hope will win some market share for Windows Phone 7, is not the best time to talk about Windows Phone 8 from a marketing perspective. Especially when Windows Phone 8 will have a new kernel based on Windows 8 rather than Windows CE, news which was leaked in early February and made almost official by writer Paul Thurrott who has access to advance information under NDA:

Windows Phone 8, codenamed Apollo, will be based on the Windows 8 kernel and not on Windows CE as are current versions. This will not impact app compatibility: Microsoft expects to have over 100,000 Windows Phone 7.5-compatible apps available by the time WP8 launches, and they will all work fine on this new OS.

Nevertheless, Microsoft is talking a little about Windows Phone 8. Yesterday Larry Lieberman posted about the future of the Windows Phone SDK. After echoing Thurrott’s words about compatibility, he added:

We’ve also heard some developers express concern about the long term future of Silverlight for Windows Phone. Please don’t panic; XAML and C#/VB.NET development in Windows 8 can be viewed as a direct evolution from today’s Silverlight. All of your managed programming skills are transferrable to building applications for Windows 8, and in many cases, much of your code will be transferrable as well. Note that when targeting a tablet vs. a phone, you do of course, need to design user experiences that are appropriately tailored to each device.

Panic or not, these are not comforting words if you love Silverlight. Lieberman is saying that if you code today in Silverlight, you had better learn to code for WinRT instead in order to target future versions of Windows Phone.

The odd thing here is that while Lieberman says:

today’s Windows Phone applications and games will run on the next major version of Windows Phone.

(in bold so that you do not doubt it), he also says that “much of your code will be transferrable as well”. Which is equivalent to saying “not all your code will be transferrable.” So how is it that “non-transferrable code” nevertheless runs on Windows Phone 8 if already compiled for Window Phone 7? It sounds like some kind of compatibility layer; I would be interested to know more about how this will work.

I was also intrigued by this comment from Silverlight developer Morton Nielsen:

Its really hard to sell this investment to customers with all these rumors floating, and you only willing to say that my skill set is preserved is only fuel onto that. The fact is that there is no good alternative to Silverlight, and its an awesome solution for distribution LOB apps, but the experience on win8 is horrible at best. And it doesn’t help that the blend team is ignoring us with a final v5, and sl5 is so buggy it needs 100% DEET but we don’t see any GDRs any longer.

What are these acronyms? DEET just means insect repellent, ie. bug fixes. GDR is likely “General Distribution Release”; I guess Nielsen is saying that no bug-fix releases are turning up are turning up for Silverlight 5, implying that Microsoft has abandoned it.

All in all, this does not strike me as a particularly reassuring post for Windows Phone developers hoping that their code will continue to be useful, despite Lieberman’s statement that:

I hope we’ve dispelled some of your concerns

Still, it has been obvious for some time that WinRT, not Silverlight, is how Microsoft sees the future of its platform so nobody should be surprised.

Update: Several of you have commented that Lieberman talks about WinRT on Windows 8 not on Windows Phone 8. Nobody has said that WinRT will be on Windows Phone 8, only that the kernel will be the that of Windows 8 rather than Windows CE. That said, Lieberman does specifically refer to “the long term future of Silverlight for Windows Phone” and goes on to talk about WinRT. The implication is that WinRT is the future direction for Windows Phone as well as for Windows 8 on tablets. Maybe that transition will not occur until Windows Phone 9; maybe Windows Phone as an OS will disappear completely and become a form factor for Windows 8 or Windows 9. This aspect is not clear to me; if you know more, I would love to know.

Run Metro apps in a window on Windows 8

I have been drilling into Visual Studio 11 beta recently. This includes a simulator for debugging Windows 8 Metro style apps and I was surprised by the way it works. Unlike the Windows Phone emulators, which are isolated environments for testing apps, the simulator is actually a window into your own machine.

image

You can do some strange stuff. For example, you can not only debug your app in the simulator, you can run up Visual Studio 11 on the desktop within the simulator and edit it as well. It will not let you run the simulator within the simulator though – I tried!

It occurred to me that the metro simulator accomplishes one of the things some users of the consumer preview have asked for. It lets you run Metro apps in a window, so that you can resize them, minimize them, and avoid the jarring context switch between full-screen Metro and the normal desktop with the taskbar.

image

What is the simulator? It is actually a remote desktop session into your own machine. Normally you cannot do this, as Windows client only allows one session at a time and you already have one running, but Microsoft has given itself special permission.

Running Metro apps in a windows is not its intended purpose but it is interesting to try as it shows how this might have worked if Microsoft had taken a more desktop-centric approach to the dual personality in Windows 8.

A further thought is to consider why the Visual Studio team decided to do things this way. Microsoft’s developers saw the necessity of working in the Visual Studio IDE while also exercising the Metro-style app.

Well, what if you are not a developer, but you still want to have Excel open while you check out, for example, the Bing Finance app? It is not only developers that may have good reasons to have a desktop and a Metro app running side by side.

Dual monitors accomplish this of course, and to some extent so does the “Snap” split view if you have the right screen resolution, but running Metro in its own window is a rather convenient solution.

Developers dislike monochrome Visual Studio 11 beta

Microsoft is having trouble convincing developers that its new Metro-influenced Visual Studio user interface, in the forthcoming version now in beta, is a good idea.

To be more precise, it is not so much Metro, but the way Microsoft has chosen to use it, with toolbox icons now black and white. The change also affects menus such as IntelliSense in the code editor. Here is the new design:

image

or you can choose a “Dark” colour scheme:

image

and the old 2010 design for comparison:

image

Developers voting on this over at UserVoice, the official feedback site, have made this the single biggest issue, with 4707 votes.

image

They do not much like the All Caps in the toolbox names either.

Microsoft has marked this as “Under review” so maybe there could yet be a more colourful future for Visual Studio 11.

Developers: will you do Metro?

It is fascinating to watch the Metro-fication of all things Microsoft, from the Xbox 360 user interface to Windows Phone to Windows 8 to forthcoming versions of Office and other applications.

Future versions of Dynamics products were previewed at the Convergence 2012 event (which included a session called CRM goes Metro) and there are a bunch of screenshots here.

image

Microsoft calls Metro a design language and you can see its guiding principles here. Calling it a language does not seem quite right; the word “style” is more accurate, but it does have building block elements (and yes it is blocky) which I guess make it more than just a style.

A safe prediction at this point is that all Microsoft’s products will be touched by Metro influence, even though not all will become full Metro apps running on the Windows Runtime (WinRT).

In the past the style adopted by Microsoft for its own applications have strongly influenced third-party applications as well. Once Windows, Office, Dynamics and other apps have a Metro look, other apps that do not may begin to look dated or out of place.

Metro is controversial though, perhaps even more so than the Office Ribbon which replaced menus in Office 2007 and 2012. There is some connection: members of the Office team who worked with Steven Sinofsky on the design of Office 2007, including Julie Larson-Green and Jensen Harris, are now working with him on Windows 8. Harris has written extensively about the work on Office 2007 on his Office User Interface Blog, though the last substantial post was in 2008.

What’s not to like about Metro? Here’s a few arguments against:

  • Beauty is in the eye of etc; but the blockiness of the Metro style does give it a utilitarian appearance. In Windows Phone 7 it is nice to use, but not so great to look at.
  • The Live Tile concept, where shortcut blocks can be populated with current information, adds a random element to Metro start screens which does not always look good.
  • The emphasis on simplicity and immersion makes Metro vulnerable to the accusation that it wastes too much precious screen space.
  • Metro tends to be a horizontally scrolling style, though I am not sure if this is baked into the guidelines. This takes some adjustment since most of us are more used to vertical scrolling to see more content.
  • Metro seems to be optimized for a touch UI, and while its advocates insist that it is just as good with keyboard and mouse, that is a stretch. Metro seems to be a big bet on touch as the future of human-computer interaction.

On the other hand, the usability of Windows Phone 7 is a point in its favour, and some are convinced. Paul Greenberg, in a positive take on Microsoft’s strategy based on his trip to Convergence 2012, says:

They have nailed UX (a.k.a user experience). Nailed it. Their combination of the extremely well done Metro interface and their work on natural user interfaces involving voice and touch is the new gold standard – and I’m someone who loves Apple products. (please, Mac fanboys, spare my life.)

I would be interested to hear from developers whether you expect to embrace the Metro style in your apps, wither in WinRT or elsewhere.

Cross-platform Windows and Mac lifts Delphi sales by 54%

Embarcadero has announced 54% growth in sales of Delphi and C++ Builder, its rapid application development tools, in 2011 vs 2010. These tools primarily target Windows, but in the 2011 XE2 edition also support Mac and iOS applications. XE2 also added a 64-bit compiler, making this the most significant Delphi release for years. The company says that the 2011 figures come on top of 15% year on year growth in the previous three years.

This is encouraging for Delphi developers, and well deserved in that Delphi still offers the most productive environment for native code development on Windows. The cross platform aspect is also interesting, though the FireMonkey framework which enables it is less mature than the old VCL, and there are many other options out there for cross-platform apps. FireMonkey does not yet support Android or other mobile platforms apart from Apple iOS.

2012 is also the year of Windows 8, raising the question of whether Delphi and C++ Builder will support the new Windows Runtime (WinRT) in future, and if it does, whether this will be FireMonkey only, or whether it could work with a XAML-defined user interface.

NVIDIA releases CUDA Toolkit 4.1 with LLVM compiler

NVIDIA has released version 4.1 of its CUDA Toolkit for general purpose GPU computing.

image

There is a lot in this release, including a compiler based on LLVM, which will make it easier to support other programming languages; 1000 new imaging functions; and a re-designed visual profiler.

There is also an update to Parallel Nsight, for debugging and profiling CUDA applications in Visual Studio. This is free, though you have to register as an NVIDIA developer. You need this update to work with the 4.1 toolkit.

You do have to update your graphics card driver:

image

using a new build which NVIDIA has not gotten around to signing:

image

Still, lots of goodies here and a must-have for developers wishing to put their NVIDIA GPU to work for more than just games.