Category Archives: microsoft

Decent Microsoft results, but where is the cloud? where is mobile?

Microsoft has released its results for the quarter ending March 31 2011. The figures are pretty good; but despite much talk about the cloud there is little sign that Microsoft is reinventing its business – unless you count Xbox, which has had another excellent quarter and is delivering meaningful operating income for the company.

Quarter ending March 31 2011 vs quarter ending March 31 2010, $millions

Segment Revenue Change Profit Change
Client (Windows + Live) 4445 -205 2764 -399
Server and Tools 4104 398 1419 149
Online 648 82 -726 -17
Business (Office) 5252 911 3165 623
Entertainment and devices 1935 725 225 75

Windows is a little down in the quarter, which Microsoft says in the press release is “in line with PC trends”; a small statement which disguises what must be real concern about the market drift towards iPads and SmartPhones that are made by other companies.

Server and tools put in a decent but unspectacular performance. Office on the other hand was a powerhouse this quarter. Again, the press release statement is telling:

the integrated innovation with SharePoint, Exchange, Lync and Dynamics CRM is driving significant growth for the division

If you substitute “lock-in” for “integrated” you will not be far wrong. As an aside, I spoke to a major UK retailer last week about its move towards desktop virtualization. The exec I spoke to mentioned in passing that as they rolled out SharePoint 2010, they also realised that they would have to upgrade to Office 2010 at the same time, otherwise too much stuff just would not work properly. From Microsoft’s point of view, that is “integration” working as designed.

Online on the other hand, which I understand is mainly Bing and advertising revenue, had yet another miserable quarter. Microsoft says it is pleased that revenue increased; but the loss is bigger too, and the loss is comfortably bigger than the revenue which means it spent more than twice what it earned in this segment. Perhaps it is worth it, if Google is rattled even slightly by Bing’s growing search share, up to a claimed 13.9% in the US, but this is the longest of hauls.

So where’s the cloud? Azure is not mentioned in the release, and I am not even sure in which segment it lives; my guess is Server and Tools. Office 365, which is not yet launched, does get a mention. I think Office 365 will be big business for Microsoft, though it is going to cannibalise the server business a little.

Mobile? Somewhere lost in Entertainment and devices, where clearly the major element is Xbox. Something curious happened when Kinect launched; as a hands-free controller the device is imperfect but its genuine innovation seems to have boosted the profile and sales of the Xbox generally. A couple of years ago when we were all talking about the red ring of death I would not have expected such excellent figures.

This company remains a powerhouse, but the fact that its fortunes remain closely tied to those of the PC, and its lack of progress in mobile devices, are a concern.

Developers and mobile platforms: lies, damn lies and surveys

I’ve been reading the IDC/Appcelerator developer survey about their attitudes to mobile platforms. The survey covered 2,760 Appcelerator Titanium developers between April 11-13, so it is certainly current and with a sample just about big enough to be interesting.

The survey asks developers if they are “very interested” in developing for specific platforms, with the following results, and with comparisons to 3 months ago:

  • 91% iPhone (fractionally down)
  • 86% iPad (fractionally down)
  • 85% Android phones (down from 87%)
  • 71% Android tablets (down from 74%)
  • 29% Windows Phone 7 (down from 36%)
  • 27% Blackberry phones (down from 38%)

The survey is titled:

Apple shines, Google slows, and Microsoft edges RIM in battle for mobile developer mindshare.

Is that a fair summary? It is not what I would highlight. I cannot read the exact figures from the chunky graphic, but it is clear that the iOS figures are also fractionally down, maybe by just 1%, but hardly much different from the Android figures on a sample of this size. Both are pretty much flat.

The figures for Windows Phone 7 and Blackberry are more dramatic; though we should at least note that Appcelerator Titanium is a cross-platform toolkit that does not currently support Windows Phone 7, and that its support for Blackberry is only in preview. That was true last time round as well, but I’m not sure that asking developers about their plans for a platform which the toolkit does not currently support is the best way to gauge overall interest.

Another question that interests me: is developer interest a cause or an effect of a mobile platform’s success? A bit of each, no doubt; but personally I think the “effect” model is stronger than the “cause” model. Developers pick a platform either because they have immediate customers for apps on that platform, or because they think they can make money from it.

Nurturing a strong developer community is definitely important for a platform provider; but I doubt it ranks as highly as other factors, like building a strong retail presence, delivering excellent devices at the right price, and focusing on usability and a good end-user experience.

If you are interested in Appcelerator Titanium you might like to read my interview with the CEO at Mobile World Congress; and this discussion on whether Titanium really builds native apps.

Hands on with Office 365 – great service, some hassles

I have been trying Microsoft’s Office 365 which has recently gone into public beta, and is expected to go live later this year.

This cloud service provides Exchange 2010, SharePoint 2010 with Office Web Apps, and Lync Server to provide a complete collaboration service for organisations who prefer not to run these servers themselves – which is understandable give their cost and complexity.

Trying the beta is a little complex when you already have a working email and collaboration infrastructure. I chose to use a virtual machine running Windows 7 Professional. I also pre-installed Office 2010 Professional in an attempt to get the best experience.

Initial sign-up is easy and I was soon online looking at the admin screen. I could also sign into Outlook Web Access and view my SharePoint site.

image

Hassles started when I clicked to setup up desktop applications. This is done by a helper application which configures and updates Outlook, SharePoint and Lync on your desktop PC. At this point I had not configured my own domain; I was simply username@username.onmicrosoft.com.

setup-office-365

The wizard successfully configured SharePoint and Lync, but not Outlook.

image

There was a “Learn more” link; but I was in a maze of twisty passages, all alike, none of which seemed to lead to the information I needed.

Part of the problem – and I have noticed this with BPOS as well – is that the style of the online help is masterful at telling you things you know already, while neglecting to tell you what you need to know. It also has a patronising style that I find infuriating, and a habit of showing you marketing videos at every opportunity.

I did eventually find instructions for configuring Outlook manually for Office 365, but they did not work. I also noticed discrepancies in the instructions. For example, this document says that the Exchange server is ch1prd0201.mailbox.outlook.com and that the proxy server for Outlook over HTTP is pod51004.outlook.com. That did not match with the server given in my online account for IMAP, POP3 and SMTP use, which was a different podnnnnn.outlook.com. I tried all sorts of combinations and none worked.

Eventually I found this comment in another help document:

Currently, the only supported scenario for configuring Outlook to work with Office 365 is a fully migrated environment.

I am not sure if this is true, but it did seem to explain my problems. Of course it would be easy for Microsoft to surface this information in a more obvious place, such as building it into the setup wizard. Anyway, I decided to go for the full Office 365 experience and to set up a domain.

Fortunately I have a domain which I obtained for a bright idea that I have yet to find time for. I added it to Office 365. This is a process which involves first adding a CNAME record to the DNS in order to prove ownership, and then making Office 365 the authoritative nameserver for the domain. I was not impressed by the process, because when Microsoft took over the nameserver role it threw away existing settings. This means that if you have a web site or blog at that domain, for example, it will disappear from the internet after the transfer. Once transferred, you can reinstate custom records.

Still, I had chosen an unused domain so that I did not care about this. I set up a new user with an email address at the new domain, and I amended the default SharePoint web site address to use the domain as well.

image

That all worked fine; but what about Outlook? The bad news was that the setup wizard still failed to configure Outlook, and I still did not know the correct server settings.

I could have contacted support; but I had one last try. I went into the mail applet in control panel and deleted the Outlook profile, so Outlook had no profile at all. Then I ran Outlook, went through the setup wizard, and it all worked, using autodiscover. Out of interest, I then checked the server settings that the wizard had found, which were indeed different in every case from those in the various help documents I had seen.

A few hassles then, and I am not happy with the way this stuff is documented, but nevertheless it all looks good once set up. The latest Exchange and SharePoint does make a capable collaboration platform, the storage limits are generous – up to 25GB per Exchange mailbox – and I think it makes a lot of sense. I expect Microsoft’s online services to win huge amounts of business that is currently going to Small Business Server, and some business from larger organisations too. Migration from existing Microsoft-platform servers should be smooth.

The biggest disappointment so far is that in Lync online the Enterprise Voice feature is disabled. This means no general-purpose voice over IP, though you can call PC to PC. To get this you have to install Lync on-premise:

Organizations that want to leverage the full benefits of Microsoft Unified Communications can purchase and deploy Microsoft Lync Server 2010 on their premises as part of Microsoft Office 365. Lync Server 2010 on-premises delivers full enterprise voice and premises-based, dial-in audio conferencing, enabling customers to reduce costs and increase productivity by replacing or enhancing traditional PBX systems.

though it is confusing since Enterprise Voice is listed as a feature of the high-end E4 edition; I believe this implies an on-premise server alongside Office 365 in the cloud.

Perhaps the biggest question is the unknown: will Office 365 live up to its promised 99.9% scheduled uptime SLA, and how will its reliability compare to that of Google Apps?

Office 365 is priced at $10 per user per month for the basic service (E1), $16 to add Office Web Apps (E2), $24.00 to add licenses for Office Professional, archiving for Exchange (E3) and voicemail, and $27.00 to add Enterprise Voice (E4). The version in beta is E3.

Is Appcelerator Titanium native? And what does native mean anyway?

Of course we all know that Microsoft’s IE9 and the forthcoming IE10 are native – VP Dean Hachamovitch said so many times during his keynote at the Mix 2011 conference earlier this week. That has sparked a debate about what native means – so here is another interesting case.

Appcelerator’s Titanium cross-platform tool for mobile development is native, or at least that is what it claims:

image

Now, I am not sure that native has a precise definition, but to me it suggests a compiled application, rather than one interpreted at runtime. So this description of how Titanium executes JavaScript – its main language – is surprising:

In a Titanium Mobile application, your source code is packaged into a binary file and then interpreted at runtime by a JavaScript engine bundled in by the Titanium build process. In this guide, you will learn more about the JavaScript runtime environment that your code runs in. Titanium runs your application’s JavaScript using one of two JavaScript interpreters – JavaScriptCore on iOS (the interpreter used by Webkit) and Mozilla Rhino on Android and BlackBerry.

So a Titanium application is actually interpreted.

Native is a vague enough term that Appcelerator can no doubt justify its use here. “Native UI” is fair enough, so is “Native capabilities.” Native performance? That seems to me a stretch, though JavaScript performance is good and constantly improving. Appcelerator even has a web page devoted to what it means by native.

Titanium is also open source. Anyone doubtful about how it works need only consult the code.

In the light of Microsoft’s statements, it is interesting that what Appcelerator really means by native is “not a web page”:

Build Native Apps … Everything else is basically a web page.

So can an application be both native and interpreted? What about Silverlight apps on Windows Phone 7, are they native? Adobe AIR apps, surely they are not native? Google Android has a Native Development Kit which is introduced thus:

The Android NDK is a companion tool to the Android SDK that lets you build performance-critical portions of your apps in native code.

The implication is that byte code executed by the Dalvik virtual machine, which is the normal route for an Android app, is in some sense not native code. Which also implies that Appcelerator’s claims for Titanium are at least open to misunderstanding.

Windows Phone at Mix 2011: what Microsoft said and did not say

Yesterday Microsoft’s Joe Belfiore (phone VP) and Scott Guthrie (developer VP) took the stage at the Mix 2011 conference in Las Vegas to tell us what is new with Windows Phone.

The opening part of the keynote was significant. Belfiore spent some time talking about the “update situation”.

image

This is all to do with who controls what ends up on your phone. If you buy a Windows PC or laptop, you can get updates from Microsoft using Windows update or by downloading service packs; the process is between you and Microsoft.

Not so with Windows Phone. The operators have a say as well; and operators are not noted for delivering speedy OS updates to users. Operators seem to have difficulty with the notion that by delivering strong updates to existing devices that have already been purchased, they build user loyalty and satisfaction. They are more geared to the idea of delivering new features with new hardware. Updating existing phones can cause support calls and other hassles, or even at worst bricked devices. They would rather leave well alone.

When Microsoft launched Windows Phone it announced that there would be regular updates under Microsoft’s control; but this has not been the case with the first update, codenamed “NoDo”. The update process has been delayed and inconsistent between operators, just like the bad old days of Windows Mobile.

Belfiore went on about testing and phones being different from PCs and improvements to the process; but in the end it seems to me that Microsoft has given in:

Mobile operators have a very real and reasonable interest in testing updates and making sure they’re going to work well on their phones and on their network. Especially if you think about large operators with huge networks, they are the retailer who sells the phone, so they have to deal with returns, they take the support calls and they have to worry about whether their network will stay up and perform well for everyone … From our point of view, that’s quite reasonable, and our belief and understanding is that it’s standard practice in the industry that phones from all different vendors undergo operator testing before updates are made available.

That “testing” label can cover any amount of prevarication. It appears that Microsoft is unable to achieve what Apple has achieved: the ability to update its phone OS when it wants to. That is a disadvantage for Microsoft and there is no sign of improvement.

More positively, Microsoft announced a number of significant new features in the first major update to the OS, codenamed Mango. This is for existing devices as well as new ones, though new devices will have enhanced hardware. He focused on what matters for developers, and hinted that there will be other end user features. A few bullet points:

  • Internet Explorer 9 is on Mango – “The same exact code that has just shipped and is now getting installed on tons and tons of PCs is the code base that will be on the phone” said Belfiore. No, it is not built in Silverlight.
  • Limited multitasking for third-party apps. This is in the form of “Live agents” which run in the background. Full apps cannot multitask as I understand, though they can be suspended in memory for fast switching. Currently apps appear to do this but it is faked; now it will be for real, with the proviso that a suspended app may get shut down if its memory is needed by the OS.
  • Multiple live tiles for a single app.
  • Fixed marketplace search so that music does not appear when you search for an app.
  • Apps can register with search so that Bing searches can integrate with an app.
  • There will be a built in SQL Server CE database with programmatic access using Linq (Language Integrated Query).
  • Full TCP/IP socket support
  • Access to raw camera data for interesting imaging applications or barcode  processing
  • 1,500 new APIs in Mango
  • Performance improvements including a better garbage collector that apparently gives a significant boost
  • Improved tools with the ability to simulate GPS on the emulator, capture performance trace log from phone

It adds up to a decent update, though more Window Phone 7.5 than Windows Phone 8 (I do not know what the official name will be). Belfiore also mentioned new apps coming to Windows Phone 7, including Spotify, Skype and Angry Birds.

But what was not said? Here are a few things I would like to have heard:

  • When will get Adobe Flash on Windows Phone? Not mentioned.
  • What about Silverlight in the browser? You would think this would be easy to implement; but I have not seen it confirmed (let me know if you have news).
  • When will Nokia ship Windows Phone devices? Nokia’s Marco Argenti appeared on stage but said nothing of substance.
  • The Mango update is coming “in the fall” but when will current users get updates?
  • Will Windows Phone 8 move away from Windows CE to full Windows, so the same OS will work across phone, tablets and desktop PCs?

Above all, I would like convincing news about how Microsoft intends to get Windows Phone better exposure and fuller support from operators. I still hardly see it in retailers, and it seems a long way down the list when you talk to a salesperson about what new phone you should buy. I do not have a Windows Phone at the moment, but when I tried it for a  couple of weeks I mostly liked the user interface – I found the soft buttons on the Mozart annoying because they are easy to press accidentally – and I also like the developer tools, though I would like to see a native code development option. In the end though, it is no use developing for Windows Phone if your customers are asking for Apple iOS and Google Android.

Microsoft shared the following figures:

  • 12,000+ apps
  • 35,000 registered developers
  • 1.5 million tool downloads

It is a start, but these are not really big numbers, and the proportion of tool downloaders that end up delivering apps seems small so far.

A lot rests on the Nokia partnership and how that plays out.

It now appears that we will need to wait until September and the newly announced PDC (Professional Developers Conference) in Anaheim 13th-16th September before we learn more about the long-term mobile strategy.

Update: Microsoft’s Phil Winstanley tells me that the Windows Phone OS is just called “Windows Phone” regardless of version; but that the Mango update is referred to as “Windows Phone OS 7.5” when it is necessary to differentiate. If that sounds confusing, do not blame me!

Microsoft releases IE10 preview, talks up native HTML5

Microsoft has released an early preview of Internet Explorer 10, which you can download now. It shows the company’s commitment – for the moment – to an energetic release cycle for its web browser.

image

Why use IE? Microsoft is pushing the notion that only IE is truly native on Windows:

IE10 continues on IE9’s path, directly using what Windows provides and avoiding abstractions, layers, and libraries that slow down your site and your experience.

In practice, this means using the Windows graphic stack directly and integrating with the Windows shell through features like jump list support on Windows 7.

IE10 supports more CSS3 standards including multi-column layout, Grid layout and Flexible Box Layout,  and Gradients. There is also support for EcmaScript 5 Strict Mode, which enforces tighter standards so reducing the likelihood of errors. Strict Mode is optional; if a web browser tried to apply it to the entire web lots of pages would break.

Microsoft is promising to support additional CSS3 standards including transitions and 3D transforms, though these are not in the preview. New preview releases will appear every 8-12 weeks.

According to Corporate VP Dean Hachamovitch, the company is steering a tight path between falling behind, and implementing immature standards:

When browsers prematurely implement technology, the result is activity more than progress. Unstable technology results in developers wasting their time rewriting the same site.

he writes in a blog post.

IE10 was announced today at the Mix conference in Las Vegas. Mix seems to be featuring equal measures of HTML5 and Silverlight, which makes for an interesting tension. News on Windows Phone is also promised, though I am not sure whether this is the moment when Microsoft will tell us about the next generation of Windows Phone and how it ties in with Windows 8 and with tablet devices. All will be revealed (or not) tomorrow.

Trying out Remote Desktop to a Microsoft Azure virtual machine

I have been trying out Visual Studio LightSwitch, which has an option to deploy apps to Windows Azure.

Of course I wanted to try this,  and after a certain amount of hassle generating certificates and switching between Visual Studio LightSwitch and the Azure management portal I succeeded.

image

I doubt I would have made it without this step by step guide by Andy Kung. The article begins:

One of the many features introduced in Visual Studio LightSwitch Beta 2 is the ability to publish your app directly to Windows Azure with storage in SQL Azure. We have condensed many steps one would typically have to go through to deploy an application to the cloud manually.

Somewhere between 30 and 40 screens later he writes:

The last step shows you a summary of what you’re about to publish. FINALLY! Click Publish.

We just have to imagine how many screens there would have been if Microsoft had not condensed the “many steps”. The result is also not quite right, because it uses self-signed certificates that will present security warnings when you use the app. For a product supposedly aimed at non-developers it is all hopelessly difficult; but I guess techies are used to this kind of thing.

I was not content though. First, I wanted to use an Extra Small instance, and LightSwitch defaults to a Small instance with no obvious way to change it. I cracked that one. You switch the view in Solution Explorer to the File view, then find the file ServiceDefinition.csdef and edit the vmsize attribute:

image

It worked and I had an Extra Small instance.

I was still not satisfied though. I wanted to use Remote Desktop so I could check out the VM Azure had created for me. I could not see any easy way to do this in the LightSwitch project, so I created another Azure project and configured it for Remote Desktop access using the guide on MSDN. More certificate fun, more passwords. I then started to publish the project, but bailed out when it warned me that I was overwriting a previous deployment.

Then I copied the likely looking parts of ServiceDefinition.csdef and ServiceConfiguration.cscfg from the standard Azure project to the LightSwitch project. In ServiceDefinition.csdef that was the Imports section and the Certificates section. In ServiceConfiguration.cscfg it was all the settings starting Microsoft.WindowsAzure.Plugins.Remote…; and again the Certificates section. I think that was it.

It worked. I published the LightSwitch app, went to the Azure management portal, selected the instance, and clicked Connect.

image

What I found was a virtual Quad-Core Opteron with 767MB RAM and running Windows Server 2008 Enterprise SP2. It seems Azure does not use Server 2008 R2 yet – at least, not for Extra Small instances.

image

750MB RAM is less than I would normally consider for Server 2008 – this is Extra Small, remember – but I tried using my simple LightSwitch app and it seemed to cope OK, though memory is definitely tight.

image

This VM is actually not that small in relation to many Linux VMs out there, happily running Apache, PHP, MySQL and numerous web applications. Note that my Azure VM is not running SQL Server; SQL Azure runs on separate servers. I am not 100% sure why Azure does not use Server Core for VMs like this. It may be because server core is usually used in conjunction with GUI tools running remotely, and setting up all the permissions for this to work is a hassle.

I took a look at the Event Viewer. I have never seen a Windows event log without at least a few errors, and I was interested to see if a Microsoft-managed VM would be the first. It was not, though there are a mere 16 “Administrative events” which is pretty good, though the VM has only been running for an hour or so. There were a bunch of boot-start drivers which failed to load:

image

and this, which I would describe as a typical obscure and probably-unimportant-but-who-knows Windows error:

image

The Azure VM is not domain-joined, but is in a workgroup. It is also not activated; I presume it will become activated if I leave it running for more than 14 days.

Internet Explorer is installed but I was unable to browse the web, and attempting to ping out gave me “Request timed out”. Possibly strict firewall rules prevent this. It must be carefully balanced, since applications will need to connect out.

The DNS suffix is reddog.microsoft.com – a remnant of the Red Dog code name which was originally used for Azure.

As I understand it, the main purpose of remote desktop access is for troubleshooting, not so that you can install all sorts of extra stuff on your VM. But what if you did install all sorts of extra stuff? It would not be a good idea, since – again as I understand it – the VM could be zapped by Azure at any time, and replaced with a new one that had reverted to the original configuration. You are not meant to keep any data that matters on the VM itself; that is what the Azure storage services are for.

Hands On with Visual Studio LightSwitch – but what is it for?

Visual Studio LightSwitch, currently in public beta, is Microsoft’s most intriguing development tool for years. It is, I think, widely misunderstood, or not understood; but there is some brilliant work lurking underneath it. That does not mean it will succeed. The difficulty Microsoft is having in positioning it, together with inevitable version one limitations, may mean that it never receives the attention it deserves.

Let’s start with what Microsoft says LightSwitch is all about. Here is a slide from its Beta 2 presentation to the press:

image

Get the idea? This is development for the rest of us, "a simple tool to solve their problems” as another slide puts it.

OK, so it is an application builder, where the focus is on forms over data. That makes me think of Access and Excel, or going beyond Microsoft, FileMaker. This being 2011 though, the emphasis is not so much on single user or even networked Windows apps, but rather on rich internet clients backed by internet-hosted services. With this in mind, LightSwitch builds three-tier applications with database and server tiers hosted on Windows server and IIS, or optionally on Windows Azure, and a client built in Silverlight that runs either out of browser on Windows – in which case it gets features like export to Excel – or in-browser as a web application.

There is a significant issue with this approach. There is no mobile client. Although Windows Phone runs Silverlight, LightSwitch does not create Windows Phone applications; and the only mobile that runs Silverlight is Windows Phone.

LightSwitch apps should run on a Mac with Silverlight installed, though Microsoft never seems to mention this. It is presented as a tool for Windows. On the Mac, desktop applications will not be able to export to Excel since this is a Windows-only capability in Silverlight.

Silverlight MVP Michael Washington has figured out how to make a standard ASP.NET web application that accesses a LightSwitch back end. I think this should have been an option from the beginning.

I digress though. I decided to have a go with LightSwitch to see if I can work out how the supposed target market is likely to get on with it. The project I set myself was a an index of magazine articles; you may recognize some of the names. With LightSwitch you are insulated from the complexities of data connections and can just get on with defining data. Behind the scenes it is SQL Server. I created tables for Articles, Authors and Magazines, where magazines are composed of articles, and each article has an author.

The LightSwitch data designer is brilliant. It has common-sense data types and an easy relationship builder. I created my three tables and set the relationships.

image

Then I created a screen for entering articles. When you add a screen you have to say what kind of screen you want:

image

I chose an Editable Grid Screen for my three tables. LightSwitch is smart about including fields from related tables. So my Articles grid automatically included columns for Author and for Magazine. I did notice that the the author column only showed the firstname of the author – not good. I discovered how to fix it. Go into the Authors table definition, create a new calculated field called FullName, click Edit Method, and write some code:

partial void FullName_Compute(ref string result)
{
    // Set result to the desired field value
   result = this.Firstname + " " + this.Lastname;

}

Then you set FullName as the “Summary” field for the table.

Have we lost our non-developer developer? I don’t think so, this is easier than a formula in Excel once you work out the steps. I was interested to see the result variable in the generated code; echoes of Delphi and Object Pascal.

I did discover though that my app has a usability problem. In LightSwitch, the user interface is generated for you. Each screen becomes a Task in a menu on the left, and double-clicking opens it. The screen layout is also generated for you. My problem: when I tried entering a new article, I had to specify the Author from a drop-down list. If the author did not yet exist, I had to open an Authors editable grid, enter the new author, save it, then go back to the Articles grid to select the new author.

I set myself the task of creating a more user-friendly screen for new articles. It took me a while to figure out how, because the documentation does not seen to cover my requirement, but after some help from LightSwitch experts I arrived at a solution.

First, I created a New Data Screen based on the Article table. Then I clicked Add Data Item and selected a local property of type Author, which I called propAuthor.

image

Next, I added two groups to the screen designer. Screen designs in LightSwitch are not like any screen designs you have seen before. They are a hierarchical list of elements, with properties that affect their appearance. I added two new groups, Group Button and GroupAuthor, and set GroupAuthor to be invisible. Then I dragged fields from propAuthor into the Author group. Then I added two buttons, one called NewAuthor and one called SaveAuthor. Here is the dialog for adding a button:

image

and here is my screen design:

image

So the idea is that when I enter a new article, I can select the author from a drop down list; but if the author does not exist, I click New Author, enter the author details, and click Save. Nicer than having to navigate to a new screen.

In order to complete this I have to write some more code. Here is the code for NewAuthor:

partial void NewAuthor_Execute()
{
     // Write your code here.
     this.propAuthor = new Author();
     this.FindControl("GroupAuthor").IsVisible = true;
}

Note the use of FindControl. I am not sure if there is an easier way, but for some reason the group control does not show up as a property of the screen.

Here is the code for SaveAuthor:

partial void SaveAuthor_Execute()
{
    // Write your code here.
    this.ArticleProperty.Author = propAuthor;
    this.Save();
}

image

This works perfectly. When I click Save Author, the new author is added to the article, and both are saved. Admittedly the screen layout leaves something to be desired; when I have worked out what Weighted Row Height is all about I will try and improve it.

image

Before I finish, I must mention the LightSwitch Publish Wizard, which is clearly the result of a lot of work on Microsoft’s part. First, you choose between a desktop or web application. Next you choose an option for where the services are hosted, which can be local, or on an IIS server, or on Windows Azure.

image

Something I like very much: when you deploy, there is an option to create a new database, but to export the data you have already entered while creating the app. Thoughtful.

image

As you can see from the screens, LightSwitch handles security and access control as well as data management.

What do I think of LightSwitch after this brief exercise? Well, I am impressed by the way it abstracts difficult things. Considered as an easy to use tool for model-driven development, it is excellent.

At the same time, I found it frustrating and sometimes obscure. The local property concept is a critical one if you want to build an application that goes beyond what is generated automatically, but the documentation does not make this clear. I also have not yet found a guide or reference to writing code, which would tell me whether my use of FindControl was sensible or not.

The generated applications are functional rather than beautiful, and the screen layout designer is far from intuitive.

How is the target non-developer developer going to get on with this? I think they will retreat back to the safety of Access or FileMaker in no time. The product this reminds me of more is FoxPro, which was mainly used by professionals.

Making sense of LightSwitch

So what is LightSwitch all about? I think this is a bold effort to create a Visual Basic for Azure, an easy to use tool that would bring multi-tier, cloud-hosted development to a wide group of developers. It could even fit in with the yet-to-be-unveiled app store and Appx application model for Windows 8. But it is the Visual Basic or FoxPro type of developer which Microsoft should be targeting, not professionals in other domains who need to knock together a database app in their spare time.

There are lots of good things here, such as the visual database designer, the Publish Application wizard, and the whole model-driven approach. I suspect though that confused marketing, the Silverlight dependency, and the initial strangeness of the whole package, will combine to make it a hard sell for Microsoft. I would like to be wrong though, as a LightSwitch version 2 which generates HTML 5 instead of Silverlight could be really interesting.

Microsoft promises Silverlight 5 beta soon, more love for HTML 5 in uncertain blog post

Microsoft has promised to deliver a Silverlight 5 beta at the Mix conference next week. The team posting is by Walid Abu-Hadba (Corporate VP of Developer and Platform Evangelism), Soma Somasegar (Senior VP or Developer Division) and Scott Guthrie (Corporate VP of .NET Developer Platform) and seems intended to clarify the company’s much-debated strategy concerning Silverlight vs HTML 5:

we have received questions from the community about the future of plug-ins, and how Silverlight is viewed as part of an overall solution set. We’ll provide clarity, background and context below

Despite the high-powered authorship though, the post tells us little. I mean, can you get vaguer than this?

HTML5 is a solution for many scenarios, and developers should make the appropriate choice based on application needs, knowing that we have a heritage and a future vision of supporting a wide variety of technologies to meet those needs.

This sentence is considered so perfectly nuanced that it is repeated at the end of the post.

If you enjoy reading between lines, there is a phrase to ponder here:

Over the coming months we’ll be particularly demonstrative of our emphasis on HTML 5, in Internet Explorer and in tools.

I’m hearing noises about Visual Studio 2012 now, and I imagine we will see some HTML 5 tooling there. I would expect it to include support for rich ASP.NET clients talking to WCF RIA Services or maybe  WCF Web APIs as well as things like the ASP.NET Membership Framework; and I would expect JQuery and ASP.NET Ajax to figure strongly.

I do not think Silverlight is dead though; apart from its role in Windows Phone, we are hearing rumours about the AppX application model in Windows 8 which looks a lot like Silverlight; and I have already noted the extensive use of Silverlight in Microsoft’s own products. I would rather hear the developer division VPs discuss this aspect of Silverlight, rather than reiterate corporate angst over how it relates to HTML 5. I would also like to see a post signed by the Windows team as well as by developer division.

Windows Phone 8 will run Windows 8, with Silverlight centre stage?

More information on Windows 8 is leaking out now; and it gives some clues about how Microsoft intends to make sense of its two device platforms, Windows tablets and Windows Phone.

Microsoft held back from making its Windows Phone 7 OS available on tablets, which is why most of the numerous tablets being pushed out to compete with Apple run Google Android, and a few of them Windows 7 with its excessive power requirements and a user interface poorly designed for touch control.

Now the strong rumour is that Windows 8 supports two user interfaces, one that is tile-based like Windows Phone 7, and another that is designed for PCs.

In other words, rather than continuing with the Windows Phone 7 OS which is built on Windows CE, Microsoft will build a new version of the Windows Phone 7 UI on top of full Windows.

My further assumption is that Silverlight apps will still run on the new OS, providing continuity with Windows Phone 7 which uses Silverlight or XNA, both based on .NET, for its application platform.

Silverlight might also be used as the platform for apps delivered by the new Windows app store. This is Paul Thurrott, though reported as rumour:

Windows 8 will also include a new app model codenamed Jupiter that will target a new Windows Marketplace app store. The app store will provide access to new, Silverlight based "immersive" applications that are deployed as AppX packages (.appx). The Windows and Office teams are betting very heavily on this new app type, according to my source, and development has already begun using a beta version of Visual Studio 2012. These apps can be written in C#, Visual Basic, and even C++.

We do know that Silverlight 5 supports full platform invoke of native code, a feature which tends to support the idea that it is becoming a key runtime for Windows.

Let me speculate a little further. Imagine you are Adobe, for example, which has said it will deliver the Flash runtime for Windows Phone. Although it competes with Silverlight to some extent, Microsoft needs to tick the Flash box for Windows Phone. But why would Adobe want to invest in Flash for Windows CE, when this OS is not going to be used for Windows Phone 8 and it will have to write new code? I will not be surprised if we hear that Flash is now not coming until Windows Phone 8.

Even within Microsoft itself, I would guess that investment is focused on the next generation rather than the one that is destined to be short-lived.

One partner that is no doubt close to Microsoft’s plans is Nokia. If the above is correct, then Nokia is buying into the Windows OS, not the Windows Phone OS. Will Nokia wait for Windows Phone 8 before launching devices on the platform? I have no idea – and delay will be costly – but I imagine its main plans will be focused on Windows Phone 8 and the possibility of tablet as well as smartphone devices.

The immediate conclusions would be:

  • Silverlight is safe as a development platform, but only for Windows. See also Silverlight the new Windows runtime, HTML 5 the new Silverlight?
  • The Windows Phone 7 OS will be short-lived but the new UI should be a natural progression from what we have now, and apps should still run, so Microsoft can position Windows Phone 8 to users as a new version of Windows Phone rather than a change of direction.
  • Microsoft will not have a coherent mobile and tablet platform until Windows 8 ships sometime in 2012. Google, Apple, RIM, HP, all have plenty of time to establish their competing platforms.