Category Archives: visual studio

Platform churn? If it is in Windows 8, we are committed to it says Microsoft

I interviewed Corporate VP of Microsoft’s developer division Soma Somasegar at the Visual Studio 2012 launch last week; see the article on the Register here. I asked about the inconsistency of the Microsoft platform, and the way the platform story has changed over the years (Win32, .NET, WPF, Silverlight and now Windows Runtime). Can developers trust in the longevity of today’s platform, especially on the client?

Here is what I thought was interesting about his reply:

Any technology you see shipping as part of Windows 8, we are very committed to that.

So what ships in Windows 8? Well, for reasons which are hard to discern for those of us outside Microsoft, Silverlight is not shipped in Windows 8. It is an optional download. In fact, the only plug-in installed by default is Adobe Flash:

image

No, that does not imply that Microsoft is committed to Flash; but it does suggest lack of commitment to Silverlight, which we knew.

What you do get though is .NET Framework 4.5. This is baked in and cannot be removed as far as I can tell, though you can add and remove some advanced features.

This means you also have Windows Presentation Foundation (WPF); and in fact Somasegar specifically refers to this alongside Win32 and the new Windows Runtime.

The inclusion of technology in a current Microsoft product has implications for its support lifecycle. The ancient Visual Basic runtime, for example, is still assured of a long life since it is part of Office 2013.

image

My guess is that Microsoft’s thinking goes something like this. Right now, as the October launch date of Windows 8 approaches, what Microsoft needs most urgently is a viable ecosystem for its new Windows Runtime environment. This, you will notice, is the focus of the forthcoming BUILD conference as so far announced.

image

What, though, of the Windows desktop, has Microsoft abandoned it as legacy? My guess is that we will get deliberately mixed messaging on the subject. On the one hand, Microsoft has relegated the desktop to a single tile in the new Start screen. On the other hand, most of us will spend most of our time in the desktop, not least developers who need it to run Visual Studio. If Microsoft succeeds in establishing the new Windows Runtime platform, it would not surprise me to see a little more love given to the desktop in, say, Windows 9.

Microsoft’s platform story is messy, without question, and especially so in mobile. We have seen Windows Mobile replaced by the incompatible Windows Phone 7, and now those loyal developers who invested in the Silverlight/XNA Windows Phone 7 technologies are finding that it is all change again in Windows Phone 8 and Windows 8 (though the exact details await the release of the Windows Phone SDK).

It seems clear though that the company’s current intent is that Windows Runtime evolves as the primary client platform for both phone and tablet, while desktop remains for legacy support and for applications that do not fit the new model, such as Visual Studio and (for the time being) Office.

What if Microsoft fails to establish the Windows Runtime as a popular app platform? All I can add is that I know of no Plan B.

When will Blend, Microsoft’s Visual Studio design tool, be done? Not for a while says Soma Somasegar

During the Visual Studio 2012 launch last week I took the opportunity to ask Developer division Corp VP Soma Somasegar when Blend, Microsoft’s design tool for Visual Studio 2012, will be finished. A tricky question to answer, since there are multiple versions, as explained here:

  • Blend for Windows Store apps (HTML or XAML) is fully released and available as part of Visual Studio 2012

    image

  • Blend for WPF and Silverlight is in preview. For production you are meant to use the old Blend 4, unless you are targeting Silverlight 5 where you have no choice but to use the preview version.
  • Blend for Windows Phone is part of the Windows Phone SDK 7.1

The SketchFlow prototyping tool is also part of the preview Blend.

So when will Blend for Visual Studio 2012 be done? Somasegar refers to HBlend, which is the HTML version, and XBlend, which is for XAML.

“We shipped HBlend, and we shipped a preview of XBlend. It will take several months to finish. We also want to continue adding to HBlend. So I can’t tell you that Blend is ever going to be done [laughs],” he told me.

That said, the full Blend for Visual Studio 2012 will come out of preview sometime. Will it coincide with the first update for Visual Studio, announced for later this year?

“It is going to be later than the update, but I don’t have a specific timeframe,” he said.

Personally I have mixed (ha!) feelings about Blend. On the one hand, it is obvious that the simple designer in the Visual Studio IDE is insufficient, and that the rich Blend tool is needed, for those who can make sense of its intricate user interface. On the other hand, the designer aspect of Microsoft’s tooling seems to me messy, with too many versions of Blend and overlap between Blend and Visual Studio which gives developers a difficult choice: do I work with Blend, or stay within the simpler but more limited IDE tools?

Visual Studio 2012 launch: focus on Modern Apps

Microsoft is holding a launch event in Seattle for Visual Studio 2012, attended by selected Microsoft-platform developers as well as press from around the world.

image

Corporate VP Soma Somasegar kicked off the keynote, saying that Visual Studio 2012 has already been downloaded 600,000 times since its release to the web around one month ago – a take-up, he said, which exceeds previous versions.

image

But what is Visual Studio 2012 all about? It’s for Modern Apps, said Somasegar, though you would be wrong to imagine that this means a Windows 8 formerly-known-as-Metro app. Rather, a Modern App implies continuous services and multiple client devices, connected over both public and private networks. In other words, think mobile as well as desktop, public and private cloud, and bring your own device as well as corporate desktops.

Fair enough, but it is all a bit vague and still leaves us wondering what exactly apps for the Windows Runtime are called at Microsoft. Visual Studio calls them Windows Store apps, which does not make complete sense when you consider that you can deploy the apps without going through the Store, and that the Store can include desktop apps although these are links rather than direct downloads.

Visual Studio 2012 is a vast and impressive product though. Developers were shown various new features, including asynchronous development for maintaining a responsive user interface, pixel-level debugging in DirectX, after the fact debugging using Intellitrace, and new HTML and CSS support in the editor, with error highlighting that adapts to the specified version of HTML.

There was a quick demonstration of developing for Kinect, in which we saw an avatar mimic the movements of VP Jason Zander.

image

Technical Fellow Brian Harry spent some time showing off application lifecycle features in Team Foundation Server, including improved Scrum support and an emphasis on agile concepts like whole team development (the development team is not just developers).

There were a couple of announcements, including news of an update in preparation for Visual Studio 2012 which will include new features. There will be a preview later this month and delivery by the end of 2012.

Visual Studio Express for the desktop has now shipped and is available for download. This supports development in C#, Visual Basic and C++, so there is now a free C++ compiler available for Windows desktop development in the Visual Studio 2012 family.

I spoke to a couple of the invited developers after the morning event. Visual Studio 2012 looks good, they told me, but then again what choice is there for Windows platform development? That said, they had expected a stronger push for Windows 8 development, especially on the Metro-style side. Why did Microsoft not spend more time evangelising Windows 8 app development and the Windows Store? Of course there is a lot to cover but given how critical app momentum is to the success of the new Windows, it struck me as a valid point.

SharpDX: Managed DirectX for Metro from the community

One of the disappointments in Microsoft’s new Windows Runtime platform is lack of support for XNA, a gaming/fast graphics API which wraps DirectX and is supported on Windows, Windows Phone and on Xbox 360.

Developer Alexandre Mutel has stepped up to fill the gap with the open source SharpDX, which also provides access to the DirectX API from C#, supports both desktop and Windows Runtime development. One of the first games to use SharpDX, ARMED, has already arrived in the Windows Store.

image

In addition, Mutel says “it will certainly be possible to use ShardDX from Windows Phone 8”.

SharpDX was made possible by a custom tool called SharpGen which generates the .NET API automatically from the DirectX SDK.

The puzzle is why Microsoft did not make more effort to support XNA in Windows 8, or failing that to provide an alternative for .NET developers.

If you want to use SharpDX, be prepared for considerable effort learning the API, as there is little documentation so far. Still, it will likely be easier than learning C++, which is the official solution for DirectX on the Windows Runtime.

Developing for the Windows Runtime: a few more notes from the field

I have been poking around in the code for my Windows Runtime ITWriting.com reader, which is based on this MSDN sample. The list of posts looks like this:

image

Not bad, but that block showing the date of each post is based on Windows Team Blog page, which is nothing to do with me. What would it take to modify the design?

The problem with sample code is that when you copy and paste you do not really know how the code works, and sometimes issues are hidden. The MSDN article, while it does a good job explaining most parts of the app, does not explain how the date block is put together. A few observations then from my efforts to modify this.

Most of the code for this date block is in the ResourceDictionary element in App.xaml, which means it can easily be reused on multiple pages. The code is a ControlTemplate element, which means it defines a custom control. This is then referenced within a DataTemplate element on the pages where it appears. The DataTemplate defines how the bound data appears in the list.

Reading a block of XAML and trying to visualise how it will render is not much easier than viewing a photo in a binary editor. However, you cannot view App.xaml in a visual designer, since it is not a visual page. The only solution I could think of was to copy the ControlTemplate out of App.xaml into a page where I could see the design, tweaking it, and then copying it back.

I started a new project in Blend, and copied the Canvas code from the DateBlockTemplate, and replaced the data bound values with hard-coded examples. So far so good: I could now tweak the design.

image

My design skills are rubbish so I ended up with a simpler layout. In my adaption, the month and day appear on one line, as in “Aug 26”.

This led me to another problem. In the sample, the month and day are bound as separate fields, for example:

<TextBlock.Text>
<Binding Path="PubDate" Converter="{StaticResource dateConverter}" ConverterParameter="month"  />
</TextBlock.Text>

How could I concatenate the two bindings to appear in one TextBlock? In Windows Presentation Foundation (WPF) you can do this with the MultiBinding class, but this did not seem to work in WinRT XAML. Rather than go further down that route, I decided to amend the DateConverter class which is also part of the sample, to add a conversion that returns both the month and the day.

DateConverter.cs users the new DateTimeFormatter class.  The documentation explains that this takes a “format template string” but does not offer a reference for constructing formats. I experimented and ended up with:

DateTimeFormatter dateFormatter = new DateTimeFormatter("{month.abbreviated(3)} {day.integer(2)}");

which turns out to work.

Now my list of posts looks like this:

image

Not as stylish as before, but at least it is different.

Windows 8 is done, available August 15th with final Visual Studio 2012

Microsoft’s Windows chief Steven Sinofsky has announced the release to manufacturing of Windows 8:

The Windows 8 team is proud to share with you that a short while ago we started releasing Windows 8 to PC OEM and manufacturing partners.

image

The separate post by Brandon LeBlanc has more details. Microsoft’s developer (MSDN) and IT admin (Technet) subscribers will be first to get the new Windows, leaks aside, on August 15th. LeBlanc adds:

On August 15th, developers will be able to visit the Windows Dev Center to get access to all the tools and resources they need including the final build of Visual Studio 2012 to design, build, and sell apps in the Windows Store.

from which we learn that Visual Studio 2012 is also done, or will be by the 15th.

Windows Server 2012, which uses the same core code, has also been released to manufacturing, says Microsoft’s Jeffrey Snover:

the final code is complete and we are delivering it to our hardware and software vendor partners this week

The Windows Store is also open for business, kind-of. Antoine Leblond says that you can submit a Metro-style app from today, though you will need an RTM build to do so, so for most of us that will actually mean from August 15th. Apps can include free, paid-for, trials, and those with in-app purchases. Only Metro-style apps can be submitted for installation through the store, though desktop apps can be offered through a link to the vendor’s web site.

Windows 8 is a bold release. Despite pressure from existing Windows users, Microsoft has held firmly to its decision to abandon the old-style Start menu and to make the Metro side prominent for all users. There are several big unknowns:

  • How will users react to the changes? The early moments with Windows 8 tend to be difficult, and some may be put off completely.
  • How popular will Metro-style apps be, relative to traditional desktop apps?
  • How well will Windows 8 and Office 2013 really work on a tablet without keyboard or mouse?
  • What proportion of users will want the ARM version, Windows RT, as opposed to the familiar, messy world of x86 Windows?

I have used Windows 8 intensively for some months now, both on desktop and tablet. It works fine, and seems a little faster than Windows 7 on the same hardware. On a tablet, the Metro-style apps are delightful but few, but desktop apps are a bit of a struggle, which is one reason I am looking forward to Windows RT devices on which those troublesome desktop apps cannot be installed.

Should Microsoft have made such radical changes in Windows? That is open to debate; but check out this report on how tablets, mainly Apple iPads, are eating away at the PC market to understand why the company felt that “reinventing Windows” was its only option.

Access Web App: at last a simple web database app builder from Microsoft

One thing hardly mentioned in the press materials for Office 2013, and therefore mostly ignored in the immediate publicity, is Microsoft Access 2013. It is included though, and its most interesting new feature is a thing called an Access Web app.

image

To make one of these, you click the big “Custom web app” button on the opening screen. The first thing you are asked is where to put it. It is looking for a SkyDrive or Office 365 team site – essentially, online SharePoint 2013 I imagine. If you are not signed in, this screen appears blank.

Advertisement

I selected Skydrive at my Office 365 preview site.

image

Hit Create and you can select an app from a template. I chose a Music Collection app. Access generated several tables and forms for me and opened the design environment.

image

The template app is a bit daft – Artists and Labels are based on a People template, so you get Labels with a Job Title field – but that does not bother me. What interests me is that Access generates a relational database that you can edit as you like. The template UI offers either a list/detail view called a List, or a Datasheet which shows rows in a grid format. There is also a Blank view which you can design from scratch.

I had a quick poke around. Access Web Apps do too good a job of hiding their innards for my taste, but what you get is a SharePoint app with data stored in SQL Server Azure. You can also use on-premise SharePoint and SQL Server 2012.

Programmability in Access Web Apps is limited, but you do get macros which let you combine multiple actions. There are two kinds of macros, UI macros and Data macros. UI macros support a range of actions including SetVariableif and else statements. The only loop functions I can see are in Data macros, which include a ForEachRecord action. You can call Data macros from other macros and a Data macro includes a SetReturnVar statement, so I guess with a bit of ingenuity you can do many kinds of automated operations. Macros are described here.

image

In my quick test, I put a button on a view and had it show a message. Apologies.

The application files are all stored on SharePoint, rather than locally, so I presume you could easily edit the app on any machine with Access 2013 installed.

Click Launch App and the web app opens in the browser. Everything worked, including my MessageBox.

image

I also tried it on the Google Nexus 7 Android device. Again it seems to work fine, though I did get some odd behaviour returning to the app. There are possibly some authentication issues.

image

An Access Web App is just another SharePoint app, as explained here, so you can publish it to selected groups via the built-in store.

There is no way that I can see to craft your own SQL, which to me is a disadvantage, but maybe we will discover how to bypass the UI and open a database in SQL Management Studio, or access it programmatically from other environments.

It seems to me that what Microsoft is offering here is what it tried, but failed, to offer in Visual Studio Lightswitch: database programming for the non-specialist. Access has always done this, though unfortunately it is easy to make rather a mess if you do not know what you are doing. An Access Web App gives the developer/user fewer ways to go wrong, and builds cross-browser web apps. It is not yet possible to judge whether Microsoft has got the feature set right, but fundamentally this looks useful for simple custom business database applications of the kind that many small organisations and departments find they need. It is a big advance on MDB files stuck on a file share, fits with the BYOD (Bring Your Own Device) concept by working on iPads and the like, and makes it easy to get started and experiment. Good work.

Telerik releases Kendo UI components for ASP.NET MVC

Component vendor Telerik has released an updated version of Kendo UI, its HTML5 framework. This is the first non-beta release with support for ASP.NET MVC server wrappers, with components including Grid, ListView, calendar and date controls, tree view, menu, editor and more. Kendo UI supports the MVVM (Model View ViewModel) pattern popular with Microsoft developers.

image

 

Telerik seems to be treading a careful path, maintaining its strong links to the .NET developer community while also creating a framework that can be used on other platforms.

I spoke to Todd Anglin, VP of HTML5 tools. Why the support for ASP.NET MVC – is Telerik seeing this becoming more popular than Web Forms, the older ASP.NET approach to web applications?

“Something in the range of 70% of ASP.NET developers are on web forms. We do see a bit of a trend that as they start new projects, developers are adopting ASP.NET MVC and HTML5, which is where it makes sense to use Kendo UI,” he told me.

The main reason though is that Kendo UI is less suitable for Web Forms, where more of the client-side code is generated by the framework. “Web Forms are a very high level abstraction,” said Anglin. “With MVC developers are a little closer to the metal.”

That said, he is not ruling out a Web Form wrapper for Kendo UI long-term.

Anglin says Kendo UI’s use of JQuery is a distinctive feature.  “Over the last few years JQuery has clearly risen above the pack to be the most common core Javascript library and the one most developers are familiar with. Unlike most commercial libraries out there Kendo UI chooses the JQuery core as the starting point and builds on that, so developers that adopt Kendo UI have a smoother on-ramp.”

Kendo UI supports both mobile and desktop web applications, but with different controls. “We believe that developers should offer experiences that are tailored to each device class, which is why you have Kendo UI web for keyboard and mouse, and Kendo UI mobile with a mobile-specific interface. We share code behind that, like the data source, between web and mobile, but we don’t think the interface on a mobile device should be the same as you show on a desktop browser,” said Anglin.

What about the tools side? Although Anglin says “We want to be agnostic on tools”, there is particularly good support for Visual Studion. “Kendo UI integrates with anything that supports HTML and JavaScript well, which includes the latest version of Visual Studio. We are delivering full vsdoc support for Visual Studio so that developers in that environment get Intellisense for JavaScript. But if you’re on a Mac you can use other tools,” he told me.

More interesting is a forthcoming cloud IDE. “We’ve just revealed a new tool called Icenium which is a cloud-based development environment for creating apps in HTML and JavaScript. It’s an incredible environment for building apps with Kendo UI.”

How about HTML5 apps that target the Windows Runtime (Metro) in Windows 8 – will Kendo UI work there? Apparently not:

“It’s certainly something we’ve paid attention to. Telerik’s primary position for Windows 8 runtime and Windows 8 development is with the traditional .NET targeted tools. Our RAD tools later this year will focus on introducing XAML and HTML tools for Windows Runtime. The HTML tools that we introduce will have a shared engineering core with Kendo UI, but we’ll make a tool that is specifically targeted at that runtime.

“Kendo UI is really focused on the cross-platform, cross-browser experience. You write once, at a core code level, and then use all the runtimes out there for HTML and JavaScript. Whereas Windows Runtime is leveraging familiar technology in HTML and JavaScript, but when you write a Windows Runtime app you are writing Windows software. It’s very platform-specific.”

The Development Game: Achievements in Visual Studio 2012

Microsoft has created an Achievements extension for Visual Studio 2012. Borrowing from achievements in games such as those on Xbox 360, and perhaps also inspired by the Office Ribbon Hero,  Visual Studio Achievements lets you earn awards for completing certain tasks, and share them on Facebook and Twitter. You can download Visual Studio Achievements from the Extension Gallery within the IDE.

image

Once installed, you will see a notification each time an achievement is unlocked.

image

You can also check your progress via the Achievements option in the Tools menu, though mine seems slow to update.

image

It sounds a terrible idea, though there are some entertaining ones. Here are a few I like:

Job Security (0 points)

Write 20 single letter class level variables in one file. Kudos to you for being cryptic! Uses FxCop

and

Regional Manager (7 points)

Add 10 regions to a class. Your code is so readable, if I only didn’t have to keep collapsing and expanding!

and

Interrupting Cow (5 points)

Have 10 breakpoints in a file.Where’s that bug? Could here, could be there, could be anywhere!

and

Architect (5 points)

Add 10 items to a sequence diagram. You’re not just a developer; you’re an architect!

You get the idea.

Microsoft is using this to do some not-so-subtle promotion, with plenty of Windows Azure achievements, though it seems to short on Windows 8 badges as yet.

Unfortunately Visual Studio crashed shortly after I installed this extension and I am suspicious.

All pretty silly; yet I like the idea of friendly notifications when you breach some coding guideline.

The new Windows Azure: a better cloud platform from Microsoft

Microsoft’s Scott Guthrie has posted more details of changes in Windows Azure. I was also able to sign up for the preview of Virtual Machines and Web Sites (my web site application is pending).

In the past the Azure portal for managing your cloud services has been functional but ugly and irritating. This has been replaced by a new portal (in preview) which is a great improvement.

image

image

Even better, the portal has a REST API which developers can program directly, giving Amazon-like programmatic control of your Azure infrastructure, though I have not looked at the actual API yet. The SDK is open source and hosted on GitHub under an Apace 2 license.

Guthrie talks about scaling in Azure web sites. You can control the number of VM instances used by your web site and “Windows Azure automatically handles load balancing traffic across VM instances”. The one thing I do not see is how you would have instances brought online and taken offline in response to demand. However, given the REST API you would imagine that writing code to do this would not be too challenging. The portal includes a dashboard for monitoring performance so the API can access this information.

You can have up to 10 web sites on a free shared hosting environment, and pay only when you upgrade to a dedicated VM.

Free is free; but once you do scale up it does not look cheap to me. Here are a couple of samples from the calculator:

image

or for a busier site:

image

These kinds of figures would put me off moving this site to Azure, for example. That said, I would be interested to see a detailed cost comparison between Azure, Amazon, and other cloud hosting providers like Rackspace.

There are more features mentioned in Guthrie’s post and it does look like an improvement both in features and usability.