Category Archives: web authoring

JavaFX code runs at the speed of Java

The Java runtime used by Sun’s JavaFX is mature and well optimized, which means that non-visual code will generally perform well. I’ve just spotted that Josh Marinacci at Sun put up a version of my countprimes test to illustrate this. Here’s the JavaFX version. On my system JavaFX and Silverlight are neck-and-neck for this – sometimes one is faster, sometimes the other. Flash is much slower, and Javascript not in the race.

Next stop: an Alchemy version.

Sun’s JavaFX is launched: another go at applets

Sun has launched JavaFX.

 
Sun’s Eric Klein, VP of Java Marketing, explains JavaFX

What is it? Sun says:

JavaFX is a rich client platform for building cross-device applications and content. Designed to enable easy creation and deployment of rich internet applications (RIAs) with immersive media and content, the JavaFX platform ensures that RIAs look and behave consistently across diverse form factors and devices.

What is it really? A new script language called JavaFX; a compiler that turns JavaFX script into Java bytecode; a runtime that includes new media codecs; converters that turn SVG, PhotoShop or Illustrator graphics into JavaFX format. JavaFX also requires the JRE (Java Runtime Environment). Currently only Windows and Mac OS X are supported; Linux and Solaris support “will be provided in a future release”; mobile is also on the way, promised for Spring 2009.

A variety of video and audio codecs are supported, but unfortunately these vary by platform. For example, WMV plays only on Windows; H.264 runs on Mac but on Windows only “as an update”, whatever that means. However, there is a specific “cross-platform” codec, which is VP6 from On2. Snag: you need On2’s commercial software to convert to the required .FXM format.

What’s good about JavaFX? Sun claims broadest market reach; but this is nonsense – I presume it is counting every device with a smidgen of Java installed. There are some advantages though. JavaFX can run Java code, and there’s plenty of that out there. The Java VM is mature and fast. A neat feature is that you can run JavaFX applications outside the browser by dragging them onto the desktop. Even in the browser, Java FX are not confined to the browser window, but can create graphics that appear anywhere on the screen. Java SE 6 update 10 or higher is required for these features, which depend on an out of process Java applet plugin in this update.

What’s bad about JavaFX? There are several reasons why Sun will find this a hard sell:

  • Large download size. Flash and Silverlight are self-contained browser plug-ins; Silverlight is larger than Flash, but still under 5MB. I’m not sure exactly what size JavaFX is on a machine without Java. I tried visiting javafx.com on a new XP install, and was directed to the main Java download site which recommended a JRE of about 7MB; I suspect it might do further incremental downloads after that, since the full JRE is more like 15MB. Once the JRE is in, you still need to install the JavaFX runtime, though is done automatically and I imagine that in time JavaFX will just be part of the JRE. Right now, the process is less smooth than for Flash or Silverlight.
  • Lack of design tools. Adobe has its fantastic Creative Suite, most of which now seems to target Flash. Microsoft has Expression. Sun is offering converters for Photoshop and Illustrator or SVG. These applications know nothing about JavaFX, and there is no visual editor in NetBeans 6.5.
  • A new language. Although JavaFX script does not look particularly difficult to learn, it is friction for developers wanting to give it a try.
  • Signs of haste. I’m seeing this now. When I saw the JavaFX announcement, I went to the site and successfully installed the runtime and played the introductory video, which itself uses JavaFX. Soon after, presumably as word spread, the launch site became unusable for me. Videos do not play; samples do not download. The spin will be that this shows the high level of interest; but vendors like Sun are meant to understand about scalability.

     
    JavaFX.com showing signs of stress on launch day

  • Late to the party. Adobe is well entrenched with Flash. If Microsoft is late with Silverlight, Sun is very late with JavaFX.
  • Limited features. I’m just back from Adobe MAX, learning about features like Pixel Bender in Flash Player 10, and its new text rendering engine, and new audio API. The JavaFX API looks limited by comparison. There is no 3D support yet.
  • Lack of compelling reasons for adoption. You can run Java code; but then again, Java applets and desktop Java clients have been around for many years. I can see the value in both Flash and Silverlight, but what is the must-have feature of JavaFX?
  • Platform variation. It bothers me that JavaFX supports different codecs on different platforms. What happened to write once – run everywhere?

What else? It’s early days. I’d like to hear from Designers whether JavaFX does what they need. JavaFX will improve, and it does have obvious value for Java developers who want to code rich internet applications. Sun’s commitment to open source may make JavaFX interesting to those who find Flash and Silverlight too tightly locked to single vendors.

Some details above are drawn from the JavaFX FAQ.

Adobe engineer: we gotta beat Silverlight

There was an amusing incident in the Flash Player Internals session this morning at Adobe MAX Milan. An attendee asked engineer Jim Corbett about what he said was a long-standing (10 years) Flash bug. Apparently, sprites sometimes tear as they move across the screen.

Corbett said he wasn’t familiar with the problem; but maybe it was a problem with the browser and that was why the bug had not been fixed.

Silverlight doesn’t have this problem, said the questioner.

Then we gotta fix it, said Corbett.

It reminded me how much I have heard Microsoft mentioned hear at Max. The Adobe execs make constant jibes at Microsoft; and are keen to emphasise wins like the BBC switching away from a Microsoft solution (not Silverlight) to Flash and AIR for its iPlayer.

It really is a war; and the winner for the time being is the user, as competition energises the development of these two Rich Internet Application platforms.

Amethyst from SapphireSteel: Develop Flex in Visual Studio, an alternative to Tofino

Not long ago I looked at an early preview of Ensemble’s Tofino, an extension to Visual Studio for developing Flex applications that target the Adobe Flash runtime. It was disappointing, though I’ve been assured that an improved build is in preparation. Ensemble had better be quick: I’ve just been informed of an alternative called Amethyst, from SapphireSteel software, creators of the Ruby Visual Studio extension Ruby in Steel. Here’s what I know so far about Amethyst:

  • ActionScript and MXML editing and project management
  • Installs into commercial editions of Visual Studio or the free Visual Studio shell
  • Initial beta of free personal edition available next week
  • Planned for the 2nd quarter of 2009: commercial Professional Edition with drag-and-drop Flex/AIR visual design environment, IntelliSense and graphical debugging tools
  • Can integrate with Ruby In Steel to create a multi-language Visual Studio solution with Flex at the front end and Rails at the back
  • Amethyst Personal will remain completely free

All sounds good; and Ruby in Steel is well-regarded so this is worth watching out for if you have any interest in developing for Flex in Visual Studio.

A high quality Visual Studio design tool for Flex would help Adobe gain adoption for Flex and AIR among Microsoft-platform developers.

From the archives: Mark Anders and Scott Guthrie on ASP+

My editor at The Register asked me if I had any interviews that would be fun to dig out for a retrospective piece. This one is from September 2000, shortly after the announcement of the .NET Framework, where Microsoft’s Mark Anders and Scott Guthrie talk to me about ASP+, the name for ASP.NET when it was in preview.

Listening to the whole interview was a little frustrating, because most of the time I asked questions that were interesting at the time, like the relationship between ASP.NET and COM, but not so much now. I was reminded though that Guthrie gave an impressive demo of what we now call AJAX, where updates to a web page are processed on the client, and described to me how it worked.

The pair also enthused about hosting Windows Forms controls in the browser, one of the .NET ideas that did not really become practical until the release of Silverlight. The full WPF (Windows Presentation Foundation) also works well in the browser, but most web developers rule it out because it is Windows only.

As it turned out, AJAX might never have taken off without the work of Google, while Silverlight now looks like a reaction to Flash. I suspect that Microsoft found it difficult to evolve these ideas into full products because it clung to the idea of a Windows-centric Internet, where Windows rather than the browser is the rich client.

Guthrie is now Corporate VP, .NET Developer Division at Microsoft, while Anders is at Adobe where he has been working on a tool for the Flash platform called Catalyst, previously known as Thermo.

Adobe Alchemy – compile C/C++ to ActionScript

I love the careful wording on Adobe’s Alchemy site:

The purpose of this preview is to assess the level of community interest in reusing existing C and C++ libraries in Web applications that run on Adobe® Flash® Player and Adobe AIR®.

It needs to be put cautiously, because Alchemy – unlike Google Web Toolkit, which handles Java to Javascript – is not intended to become a general-purpose alternative to ActionScript. Rather, the idea is to enable existing C/C++ libraries to work within Flash applications. Examples given include transcoders, cryptographic algorithms, and XML parsers. Performance is said to be 2-10x slower than native code. Alchemy was demoed today at Adobe’s MAX conference.

Possibly a Java to ActionScript compiler would be more useful to most of us; though for new code ActionScript 3.0 is close enough to Java that it should not be difficult for most developers to learn.

Technorati tags: , ,

Develop for Adobe Flex in Microsoft Visual Studio – or maybe not

News from the Adobe MAX conference this week in San Francisco: Ensemble has developed an add-in for Visual Studio for Flex development, code-name Tofino. It’s currently in beta and available for download. Flex is Adobe’s developer-focused SDK for Flash applications.

I installed it this morning, and so far it does not impress. There is zero documentation (just a few links to the standard Flex docs on Adobe’s site), and it lacks even MXML Intellisense, let alone a visual designer. When you go to project properties, there is nothing to configure. The toolbox is also empty. On the plus side, it successfully invoked the Flex compiler to build the project, and managed to open it as a static file in Internet Explorer when I clicked Debug. I’d prefer an option to use Visual Studio’s built-in web server for debugging. There must be more to it than this; then again it is advertised as a beta which is meant to mean well advanced (ha ha). I suggest sticking firmly with Flex Builder for the time being.

Adobe has largely ignored .NET in its Flex and AIR technology, though it does support SOAP. I am not sure whether this is caused by aversion to Microsoft, or an assumption that Microsoft developers will use Microsoft technologies like Silverlight or Windows Forms, or a bit of both. Integration with Visual Studio and server-side .NET could be significant for Flex adoption, though it would be better if Adobe itself were doing the add-in.

You can see the same thing happening on Microsoft’s side, with a half-hearted Silverlight project for Eclipse (which only works on Windows), or the well-regarded Teamprise which integrates Eclipse with Visual Studio Team System. In both cases Microsoft keeps itself at arms length, which does not have the same impact as in-house support.

There are always concerns about the quality of third-party applications. I am sure Adobe itself would not have put such an inadequate preview up for download, as Ensemble has done for Tofino.

In which I ask Marc Benioff, CEO Salesforce.com, if his platform is a lock-in

Moving from Microsoft’s PDC last week to Dreamforce (the Salesforce.com conference) this week has been an interesting experience. Microsoft is the giant still trying to come to terms with the new world of the Internet; Salesforce.com is the young upstart convinced that it has the future computing platform in its grasp. Salesforce.com is a much smaller company – revenue of just over $1 billion versus Microsoft’s $60 billion – though oddly Dreamforce is a larger conference, with nearly 10,000 attending, compared to 6,500 at PDC (numbers very approximate). Being small means greater opportunity for growth, and Salesforce.com reported 49% year on year  revenue growth in the last quarter for which figures are available [PDF], ended July 2008.

As for the actual conference, Monday was great, with an upbeat keynote and a fascinating press Q&A with CEO Marc Benioff; Tuesday failed to sustain the momentum with a disappointing keynote (people were leaving in droves as Michael Dell attempted to pitch storage servers to this on-demand crowd), and today is wind-down day.

The press Q&A covered most of the interesting questions about this company. Is it a lock-in? Will it move beyond CRM to a total cloud platform? Will it be bought by Oracle? How is the Salesforce.com platform (called Force.com) different from Microsoft’s Azure? Benioff has a great talent for sound bytes, and made endless digs at Microsoft and its new platform which he called “Azoon”. Microsoft developers are in a black room, he said, but walking out into the bright light of cloud computing – by which he means not Azure, but his stuff, naturally.

I got to ask the lock-in question. Benioff had already observed that making the platform programmable increased his hold on this customers. “It’s exactly the same thing that happened when Oracle moved from version 5 to version 6 with PL/SQL,” he said. “The database became programmable. Customers became customers for life.” Incidentally, Benioff talks a lot about Oracle, which is the database on which Salesforce.com itself runs, and refers to Larry Ellison as his mentor. I asked whether he was now asking his customers to repeat the mistakes of the past, when they locked themselves to Oracle or Microsoft or IBM, and I am going to quote his answer nearly in full:

It’s not a question of repeating the past, it’s just an aspect of our industry that it’s important for vendors to offer customers solutions that give them the ability to fully integrate with the platform. It benefits the customer and it benefits the vendor, and every major vendor has done it. That’s really the power.

I think that it’s true whether you’re writing with Google today and you’re building on the Google AdWords and AppEngine, you have to make the choice as the developer, what’s the right thing? Portability of code is just not something that we have ever got to in our industry. As a developer you want to make the right choice … but the reality is that the customers who are doing deep integration with us, those are customers who are going to be with us for a long time and we’re a strategic solution to them.

It’s not a commodity product. It never has been. If you think of it as a commodity product it’s a mistake … I’m completely honest and open about it, which is you’re making a strategic relationship decision, and you need to look at your vendor deeply, and choose what is the right thing for you. When customers bought Sybase SQL and they wrote Transact SQL, or they bought Oracle and wrote PL/SQL, or they’re writing in Visual Studio, well Visual Studio does not port over to HTML. You’re making a strategic decision …I think that’s important, that you research everything, evaluate everything … you do as a vendor end up with a very loyal customer base over time.

Are you familiar with the iPhone? [sure] So iPhone has a development environment that’s called Cocoa. So you have all these apps now on AppStore, which is a name that we used to have and we’ve given it to them, so when you write on AppStore, when you write on Cocoa, guess what, those apps are in Cocoa. And there’s nothing wrong with that.

I followed up by asking whether Sun’s Java experiment, including the idea of code portability between vendors, was an impossible dream.

If you’re writing in Java, you’re betting on Java. It’s a totally reasonable decision. You make that choice. It’s not portable away from Java, that I know of. I just think it’s an aspect of our industry. You should not avoid it, and vendors should not say something like, oh, we’re gonna offer some level of portability, just be honest about what our strategies are. When you’re writing on SQL Server, when you’re writing on Visual Studio, when you’re writing on Oracle, when you’re writing on DB2, when you’re writing on Force.com, you’re gonna be writing natively to a platform, and then the more open that platform is, the more connections there are to that platform, the more powerful that is for you. But you are making a platform decision, and our job is to make sure you choose our platform and not another platform, because once they have chosen another platform, getting them off it is usually impossible.

I give him credit: he could not be more clear. Even so, if you follow his reasoning, developers have an impossible decision at this point of inflexion in the industry. It is all very well researching Salesforce.com, or other vendors, but we cannot know the future. For example, Salesforce.com may become Oracle (an outcome that analysts I spoke to here see as very plausible), in which case you researched the wrong company.

On balance I doubt that the Force.com platform will go away, but its future cost and evolution is all a matter for speculation. That said, I do think it is an interesting platform and will be posting again about it; I’ve also made some comments on Twitter which you can find on my page there.

Salesforce.com linking with Facebook, Amazon

I’m at the Dreamforce conference in San Francisco, where Marc Benioff, CEO of Salesforce.com, and co-founder Parker Harris, are presenting new features in the force.com platform.

The first is a built-in ability to publish your Force.com data as a public web site. The service is currently in “developer preview” and set for full release in 2009. Even in preview, it’s priced per page view on your site. For example, if you have the low-end Group Edition, you get 50,000 page views free; but if you exceed that limit, you pay $1000 per month for up to 1,000,000 further page views. It would be unfortunate if you had 50,001 page views one month.

The second announcement relates to Facebook integration. This is a set of tools and services that lets you use Facebook APIs within a Force.com application, and create Facebook applications that use force.com data. Sheryl Sandberg, Facebook COO, says this is “Enterprise meets social”. The problem: Facebook is consumer-focused, more play than work. Sandberg says this deal will launch Facebook into the Enterprise. This will be an interesting one to watch.

Third, there are new tools linking Force.com with Amazon’s S3 and EC2. Tools for S3 wrap Amazon’s API with Apex code (Apex is the language of Force.com) so you can easily add unlimited storage to your Force.com application. Tools for EC2 delivers pre-built Amazon Virtual Machines (AMIs) that have libraries for accessing Force.com data and applications. The first AMI is for PHP, and simplifies the business of building a PHP application that extends a Force.com solution.

Interesting that Salesforce.com is providing two new ways to build public web sites that link to Force.com – one on its own platform, the other using PHP and in future Ruby, Java (I presume) etc.

It’s worth noting that you could already do this by using the SOAP API for Force.com, and there are already wrappers for languages including PHP. This is mainly about simplifying what you could already do.

More information is at developer.force.com.