Category Archives: professional

Developing for Windows Phone 7

I spent some time today watching parts one and two of Windows Phone 7 Jump Start presented by Rob Miles and Andy Wigley. After a slow start there were clear demos of basic coding for Microsoft’s new phone; and I’d guess that most Microsoft platform developers would be reassured that if they can code for Silverlight, or do games in XNA, they will not have any problem coding for Windows Phone 7. The further implication is that it will be relatively easy, with the proviso that complex applications with good performance and excellent design are never easy. There is also the challenge of learning Expression Blend, if needed.

All participants were asked to state what other mobile platforms they had developed for; and while we were not shown the results of these polls there was a comment to the effect that “Windows mobile and None are neck and neck”, which I found interesting. It suggests that iPhone and Android developers are in no hurry to learn about Microsoft’s phone. If Microsoft gets enough customers they may then take an interest. Competing with Apple was always a given; but it is the rise of Google Android which must be most troubling to Microsoft, since it has given the non-Apple phone vendors what they need.

Still, the combination of Visual Studio plus Windows Phone 7 does make sense for .NET developers.

An early slide presented the Windows 7 hardware, which is worth reviewing as it is a reasonable specification. Supposedly Microsoft is taking a hard line with OEMs to keep the spec at or better than this minimum:

Display

480×800 QVGA
320×480 HVGA

Capacitive touch

4 or more contact points

Sensors

A-GPS, Accelerometer, Compass, Light

Camera

5 mega pixels or more

Hardware buttons

Start, Search, Back

Memory

256 MB RAM or more

8GB Flash storage or more

GPU

DirectX 9 acceleration

OpenStack takes on Amazon with open source cloud computing

Today’s big open source announcement is OpenStack, an open source cloud platform that aims to be an non-proprietary alternative to Amazon’s Elastic Computer Cloud (EC2) and Simple Storage Service (S3).

There are nearly 30 companies currently signed up to support OpenStack, including NASA, Citrix, Dell, Intel, AMD and Right Scale, but the big mover here is Rackspace, which says:

On July 19, 2010, we announced that we are opening the code on our cloud infrastructure. That’s big news for us and for the hosting industry in general. The result? Cloud technology will never look back.

The full press release is here. The initial offering is a distributed object store and a virtual machine provisioning engine.

OpenStack is not itself a cloud provider. Rather, it is offering software that lets you build a cloud, either for public or private use. Therefore, it is of immediate use only to large organisations, though for smaller users it might make sense to purchase services from an OpenStack provider since you are protected against lock-in.

The OpenStack cloud is IAAS – infrastructure as a service – offering storage and virtual machine instances. Therefore it is going up against Amazon rather than, say, Salesforce.com or Google App Engine. It is also an open source alternative to Microsoft Azure, which is also available (or will be) for both public and private clouds.

Looking at Right Scale’s comment, it seems that concern about Amazon taking over this market is a key driver behind the initiative:

From the RightScale perspective we will of course continue to support a variety of public and private clouds. We already have basic support for RackSpace’s API, which OpenStack will start out with, and we have a number of implementations under way with Eucalyptus and Cloud.com which we’re looking forward to multiply. At the same time, having many fragmented cloud efforts doesn’t really help build a compelling alternative to Amazon which keep adding incredible new features at a blazing pace. And the industry needs an alternative to Amazon, not because of some problem with AWS, but because in the long run cloud computing cannot fulfill its promise to revolutionizing the way computing is consumed if there aren’t a multitude of vendors with offerings targeting different use-cases, different needs, different budgets, different customer segments, etc. OpenStack promises to build enough momentum to create an exciting cloud offering that is as feature rich as AWS, that is implemented by a number of service providers, like RackSpace, and that enterprises can also run internally, like NASA.

For more information see the OpenStack site.

Dysfunctional Microsoft?

Microsoft watchers have been scrutinising the fascinating Mini-Microsoft post on the Kin smartphone debacle and what it says about the company. If it is even slightly accurate, it is pretty bad; and it must be somewhat accurate since we know that the hopeless Kin launch happened and that the product was killed shortly afterwards. Of course it would have been better to kill the project before rather than after the launch; the negative PR impact has affected the strategically important Windows Phone 7 launch.

Handsome profits from Windows and Office have enabled Microsoft to survive and even prosper despite mistakes like Kin, or the Xbox 360 “red ring of death”, or the Vista reset and related problems – mistakes on a scale that would sink many companies.

I see frequent complaints about excessively bureaucratic management with too many layers, and a tendency towards perplexing, ineffective but expensive advertising campaigns.

There are also questions about CEO Steve Ballmer’s suitability for the task. He nearly indulged in a disastrously over-priced takeover of Yahoo, saved only by the obstinacy of the target company’s leadership. He habitually dismisses the competition, such as Apple’s iPhone, and is proved wrong by the market. He failed to see the importance of cloud computing, and even now that the company is at least partially converted he does not set the right tone on the subject. I watched his keynote at the Worldwide Partner Conference (WPC) where he sounded as if he were trying unsuccessfully to imitate Salesforce CEO Marc Benioff from ten years’ ago. Microsoft needs to present a nuanced message about its cloud initiative, not someone shouting “oh cloud oh cloud oh cloud”.

Microsoft is also copying its competition as never before. Bing has a few innovations, but is essentially a recognition that Google got it right and an attempt to muscle in with a copy of its business model – search, advertising and data mining. Windows Phone 7 occupies a similar position with respect to Apple’s iPhone and App Store. Windows 8 also seems to borrow ideas from Apple.

Nevertheless, Microsoft is not yet a dying company, and it would be a mistake to base too much analysis of the company on something like comments to Mini-Microsoft’s blog – good though it is – since it is a magnet for disaffected employees.

While Ballmer’s effort at the WPC was poor, he was followed by Bob Muglia, president of server and tools, who was excellent. Windows Azure has come on remarkably since its half-hearted preview at PDC 2008; and Muglia comes over as someone who knows what he is trying to achieve and how he intends to get there. The Azure “Appliance” idea, shipping a pre-baked cloud infrastructure to Enterprise customers, is a clever way to exploit the demand for a cloud application model but on hardware owned by the customer.

The eBay announcement at WPC was also quite a coup. eBay will “incorporate the Windows Azure platform appliance into two of its datacenters” later this year; and while it is not clear exactly how much of eBay will run on Azure, these appliance kits represent significant hardware.

We’ve seen other strong releases from Microsoft – server 2008 R2, Exchange 2010, SQL Server 2008 R2, SharePoint 2010 which whatever you think of SharePoint is a solid advance on its predecessor, and of course Windows 7 which has done a lot to rescue Microsoft’s performance and reputation after the Vista disappointment.

I also continue to be impressed by Visual Studio 2010, which is a huge release and works pretty well in my experience.

What about Windows Phone 7? With the market focused on iPhone vs Android, clearly it is in a tough market. If there is something slightly wrong with it on launch, instability or some serious hardware or software flaw, it might never recover. Nevertheless, I do not write it off. I think the design effort is intelligent and focused, and that the Silverlight/XNA/.NET development platform along with Visual Studio is an attractive one, especially for Microsoft Platform developers. VP Scott Guthrie describes the latest SDK here. People still switch phones frequently – something I dislike from an environmental point of view, but which works in favour of new entrants to the market. If Windows Phone 7 is a decent device, it can succeed; I’d rate its long-term chances ahead of HP WebOS, for example, and will be keen to try it when it becomes available.

phonedev

Is there a lot wrong with Microsoft? Yes. Does it need a fresh approach at the very top? Probably. Nevertheless, parts of the company still seem to deliver; and even the Windows Phone 7 team could be among them.

Google App Inventor – another go at visual programming

Google has put App Inventor for Android on Google Labs:

To use App Inventor, you do not need to be a developer. App Inventor requires NO programming knowledge. This is because instead of writing code, you visually design the way the app looks and use blocks to specify the app’s behavior.

Sharon Machlis at Computerworld says it is a breakthrough:

App Inventor has the potential to do for mobile app creation what VisiCalc did for computations — move it out of the exclusive realm of specialists in glassed-in data centers (or, in the case of mobile apps, programmers who can use a conventional SDK) into the hands of power users as well as make it easier for IT departments to create corporate apps.

I’d like to believe this but I do not. It is visual programming; it is interesting; but it is similar to other visual programming tools that we’ve seen in the past. These tools have their place for learning, and there is probably some small sub-section of programming tasks for which they are ideally suited, and some small sub-section of developers for whom they work better than text-based tools, but for most of us textual code is easier and more productive when we are coding the logic rather than the user interface of an application.

I took a look at the Quiz Me tutorial. Here’s a code snippet – it is a click event handler:

image

and here is the complete application. Note the navigator at top right, which would be vital for finding your way around a more complex app:

image

It is often a problem with visual programming tools: scaling an app beyond a few simple blocks introduces difficulties with navigation and project management. Our text-based tools are highly evolved for managing large projects with thousands of lines of code.

What about democratisation of programming through visual tools like this, coding without coding, that will allow domain specialists to develop apps without involving developers? Is visual programming really easier for the non-specialist than textual programming? I’m not convinced. It should be easier to get started: no syntax errors, no language reference to consult. In the end though, is a purple “if” block with jigsaw connections for “test” and “then-do” much easier than typing if (test) {code block}?

It is just a different way of presenting the same thing, but less concise and less flexible. I suspect the domain specialist who can succeed with App Inventor will also succeed with code; and that people who struggle with code-based programming in an accessible language like Basic will also struggle with visual programming.

Where this gets interesting is when you have powerful components that expose a simple interface. A high-level non-specialist programmer can drag a component onto a design palette and do amazing things, because of the smarts that are hidden inside. Components do democratise development. One reason for the success of Microsoft’s development platform is that from Visual Basic through COM and then .NET, the company has always made it easy to use components and fostered a strong third-party market for them. If App Inventor provides a great way to deliver components to high-level developers, it could succeed.

That said, components do not require visual programming. Microsoft has flirted with visual programming – like the abandoned PopFly – but despite using the name “visual” everywhere, Microsoft has never delivered a mainstream visual programming tool.

Don Syme on F#

I’ve posted a lengthy interview with Don Syme, designer of Microsoft’s functional programming language F#. It covers:

  • The genesis of F#
  • Why it is in Visual Studio 2010
  • How it differs from other ML languages
  • Who should use it
  • What it brings to parallel and asynchronous programming
  • Unit testing F#
  • Future plans for F#
  • Book recommendations

One of the questions is: if I’m a C# or C++ developer, what practical, business-benefit reason is there to look at F#? Worth a read if you’ve wondered about that.

Setting up RemoteApp and secure FTP on Windows

I spent some time setting up RemoteApp and secure FTP for a small business which wanted better remote access without VPN. VPN is problematic for various reasons: it is sometimes blocked by public or hotel wifi providers, it is not suitable for poor connections, performance can be poor, and it means constantly having to think about whether your VPN tunnel is open or not. When I switched from connecting Outlook over VPN to connecting over HTTP, I found the experience better in every way; it is seamless. At least, it would be if it weren’t for the connection settings bug that changes the authentication type by itself on occasion; but I digress.

Enough to say that VPN is not always the best approach to remote access. There’s also SharePoint of course; but there are snags with that as well – it is powerful, but complex to manage, and has annoyances like poor performance when there are a large number of documents in a single folder. In addition, Explorer integration in Windows XP does not always work properly; it seems better in Vista and Windows 7.

FTP on the other hand can simply publish an existing file share to remote users. FTP can be horribly insecure; it is a common reason for usernames and passwords to passed in plain text over the internet. Fortunately Microsoft now offers an FTP service for IIS 7.0 that can be configured to require SSL for both password exchange and data transmission. I would not consider it otherwise. Note that this is different from the FTP service that ships with the original Server 2008; if you don’t have 2008 R2 you need a separate download.

So how was the setup? Pretty frustrating at the time; though now that it is all working it does not seem so bad. The problem is the number of moving parts, including your network configuration and firewall, Active Directory, IIS, digital certificates, and Windows security.

FTP is problematic anyway, thanks to its use of multiple ports. Another point of confusion is that FTP over SSL (FTPS) is not the same thing as Secure FTP (SFTP); Microsoft offers an FTPS implementation. A third issue is that neither of Microsoft’s FTP clients, Internet Explorer or the FTP command-line client, support FTP over SSL, so you have to use a third-party client like FileZilla. I also discovered that you cannot (easily) run a FTPS client behind an ISA Server firewall, which explained why my early tests failed.

Documentation for the FTP server is reasonable, though you cannot find all the information you need in one place. I also found the configuration perplexing in places. Take this dialog for example:

image

The Data Channel Port Range is disabled with no indication why – the reason is that you set it for the entire IIS server, not for a specific site. But what is the “External IP Address of Firewall”? The wording suggests the public IP address; but the example suggests an internal, private address. I used the private address and it worked.

As for RemoteApp, it is a piece of magic that lets you remote the UI of a Windows application, so it runs on the server but appears to be running locally. It is essentially the same thing as remote desktop, but with the desktop part hidden so that you only see the window of the running app. One of the attractions is that it looks more secure, since you can give a semi-trusted remote user access to specified applications only, but this security is largely illusory because under the covers it is still a remote log-in and there are ways to escalate the access to a full desktop. Open a RemoteApp link on a Mac, for example, and you get the full desktop by default, though you can tweak it to show only the application, but with a blank desktop background:

image

Setup is laborious; there’s a step by step guide that covers it well, though note that Terminal Services is now called Remote Desktop Services. I set up TS Gateway, which tunnels the Terminal Server protocol through HTTPS, so you don’t have to open any additional ports in your firewall. I also set up TS Web Access, which lets users navigate to a web page and start apps from a list, rather than having to get hold of a .RDP configuration file or setup application.

If you must run a Windows application remotely, RemoteApp is a brilliant solution, though note that you need additional Client Access Licenses for these services. Nevertheless, it is a shame that despite the high level of complexity in the configuration of TS Gateway, involving a Connection Authorization Policy and a Resource Authorization Policy, there is no setting for “only allow users to run these applications, nothing else”. You have to do this separately through Software Restriction Policies – the document Terminal Services from A to Z from Cláudio Rodrigues at WTS.Labs has a good explanation.

I noticed that Rodrigues is not impressed with the complexity of setting up RemoteApp with TS Gateway and so on on Windows Server 2008 R2:

So years ago (2003/2004) we had all that sorted out: RDP over HTTPS, Published Applications, Resource Based Load Balancing and so on and no kidding, it would not take you more than 30 minutes to get all going. Simple and elegant design. More than that, I would say, smart design.

Today after going through all the stuff required to get RDS Web Access, RDS Gateway and RDS Session Broker up and running I am simply baffled. Stunned. This is for sure the epitome of bad design. I am still banging my head in the wall just thinking about how the setup of all this makes no sense and more than that, what a steep learning curve this will be for anyone that is now on Windows Server 2003 TS.

What amazes me the most is Microsoft had YEARS to watch what others did and learn with their mistakes and then come up with something clean. Smart. Unfortunately that was not the case … Again, I am not debating if the solution at the end works. It does. I am discussing how easy it is to setup, how smart the design is and so on. And in that respect, they simply failed to deliver. I am telling you that based on 15+ years of experience doing nothing else other than TS/RDS/Citrix deployments and starting companies focused on TS/RDS development. I may look stupid indeed but I know some shit about these things.

Simplicity and clean design are key elements on any good piece of software, what someone in Redmond seems to disagree.

My own experience was not that bad, though admittedly I did not look into load balancing for this small setup. I agree though: you have to do a lot of clicking to get this stuff up and running. I am reminded of the question I asked a few months back: Should IT administration be less annoying? I think it should, if only because complexity increases the risk of mistakes, or of taking shortcuts that undermine security.

PivotViewer comes to SilverLight – data as visual collections

Microsoft has released a PivotViewer control for Silverlight. Data visualisation is a key business reason to use Silverlight or Flash rather than HTML and JavaScript for an application, so it is a significant release. But what does it do?

PivotViewer is the latest tool to come out of the Microsoft Live Labs Pivot project. Pivot is based on collections, which are sets of data where each item has an associated image. A pivot item has attributes, similar to properties, called facets; and facets have facet categories. Facet categories are used to filter and sort the data.

More complex Pivot data sets have several linked collections, or dynamic collections which are generated at runtime as a query result. This is necessary if the size of the data set is very large or even unbounded. You could create a web search, for example, that returned a pivot collection.

Once you have created and hosted your Pivot collections, most of the work of displaying them is done by the Pivot client. There is a desktop Pivot client, which is Windows-only; but the Silverlight PivotViewer is more useful since it allows a Pivot collection to be viewed in a web page. The client (or control) does most of the work of displaying, filtering and sorting your data, including a user-friendly filter panel.

PivotViewer also makes use of Deep Zoom, also known as Seadragon, which lets you view vast images over the internet while downloading only what is needed for the small section or thumbnail preview you are viewing.

The result is that a developer like Azure Technical Strategist Steve Marx was able to create a PivotViewer for Netflix with only about around 500 lines of code. This kind of product selection is a natural fit for Pivot.

I was quickly able to find the highest-rated music movies in the Netflix Instant Watch collection.

image

Starting with the full set, I checked Music and Musicals and then set Rating to 4 or over.

 

image

It seems to me that the strength of Pivot is not so much that it offers previously unavailable ways to visualise data, but more that it transforms a complex programming task into something that any developer can accomplish. Microsoft at its best; though of course it will only work on platforms where Silverlight runs.

Windows 8: detailed plans leaked, show Microsoft cycle of invent, fail, copy

No doubt crisis meetings in Redmond as plans for Windows 8, shared apparently with OEM partners, leak to the web. Of course it may all be an elaborate hoax, and even if not, the slides all state:

Disclaimer – Windows 8 discussion, this is not a plan of record

Still, it looks plausible. So what’s new?

In some ways, Windows 7 was low-hanging fruit. Simply fix what was broken in Windows Vista, make Windows faster, more reliable and more pleasant to use. Windows 8 needs to take a step forward, and according to these slides this is what is planned:

1. Elevation of the Slate as a key form factor. The slides refer to three basic form factors: Slate for web and media consumption, laptop for productivity and all-in-one touch control desktop for both.

2. 3D content display along with “HTML 5 video” and DRM, focus on DLNA.

3. Instant On, always connected. Hang on, wasn’t this promised for 7? And Vista? The docs do refer to a “New Off state” called Logoff + Hibernate, with optimised hibernate plus a “Boot/Shutdown look and feel”. The idea is that this becomes the norm for a switch off.

4. Log on with face recognition. One of the few pieces of real innovation on offer here.

5. Proximity based sleep and wake.

6. Another go at the Windows App Store. This time Microsoft is serious. Approval process. Dashboard for developers with telemetry. Auto update. Software license roams with the user, as do settings – a great idea. Partner co-branding, ho hum.

7. Reinstall or “reset” Windows while keeping apps, docs and settings. A bit like the old repair install, though the difference here seems to be that this is a genuine wipe and reinstall, with apps reinstalled from the App Store. 

8. Windows accounts “could be connected to the cloud”. I would think they must be, if the app store stuff with roaming software licenses is to work. Hooking your Windows login to a Passport ID is not new though; I’m guessing it will just be more prominent and important.

Needless to say, this is not the whole Windows 8 story, even if genuine. What do we learn though? Mainly that Microsoft is taking its lead from Apple and accepts that the App Store concept is central to our future computing experience; the Slate also seems influenced by iPad.

We are also seeing the return of Passport. Most of what was in the controversial .NET My Services from 2001 is now accepted as normal, after Google and Facebook have softened us up for the concepts.

There’s a pattern here. Microsoft gets bright idea – Tablet, Windows Marketplace, Passport. Does half-baked implementation which flops. Apple or Google works out how to do it right. Microsoft copies them.

When do we get Windows 8? You can try and puzzle out the slide on “Windows 8 product cycle” if you like; but I’d bet that it will be around three years from the release of Windows 7: mid to late 2012.

Big browser and RIA news: Canvas comes to Internet Explorer 9

I’ve just installed the third Internet Explorer Platform Preview (on a virtual machine just in case) and run through a few of the demos. One of the most impressive is Canvas Pad, which demonstrates the HTML 5 Canvas element.

image

Canvas is particularly interesting, since it provides a surface to which you can draw anything you like. Canvas support was not announced at Mix earlier this year, when IE9 was unveiled, and some of us speculated that Microsoft would omit it in order to preserve the value of its Silverlight plugin – though in doing so it would also help Adobe Flash. Well, apparently the IE9 team decided to risk it. Not only is canvas supported; it is also hardware-accelerated:

Like all of the graphics in IE9, canvas is hardware accelerated through Windows and the GPU. Hardware accelerated canvas support in IE9 illustrates the power of native HTML5 in a browser.

Is there still value in Silverlight and Flash? There is, for several reasons. A plug-in presents a predictable runtime, insulating the application from browser variations. A plugin will work on browsers that do not yet support Canvas. Further, Silverlight includes the .NET Framework with its rich library, and supports the .NET languages, whereas for HTML5 you have to use JavaScript – though don’t forget Google Web Toolkit, which compiles Java to JavaScript, and other similar projects.

Even so, once you have hardware-accelerated Canvas there will be few occasions when you absolutely have to use Flash, Silverlight or Java.

Microsoft is doing the right thing. Crippling IE for the sake of Silverlight would only push users to other browsers, so it would not achieve its goal.

A full list of what is new in IE9 is here. It is shaping up to be the most interesting new IE since version 4.0 back in 1997.

Adobe financials: strong Creative Suite 5 and Flash, claims company undervalued

Adobe has released its financial results for its second quarter, reporting $227.3 million net income (GAAP) compared to $161.4 million in the same quarter last year; and revenue of $943 million which it says is 34% year on year growth.

Much of this is thanks to a successful launch for Creative Suite 5, which accounts for 56% of Adobe’s revenue. However, Adobe has also reported 12% year-on-year growth for LiveCycle, its enterprise server products about which I learned last week in Amsterdam. The “platform” segment, which includes the Flex development tools, Cold Fusion, and Flash media services, is also growing, from $36.8 million in Q2 2009 to $45.4 million in Q2 2010.

CEO Shantanu Narayen is upbeat, saying “we believe Adobe is significantly undervalued today” and backing his judgement with a share buyback program.

I was particularly interested in the focus on Flash in Adobe’s statements and conference call:

Approximately 3.5 million Flash designers and developers are working with Flash-based solutions today, and their ranks grew by 59 percent in 2009

said Narayen; while Executive VP Mark Garrett noted:

CS5 products containing Flash authoring and output as a product component achieved revenue growth of 22% version-over-version to date

making the point that this exceeded the growth of CS5 overall.

Any clouds on the horizon? Two that I can think of. One is that Apple wants to kill Flash. CEO Steve Jobs says:

Flash was created during the PC era – for PCs and mice. Flash is a successful business for Adobe, and we can understand why they want to push it beyond PCs. But the mobile era is about low power devices, touch interfaces and open web standards – all areas where Flash falls short.

The other issue is that Adobe is dependent on Creative Suite, desktop software that arguably will be a business hard to sustain in the cloud and device era.

Still, these are good figures, the best we have seen from Adobe for a while, and despite the efforts of Steve Jobs both Adobe and Flash are prospering right now. A side-effect of Apple’s Flash downer is that competitors have hastened to support it, with Google building Flash support deeply into its Chrome browser.

Detailed figures from Adobe are here.