Category Archives: web authoring

The messy world of the Web 2.0 user interface

Verity Stob’s Web 2.0 app diagram is worth a look.

So is it back to plain old HTML+forms then? That won’t do either; your app will look a decade old, and offline will never work.

This is why the current RIA wars are fascinating – particularly since Apple seems averse to runtimes like Flash, Java or Silverlight on its iPhone.

Which leaves what? JavaScript, hélas.

The BBC’s Global Visual Language

Not a pictorial version of Esperanto; rather, a set of design guidelines for bbc.co.uk:

The global visual language is a set of guidelines which aim to bring more consistency to the site by introducing an underlying design grid and consistent design patterns, icons, buttons, image sizes and a pan-BBC audio/video player.

according to BBC interaction designer and blogger Ben Hanbury. His main focus is the revised iPlayer site, which has the last seven days of the BBC’s TV and radio output available on-demand via a media player based on Flash – Adobe must be delighted.

That said, the new iPlayer site is one of the few examples I’ve known where Flash content does not play reliably. On my normal PC I get the useless and inaccurate message, “This content isn’t available at the moment.” Seems to be a firewall issue. I’ll post again if I can work out exactly what the problem is.

Technorati tags: , , ,

Microsoft accused of reinventing EJB – ouch!

There is a lot of discussion around Microsoft’s object-relational efforts right now. There are a couple of key issues:

  • Is Microsoft really committed to Linq to SQL, or is it shifting its attention to Entity Framework?
  • Is Entity Framework being pushed out before it is ready? A “vote of no confidence” open letter along those lines has been signed by over 300  including more than a dozen MVPs (Most Valued Professionals), experts in Microsoft data technologies.

Now a post from MVP Ian Cooper makes the frightening suggestion that Microsoft is ignoring the lessons of Java’s problems with EJB:

The .NET community had a huge amount to gain from this experience. Ports of Hibernate and Spring offered the community the chance to avoid the mistakes of the past. However, seemingly unaware of the lessons of history the EF team embarked on a project to produce a complex framework, of which persistence is just one aspect, reminiscent of the EJB initiative. So the reaction against the EF comes from its failure to learn lessons that another community has struggled with around complexity and ambition.

Microsoft’s success with .NET has been partly enabled by over-complexity in the Java world. Microsoft’s secret sauce is enabling developers to build stuff that works quickly and easily – which, incidentally, is why I am really disappointed that Visual Studio 2008 is still such a mess for quick database applications.

My own knowledge of the Entity Framework is rather thin. I’ve treated it as a layer that you have to generate in order to use ADO.NET Data Services, a REST API that I really like. It has to be said though – Microsoft’s data story is getting confusing. Roger Jennings is doing a great job of tracking developments.

Adobe’s Acrobat.com REST API

I wrote a piece for IT Week on Adobe Acrobat 9. One aspect of the new Acrobat.com collaboration site that has not received much attention (by way of evidence, the developer forum is currently quiescent) is the document services API. This is a REST API which lets you integrate Acrobat.com services into an application. You can use pretty much any programming language that can talk HTTP. There are some similarities with Amazon’s Simple Storage Service: file upload and download, and management of access control lists based on Adobe IDs (email addresses registered with Adobe). The API reference is here; there are also some wrapper libraries for Java, ActionScript, Ruby, Python and Cold Fusion. No C# yet.

It strikes me as a useful API. For example, imagine you have an application that creates a sales report. The application could upload the report to Acrobat.com and email a group of colleagues with the link.

Another obvious application is a utility to synchronize local and online files. While there are no specific synchronization APIs, you can get the last modified date of a file which would be enough for something simple.

The service will get more useful as other pieces emerge. Flash 10 has a rich text editor with some useful features such as multi-columns with text flow, multi-language and bi-directional support. Put this together with AIR and the Acrobat API and you have all you need to make your own cross-platform offline word processor with online storage. Adobe itself intends to provide this in a future offline version of Buzzword.

Ruby interpreter flaws make the case for JRuby?

The official Ruby blog reports:

Multiple vulnerabilities in Ruby may lead to a denial of service (DoS) condition or allow execution of arbitrary code.

More discussion here and here. The community is fixing the problems energetically; but they do appear serious, and some are struggling with compatibility issues.

Since these seem to be bugs in the interpreter, it strikes me that this makes a good case for JRuby or in due course IronRuby, on the grounds that the Java and .NET runtimes are more mature. When I spoke to ThoughtWorks about its extensive Ruby work, I was told that JRuby is almost always used for deployment, partly because enterprises are more comfortable with it.

Technorati tags: , , ,

Installing SproutCore on Ubuntu on VirtualBox

If you check out the installation instructions for SproutCore you will notice that Windows developers are not really catered for (though I am sure it can be done). I also noticed some Windows issues in the Sproutcore forum. More evidence of the Windows/Unix disconnect.

Having been impressed by VirtualBox recently, I figured it might be easier to use VirtualBox and Ubuntu.

Here’s how it went. I ran up a new VirtualBox image and installed Ubuntu. Very easy; just point VirtualBox to the Ubuntu install iso. This worked, except that Ubuntu did not recognize the video driver and defaulted to 800 x 600 resolution. Solution: install dkms in Synaptic (or using apt-get); then install the VirtualBox Linux Additions. That gave me 1024 x 768, which is good enough.

Next, you need to install Ruby (developer version) (use sudo or root)

apt-get install ruby

apt-get install rubygems

apt-get install ruby1.8-dev

and some build tools as one of the SproutCore dependencies (hpricot) calls make when installed:

apt-get install build-essential

I thought that would be enough, but my first go at installing SproutCore failed, apparently because gem is not on the path. Although it seemed to work, I got “command not found” when running sproutcore. So:

export PATH=$PATH:/var/lib/gems/1.8/bin

Now you can install SproutCore:

gem install sproutcore

Several components, such as hpricot, ask which version to install. I chose the variant designated (ruby).

After that, the Hello World tutorial ran exactly as expected.

By the way, although this example makes it look as if SproutCore is a dynamic server framework, it is not. The usual way to deploy a SproutCore application is as static files; the server arrangement is for debugging.

Note: the command above only amends the path for the current session. To make it permanent, I added the following to lines to the end of /etc/profile (needs root permissions to edit)*:

PATH=$PATH:/var/lib/gems/1.8/bin
export PATH

*See comment below for an even better suggestion.

The RIA dilemma: open vs predictable

There’s recently been a bit of hype (RoughlyDrafted.com) for Charles Jolley’s Sproutcore, yet another JavaScript framework, mainly because Apple is using it as its “Cocoa for the Web”, according to AppleInsider.

I tried the sample controls demo in IE7 but it didn’t work quite right. For example, the Picker pane opened but would not close. Tried again in Firefox 3.0 and everything was fine.

I’ve got no idea what the problem is with IE7; it is probably because of weak standards support in IE. However, it illustrates the advantages of a plug-in like Flash, Silverlight or Java. With these platforms, the application is largely insulated from differences between browsers.

The snag with the proprietary plug-in approach is that the vendor may not support every platform equally. Microsoft is entrusting the bulk of Silverlight Linux support to a third party. There are also issues of control. Apple most likely does not want any runtimes on iPhone because they open up a route to application deployment that bypasses its App Store and 30% revenue share. Google seems wary of Flash; RoughlyDrafted says that is because of the risk of content being turned into “opaque binaries” that are beyond the reach of its contextual advertising analysis, but it may just be  reluctance to cede such an important part of its platform to a third party.

Still, as a developer in search of a predictable app platform I’d rather target a plug-in than trust the browser vendors to be sufficiently consistent, and the Javascript libraries sufficiently smart, to enable my code to run reliably everywhere. It is easier to get away with a requirement for, say, Flash 9, than to insist that users choose a particular browser or operating system.

There are other factors of course. On the Javascript + HTML side, there are advantages in that it extends rather than replaces the HTML model. Things like clipboard support just work. Plus, it runs on iPhone.

On the plug-in side, you get the fast execution of a JIT compiler, and easy use of graphical and multimedia effects that take effort to do in JavaScript, or can’t be done at all.

I would be interested in comments from developers about what RIA platform you are choosing, and why.

Simple CRUD with Silverlight

I spent a couple of hours putting together a simple CRUD (Create, Retrieve, Update, Delete) application with Silverlight 2.0 beta 2.

Most of the examples I’ve seen use LINQ to SQL; that’s fine, but I wanted to do something without that intermediate layer. Having said that, I ended up in effect writing my own object-relational mapper. Still, it’s nice to know exactly what the code is doing.

I’ve described the project in a little more detail here.

Bet on Entity Framework, not LINQ to SQL

So says Roger Jennings in his post Is the ADO.NET team abandoning LINQ to SQL? His main points in favour of ADO.NET Data Services (formerly Astoria) Entity Framework:

  • It is the focus of more energetic development
  • It already has richer features
  • It supports multiple database engines, not just SQL Server

As Andres Aguiar, software architect at Infragistics, notes in a comment, this has a lot to do with internal politics at Microsoft:

The Data Programmability Team never owned LinQ to SQL, it was owned by the C# team. That’s why we have two O/R mappers, both teams wanted to ship theirs. The C# team looks to be thinking about functional programming now. The Data Programmability will always be thinking about data. That’s why the EF [Entity Framework] is the safe choice.

Although LINQ to SQL is now (apparently) owned by the SQL Server team, it still doesn’t seem plausible or sensible that both will get equal attention. We also learn from Matt Warren that LINQ to SQL was deliberately tied to SQL Server only:

LINQ to SQL was actually designed to be host to more types of back-ends than just SQL server. It had a provider model targeted for RTM, but was disabled before the release. Don’t ask me why. Be satisfied to know that is was not a technical reason.

Note that this wasn’t necessarily a plot in favour of SQL Server world dominance; keeping the entire stack as a Microsoft stack no doubt makes support easier. That said, to me this is the big weakness of LINQ to SQL.

I was impressed by Astoria when I first saw it at the European Tech Ed in 2007. I am not surprised it is gaining ground.