Category Archives: java

The Salesforce.com platform: what’s new, what’s coming

I’m attending the Cloudforce conference in London to catch up on what’s new with the Salesforce.com platform. CEO Marc Benioff was on good form, with a fun slide in his keynote presentation saying “Beware of the false cloud” – this was a jab at private clouds which he considers lack the advantages of a multi-tenanted public cloud platform like, you know, Salesforce.com. He has some justification – operating your own cloud is clearly a significant IT burden to carry – but that is the price of freedom. His company continues to report impressive growth.  The theme this year is Salesforce.com Chatter, a Twitter-like service embedded into the platform, for which there are just-announced mobile clients (Apple iOS, Blackberry, Android coming) as well as integration with the web UI and programmable platform.

Chatter is reducing email usage for adopters, apparently; Benioff says by 40% in his own company. Another of its advantages (aside from general social media goodness) is that users cannot attach documents directly, but only links to documents – pass by reference not by value – which is a better approach to collaboration. Of course you can do this in emails as well, but people habitually do not. It makes you think – maybe the likes of Outlook should do this by default, saving no end of space in corporate mailboxes. Or perhaps we should just use Chatter instead.

But what about the developer angle, the Force.com platform that lets you build custom applications? I attended a session on the subject. There was a comment from partner Nimbus which caught my ear – the speaker said that they avoid writing custom Apex code wherever possible, and generally find ways to use the platform’s built-in features instead. His rationale: “You will have to live with that code for ever”. It is another angle on declarative programming, in which you declare your intentions and let some underlying engine transform them into actual code. The advantage is not only ease of development, but also that improvements in the engine can enhance the application without any need to rewrite code.

I asked what is new and what is coming in the Force.com platform. Chatter is one element; one of its key features is that applications can “chat” as well as individuals. Another theme is workflow tools, and integrating the technology acquired with Informavores, which is being rebuilt on the Salesforce.com platform as Visual Process Manager. In tune with the remarks from Nimbus, there is also an effort to reduce the need for Apex code and to offer guided steps that business users can apply without the need of a development specialist. Another focus is scalability – “people are starting to use the platform in ways that we didn’t think of” – which mean back end work to handle their demands. Finally, there is the joint development with VMWare called VMForce that lets you run Java with full access to the Force.com API.

Open season for patent litigation makes case for reform

It seems to be open season for software patent litigation. Oracle is suing Google over its use of Java in Android. Paul Allen’s Interval Licensing is suing AOL, Apple, eBay, Facebook, Google, Netflix, Yahoo and others – the Wall Street Journal has an illustrated discussion of the patents involved here. Let’s not forget that Apple is suing HTC and that Nokia is suing Apple (and being counter-sued).

What’s next? I was reminded of this post by former Sun CEO Jonathan Schwartz. He confirms the supposition that large tech companies refrain from litigation – or at least, litigate less than they might, refrain is too strong a word right now – because they recognize that while they may have valid claims against others, they also most likely infringe on patents held by others.

The gist of Schwartz’s post is that Microsoft approached Sun with the claim that OpenOffice, owned by Sun, infringes on patents held by Microsoft thanks to its work on MIcrosoft Office:

Bill skipped the small talk, and went straight to the point, “Microsoft owns the office productivity market, and our patents read all over OpenOffice.”

Sun’s retort was in relation to Java and .NET:

“We’ve looked at .NET, and you’re trampling all over a huge number of Java patents. So what will you pay us for every copy of Windows?”

following which everything went quiet. The value of .NET to Microsoft is greater than the value of OpenOffice to Sun or Oracle.

Oracle, however, seems more willing to litigate than Sun; and I doubt it cares much about OpenOffice. Might we see this issue reappear?

That said, Microsoft also has a large bank of patents; and who knows, some of them might be brought to bear against Java in the event of legislative war.

The risk though is that if everyone litigates, the industry descends into a kind of nuclear winter which paralyses everyone. Companies like Interval Licensing, which seemingly exist solely to profit from patents, have no incentive to hold back.

Can any good come of this? Well, increasing software patent chaos might bring some benefit, if it forces countries like the USA to legislate in order to fix the broken patent system.

Protecting intellectual property is good; but against that you have to weigh the potential damage to competition and innovation from these energy-sapping lawsuits.

We need patent reform now.

Measuring start-up time for .NET, Java, C++

A comment here points me to this comparison by Decebal Mihailescu of start-up times for processes on Windows using different runtimes: .NET in several versions, Java 1.6, Mono 2.6.4, and Visual C++ 2010 (native code).

image

It is notable that native code is much faster than the runtimes, and that .NET is ahead of Java – to be expected, perhaps, since Windows is its native environment.

The test application is tiny and when we are talking about a time of less than a tenth of a second, users are unlikely to care much. I would like to see tests based on a larger application; on the other hand it becomes increasingly difficult to make a fair comparison.

It’s a shame Embarcadero Delphi was not included, though I’d expect similar figures to those for Visual C++.

Start-up time is critical to perceived performance. One reason I use an ancient version of Paint Shop Pro for simple image manipulation is that I can double-click an image and be editing it instantly, whereas alternatives like Adobe PhotoShop or the free paint.net make me wait. Unless I need the extra features these provide, I stick with fast and simple.

Oracle still foisting Google Toolbar on Java users

Oracle may be suing Google over its use of Java in Android; but the company is still happy to take the search giant’s cash in exchange for foisting the Google Toolbar on users who carelessly click Next when updating their Java installation on Windows. If they do, the Toolbar is installed by default.

image

This is poor practice for several reasons. It is annoying and disrespectful to the user, particularly when the same dialog has been passed many times before, bad for performance, bad for security.

Sun at least had the excuse that it needed whatever income it could get.

I know certain other companies do this as well with their free runtimes – Adobe is one – and I like it just as little. However, as far as I can recall Adobe only adds foistware on a new install, not with semi-automatic updates.

Apple not Android is killing client-side Java – so why is Oracle suing Google?

Oracle is suing Google over Java in Android; the Register has a link to the complaint itself which lists seven patents which Oracle claims Google has infringed. There is also a further clause which says Google has infringed copyright in the:

code, specifications, documentation and other materials) that is copyrightable subject matter

and that it is not possible for a device manufacturer to create an Android device without infringing Oracle’s copyrights. Oracle is demanding stern penalties including destruction of all infringing copies – I presume this might mean destruction of all Android devices, though as we all know lawyers routinely demand more than they expect to win, as a negotiating position.

But isn’t Java open source? It is; but licensing is not simple, and “open source” does not mean “non-copyright”. You can read the Java open source licensing statements here. I am not a licensing expert; but one of the key issues with Google’s use of Java in Android is that it is not quite Java. Oracle’s complaint says:

Google’s Android competes with Oracle America’s Java as an operating system software platform for cellular telephones and other mobile devices. The Android operating system software “stack” consists of Java applications running on a Java-based object-oriented application framework, and core libraries running on a “Dalvik” virtual machine (VM) that features just-in-time (JIT) compilation.

Note that Oracle says “Java-based”. Binaries compiled for Android will not run on other JVM implementations. I am no expert on open source licensing; but if Google is using Java in ways that fall outside what is covered by the open source license, then that license does not apply.

Despite the above, I have no idea whether Oracle’s case has legal merit. It is interesting though that Oracle is choosing to pursue Google; and I have some sympathy given that Java’s unique feature has always been interoperability and cross-platform, which Android seems to break to some extent.

James Gosling’s post on the subject is relevant:

When Google came to us with their thoughts on cellphones, one of their core principles was making the platform free to handset providers. They had very weak notions of interoperability, which, given our history, we strongly objected to. Android has pretty much played out the way that we feared: there is enough fragmentation among Android handsets to significantly restrict the freedom of software developers.

though he adds:

Don’t interpret any of my comments as support for Oracle’s suit. There are no guiltless parties with white hats in this little drama. This skirmish isn’t much about patents or principles or programming languages. The suit is far more about ego, money and power.

The official approach to Java on devices is Java ME; and Java ME guys like Hinkmond Wong hate Android accordingly:

Heck, forget taking the top 10,000 apps, take the top Android 10 apps and try running all of them on every single Android device out there. Have you learned nothing at all from Java ME technology, Android? Even in our current state in Java ME, we are nowhere as fragmented as the last 5 Android releases in 12 months (1.5, 1.6, 2.0, 2.1 and recently 2.2).

Fair enough; but it is also obvious that Android has revived interest in client-side Java in a way that Sun failed to do despite years of trying. The enemy of client-side Java is not Android, but rather Apple: there’s no sign of Java on iPhone or iPad. Apple’s efforts have killed the notion of Java everywhere, given the importance of Apple’s mobile platform. Java needs Android, which makes this lawsuit a surprising one.

But what does Oracle want? Just the money? Or to force Google into a more interoperable implementation, for the benefit of the wider Java platform? Or to disrupt Android as a favour to Apple?

Anyone’s guess at the moment. I wonder if Google wishes it had acquired Sun when it had the chance?

Note: along with the links above, I like the posts on this subject from Redmonk’s Stephen O’Grady and Mono guy Miguel de Icaza.

Oracle breaks, then mends Eclipse with new Java build

Somewhere in the JVM (Java Virtual Machine) is a company field, identifying the source of the JVM. Following its acquisition of Sun, Oracle reasonably enough changed the field in version 1.6.0_21 to reference Oracle rather than Sun.

Unfortunately some applications use the field to vary some command-line arguments according to which JVM is in use. “If Sun JVM do this, if IBM JVM do that.” Eclipse was one of these, so Oracle’s update caused “crashing and freezing issues” for Windows users. There is more information here.

When the problem was discovered, Oracle issued an update that reverts the change. Hence Ian Skerrett at Eclipse has posted Oracle Demostrates Great Community Support and Fixes Eclipse.

The issue demonstrates that almost any software change can have unintended consequences, especially if the software is an application runtime.

Should Oracle have checked for this before release? Possibly; though it cannot check every build against every application on every platform. Still, everyone has done the right thing here.

Will the JVM now say Sun for ever? I would think for some time to come, bearing in mind that companies may standardise on specific Eclipse builds and stay on them for an extended period.

Adobe LiveCycle and the Apple problem

Earlier this week I attended Adobe’s partner conference in Amsterdam, or at least part of it. The sessions were closed, but I was among the judges for the second day, where partners presented solutions they had created; the ones we judged best will likely be presented at the Max conference in October.

Seeing the showcased solutions gave insight into how and why LiveCycle is being used. LiveCycle is actually a suite of products – the official site lists 14 modules – which are essentially a bunch of server applications to process and generate PDF forms and documents, combined with data services that optimise data delivery and synchronisation with Flash clients, typically built with Flex and running either in-browser or on the desktop using AIR. These two strands got twisted together when Adobe took over Macromedia.

LiveCycle applications are Java applications, and run on top of Java Enterprise Edition application servers such as Oracle’s WebLogic or IBM’s WebSphere. This does mean that support for Microsoft’s .NET platform is weak; Adobe argues that that Microsoft’s platform has its own self-contained stack and development tool (Visual Studio) which makes it not worth supporting, though of course there are ways to integrate using web services and we saw examples of this. Many of the partners whispered to me that they also build SharePoint solutions for their Microsoft platform customers, and that SharePoint 2010 is a big improvement on earlier versions for what they do. Still, Java is the more important platform in this particular area.

Why would you want to base an Enterprise application on PDF? The answer is that many business processes involve forms and workflows, and for these LiveCycle is a strong solution. PDF is widely accepted as a suitable format for publishing and archiving. One thing that cropped up in many of the solutions is digital signatures: the ability to verify that a document was produced at a certain time and date and has not been tampered with plays well with many organisations.

Here’s a quick flavour of some of the solutions we saw. Ajila AG showed an application which handles planning permission in parts of Switzerland; everything is handled using PDF form submissions and email, and apparently a process which used to take 45 days is now accomplished in 3 days. Another Ajila AG solution handles the electronic paperwork for complex financial instruments at the Swiss stock exchange. Ensemble Systems showed an e-invoicing system which includes a portal where both a company and its suppliers can log in to view and track the progress of an invoice. Impuls Systems GmbH used PDF forms combined with Adobe Connect Pro conferencing to create online consultation rooms and guided form completion for clients purchasing health insurance. Aktive Reply built a system to replace printed letterheads for an insurance company with 10,000 agents; not only does the system save paper, but it also synchronises any address changes with a central database. Another Aktive Reply application lets lawyers assemble contracts from a database of fragments, enforcing rules that reduce the chance of errors; we were told that this one replaced a complex and error-prone Word macro.

OK, so why would you not want to use LiveCycle for your forms or document-based workflow or business process management application? Well, these solutions tend to be costly so smaller organisations need not apply; and I did worry on occasion about over-complexity. More important, the whole platform depends on PDF, often making use of smart features like Adobe Reader Extensions and scripting. After all, this is why Adobe added all these abilities to PDF, despite security concerns and the desire some of us have for simple, fast rendering of PDF documents rather than yet another application platform.

PDF is well supported of course, but once you move away from Windows and Mac desktops, it is often not the official Adobe Reader that you use, but some other utility that does not support all these extra features. In many cases it is not just PDF, but Flash/Flex applications which form part of these LiveCycle solutions. Adobe understands the importance of mobile devices and I was told that more effort will be put into Adobe Reader for mobile devices, to broaden its support and extend its features. Reader for Android is also available, as an app in the Android Market.

That’s fair enough, but what about Apple? Curiously (or not) PDF is not well supported on the iPad, though you can read PDF in Safari and in mail attachments. This is not Adobe Reader though; and given that PDF now supports Flash as well as scripting there seems little chance of Adobe getting it onto the App Store. Flash itself is completely absent of course.

Lack of compatibility with Apple devices did not seem to be a big concern among the partners I spoke to at the conference. Many of the solutions are internal or work within controlled environments where client compatibility can be enforced. Nevertheless, I can see this becoming an increasing problem if Apple’s success with iPhone and iPad continues, especially in cases where applications are public-facing. My suggestion to Adobe is that it now needs to work on making LiveCycle work better with plain HTML clients, in order to future-proof its platform to some extent.

Google advances its platform – or should that be advances the Web?

Yesterday Google presented its latest platform innovations at the Google I/O conference in San Francisco. Its strategy is relatively clear: to improve web applications so that you can do everything you need in the browser. The client pieces are HTML 5 – though bear in mind that this is not yet a fixed standard – and especially the Chrome browser, whether installed on a traditional operating system or delivered on a Chrome OS device.

Chrome has always had lightning-fast JavaScript. We’re now seeing other pieces in the Chrome-as-application-platform story, including:

Integrated Adobe Flash

The  Native Client for secure native code, typically coded in C/C++, running in the browser

Announced yesterday, the WebM video and audio format. This includes VP8, acquired with On2 Technologies and now open source, as well as Vorbis audio and the Matroska multimedia container.

The Chrome Web Store, also announced yesterday, which will be an App Store equivalent for web applications.

image

Web Store apps are “installable” which may mean little more than a shortcut in the browser, similar to a bookmark or favourite link. However, there will be a payment infrastructure as well as ratings and user reviews.

Serverless apps. This is another aspect to the Web Store. A Web Store app can be designed to run offline, with all the necessary HTML and JavaScript bundled into the .crx format used by the store. Google calls these Serverless apps, and in many ways the concept is similar to that in Palm’s WebOS – HTML and JavaScript applications that run locally. This is interesting for Chrome OS as it makes it easy to create applications that work offline.

The Google Font API and Directory. This is big news. Most of us stick to the same old web fonts, or use images, or a plug-in like Flash or PDF, for going beyond the standard browser fonts. Using Google’s API, it is easy to include any font in the new directory, with nothing more than a specially crafted CSS link.

The Google Font API hides a lot of complexity behind the scenes. Google’s serving infrastructure takes care of converting the font into a format compatible with any modern browser (including Internet Explorer 6 and up), sends just the styles and weights you select, and the font files and CSS are tuned and optimized for web serving.

On the server side, there is Google App Engine for Business. Google is cooperating with VMware so that you can host Spring applications on its web application platform, App Engine. Spring Roo, a rapid application development tool for Spring, has been integrated with Google Web Toolkit (GWT) to make it easy to build browser-hosted clients for Spring applications. GWT lets you code in Java, but run in JavaScript. Using Spring gives you a choice of where to host your application: on-premise, on App Engine, on the Salesforce.com platform with VMforce, or on another platform such as Amazon EC2.

Spring’s Rod Johnson explains the goals here:

Until the announcement of VMforce and today’s announcement, Java developers lacked a PaaS destination to which they could easily deploy their applications. This was an important gap that threatened to become a danger to the long-term future of Java. I’m delighted that VMware/SpringSource is leading the charge to fill this gap.

Another feature worth highlighting is SQL for App Engine:

SQL database support on App Engine gives enterprise developers access to the full capabilities of a dedicated relational database, without the headache of managing it.

though Google adds that this is a “premium service” which may come at extra cost. According to the roadmap, this is coming in Q3 2010.

While there is a lot to take in, there is a consistent theme: making the web and browser platform more capable, and making desktop applications and on-premise servers less necessary.

Whereas Apple aims to lock us into its devices and App Store, Google’s approach is more open. It is happy to give away stuff like the WebM multimedia project and the Font API in order to improve the Web overall; though of course every time we use the Font API Google can record the traffic on our site and mine that data if it chooses to do so. It is in line with the strategy unveiled at the Mobile World Congress in February: a little bit of everything you do. Google will take its cut of any Web Store sales. What is Web and what is Google is deliberately blurred.

I still think that the forthcoming Chrome OS is an amazing experiment, and the new offline application support announced yesterday makes sense as an alternative to traditional local applications.

A good day for Adobe and Flash, or a bad one? Adobe’s Kevin Lynch demonstrated new HTML 5 capabilities in Dreamweaver, via an add-on pack. As expected, Adobe is becoming a little less Flash-focused in its PR. Google’s emerging platform is a tool opportunity for Adobe. Still, that is a lesser role than establishing Flash as the universal client, a possibility which Apple seems to have killed. Google is supporting Flash, of course, by building it into Chrome, but at the same time things like WebM, Font API, HTML5, and Native Client (shown as the natural client platform for browser-hosted games) undermine the need for Flash.

Apple is a problem for Google too. Will native client ever work on iPhone or iPad? WebM? The big question – who will marginalise whom?

Adobe’s campaign against Apple misses the target

Nothing better demonstrates Adobe’s concern about being locked out of Apple’s mobile platform than a huge advertising campaign attempting, one assumes, to win public support and pressure Apple into yielding ground.

Still, if you are going to run a big PR campaign it helps to be right. But Adobe seems to be arguing that Flash support is essential to an open web, which is incorrect.

We believe that consumers should be able to freely access their favorite content and applications, regardless of what computer they have, what browser they like, or what device suits their needs. No company — no matter how big or how creative — should dictate what you can create, how you create it, or what you can experience on the web. … In the end, we believe the question is really this: Who controls the World Wide Web? And we believe the answer is: nobody — and everybody, but certainly not a single company.

says the open letter from Adobe founders Churck Geschke and John Warnock.

Very good, but this is not an argument in favour of Flash. Flash is not part of HTML, Flash is not a standard, and Flash is not open – the specification for the player is published, but what goes into that specification is controlled solely by Adobe, and its player implementation is not open source. Flash is a proprietary plug-in. Are Geschke and Warnock arguing that all browsers on all devices should allow all plug-ins to be installed – including Silverlight, Java, ActiveX, and anything else you can think of? Or are they arguing that Adobe Flash is a special case? It is certainly a special case for Adobe, but any company will argue in favour of its own stuff.

The full-page advertisement that I’ve seen in various newspapers is not much better. Adobe’s pitch is that Apple is:

taking away your freedom to choose what you create, how you create it, and what you experience on the web

This again is incorrect. Apple has an excellent mobile browser based on WebKit, as also used by Google, Adobe and others. You can do what you want on the Web, but if you use Flash it won’t render on Apple’s mobile devices. All that means is that Apple has chosen not to support Adobe’s plug-in. It is not an issue of freedom.

Personally I don’t like Apple’s approach. I’d prefer it to support the leading plug-ins (not only Flash); I don’t like the appification of the web -  dubbed the splinternet, or splintered web, by some. And I particularly object to Apple’s clause 3.3.1 in its new developer agreement, which blocks apps that are created with cross-platform tools, no matter how well they perform or how good they look. That, it seems to me, is anti-competitive in spirit.

I think Adobe should make more of clause 3.3.1, rather than indulging in special pleading for its plug-in. And if I were Adobe, I wouldn’t be whinging about Flash being blocked. Rather, I’d be highlighting all the great things Flash can do, and all the content you will miss without it. My full-page ad would say, “Mr Jobs, your iPhone is broken”, and extol the merits of Android and other devices that will run Flash.

I’d also be working on the technical arguments, that Flash is unstable, insecure and resource-hungry. Is it Apple’s fault? Is it because of poorly coded SWFs, and if so what is Adobe doing about that? And how will Adobe improve Flash so that it behaves better in future, and not be perceived as the new Vista?

Maybe next time round?image

Java versus C/C++ performance – which is really faster?

Cliff Click of Azul Systems has an excellent post on Java vs C/C++ performance:

Is Java faster than C/C++?  The short answer is: it depends.

He then presents three categories of cases: the first C/C++ beats Java, the second where Java beats C/C++, and the third and longest, where C/C++ proponents claim Java is slower but in reality it is not.

My quick summary: there are few cases where Java (or C#) is so much slower that it matters, save for one big issue which Click mentions early on – start-up time:

Flash games beat Java games mostly because it took 30+sec to load the JVM from disk… and so now the web-game developer community has settled on Flash as the standard (and it still takes 10+sec to load the JVM).

Start-up time makes a big difference to usability, for reasons which I cannot entirely explain. Just for fun, I’ve been running Microsoft Office 95 in a virtual instance of Windows XP recently, and the fact that Word 95 loads in a blink makes it feel much faster than Word 2010, which takes 5-10 seconds on first load, even though the productivity difference must be negligible.

If I had to theorise about this, I’d say it is to do with the way humans learn from experience. We don’t like waiting, and if an application take a while to start then part of our brain tells us to avoid it in future. We override that instinct when it is an app we need to run, but it contributes to a negative impression.

The opposite is also true. If an application starts instantly – I mean to the point where we can use it, not just a splash screen – it contributes to a positive impression and we are more inclined to use it in future.

Incidentally, Click thinks that Java is generally faster than C#, though he adds that he is “not able to give C# a fair treatment” because he does not track it closely.