Category Archives: java

Ubuntu Hardy Heron – very cool

I had a spare desktop after upgrading my Vista box – at least, I popped my old motherboard in a spare case and added a hard drive. It seemed a good opportunity to try Ubuntu Hardy Heron. Ubuntu has a policy of  upgrading its Linux distribution every six months, in April and October, and Hardy Heron is this year’s April release. I tried a late beta, since final release is not until the end of the month. Burned a CD, stuck it in the drive, and installed it.

The install went smoothly. The main hassle with Ubuntu, and most other Linux distros, is that there are a few add-ons which you can’t easily do without, but which are excluded from the main release either for legal reasons, or because they are proprietary. For example, I tried to play a DVD, but the Totem movie player said it did not have the right GStreamer plugin. It would be nice if Ubuntu had a one-click install, something like “OK, I give in, give me libdvdcss2, give me Flash, give me Java, and I’ll take the consequences.” I fiddled around with Medibuntu, then realised you can get something close to a one-click install if you add ubuntu-restricted-extras to the repository. It didn’t actually take too long before I was up and running: DVDs played, YouTube worked, Java worked. I also added the NVIDIA proprietary driver which is needed to enable the Compiz Fusion 3D desktop. That one was easy: Ubuntu prompted me to do it.

The “what’s new” list includes Linux kernel 2.6.24, Firefox 3 (although still in beta), and better virtualization support with KVM. Gnome is updated to 2.22. Think incremental rather than dramatic changes.

Subjectively, Ubuntu performs better on the same hardware than Vista. There is just less waiting around. I had some fun connecting to my Vista desktop using the Terminal Server client. Then I pressed Windows-Tab to cycle between applications (note the cool reflections):

The key factor for Ubuntu is not features, but usability. In this respect, it seems to get better every time I look.

Technorati tags: , , ,

JBuilder 2008 and Vista’s Program Compatibility Assistant

One of Vista’s annoyances is this dialog, which you may see shortly after installing an application:

As you can see, I got this after installing CodeGear’s new JBuilder. The reason it annoys me is that it doesn’t tell you what “compatibility settings” it has applied. In this case, even if you go to JBuilder.exe in Explorer and view its properties, you will find all the compatibility options unchecked. So what has it done?

Of course I clicked “What settings are applied”. Here’s what it says:

As you can see, this still does not tell you what settings are applied. By the way, Group Policy enables you to disable the Program Compatibility Assistant completely, but does not show the settings for individual applications.

I ran the registry editor, and found this entry:

It looks like the Persisted key tells Vista which applications have already had settings applied, while the Layers key tells Vista what settings to apply. ELEVATECREATEPROCESS lets the application create child processes which require admin rights, though they still raise a UAC prompt.

I also found this Microsoft article which does a good job of explaining how the Compatibility Assistant works. It appears that JBuilder 2008 tries to run something which requires administrator permissions, but does not use the  correct Vista technique for doing so. I soon found out what it is:

It’s running regedit, and exporting some keys that appear to relate to Mozilla’s Gecko Runtime project, for embedding a browser in an application. Unfortunately it does this (twice) every time it runs, which is unlikely to be necessary. You would have thought there would be a better way to use these registry entries, than exporting a temporary file.

Conclusions? None really; I just wanted to know what this annoying wizard does. A couple of observations though. First, it’s careless of CodeGear to let JBuilder 2008 out like this. It just looks bad, to have your app identified as an old one that needs compatibility help.

Second, if you read Microsoft’s article you’ll notice that among other things Vista “instruments” the CreateProcess API call in order to make this work. There must be a performance impact. I guess Microsoft will say it is a small one; but I guess it also makes its little contribution to Vista’s overall performance issues.

Introspective QCon asks hard questions about Java, SOA, REST

Last week I attended QCon in London and have been mulling over the experience. Two themes stood out for me, though bear in mind that having recently attended Adobe and Microsoft events, I avoided the sessions which related to those companies and focused on Java and more general issues.

The first was the extent to which QCon accepted that mistakes made in the early years of J2EE have been costly for the industry. In this respect the key speech was from Spring inventor Rod Johnson, whose session was called The Cathedral, The Bazaar and the Commissar, “an opinionated view of the story of Enterprise Java innovation.” Johnson stated that the rush to standardize everything in the Java platform had done almost as much harm as good (though he did say it was a “net positive”). He identified numerous problems in the standardization process. In particular:

  • The expert groups are dominated by large vendors whose interests are not aligned with those of developers. Johnson gave the example of JDO. “What happened was, this was intensely political. Database vendors hated JDO. Application server vendors hated JDO. Because in each case it wasn’t good for their business. And the result was that JDO was indeed taken out and shot.”  Johnson also noted that J2EE serves to protect the existing licensees:

“It pretty much ensures that there will be no competition, because who at this point would want to implement the whole enchilada of J2EE?”

  • The JCP has a history of ignoring prior art, which means on occasion it comes up with specifications that duplicate the functionality of existing products, or which are inferior to what is already available. In consequence good technology that was outside the JCP was lost. He cited O/R mapping, persistence and logging as examples. Here’s Johnson on Toplink:

“Hibernate is the de-facto standard for O/R mapping today. It’s a pretty good product. How many things does it do that TopLink didn’t do in 1998? The answer is not many. There’s probably just as many things that TopLink did in 1998 that Hibernate doesn’t do now. Toplink wasn’t as robust back in those days. But … what we’ve done is somehow managed to kill all innovation for ten years in O/R mapping, while in the meantime Microsoft has both figured out that O/R mapping is interesting and with new technologies like LINQ they’ve actually started to push the envelope. They shouldn’t be relevant in this space because there was such a lead in terms of Java technologies.”

  • The JCP standardized specifications that did not work, in particular Entity Java Beans. The industry accepted them because there was an obsession with standards. “There was a complete transformation where non-standard technologies could no longer compete and competition was no longer on merit.”

Johnson asked what seems to me to be a key question: what should be standardized? He said that it is silly to try both to innovate and to standardize at the same time, because the committee will get it wrong. You should standardize in areas that are well known, understood, and proven in the market.

Despite appearances, Johnson is not an enemy of the JCP. He spoke warmly of the current chairman, Patrick Curran, who is trying to reform the organization; and feels that real progress is being made. Curran was also at QCon seeking opinions on the JCP and its future.

Johnson also feels that Java has moved on. “The Java world is no longer a one-party state,” he said.

What I found interesting was that everyone at QCon seemed to agree with what Johnson said. Even Curran did not try to dispute it. In the closing panel, Martin Fowler from Thoughtworks introduced Johnson as “the man who single-handedly destroyed EJB”, and was applauded.

I suspect there is a Microsoft factor in all this. In the early days of Java, there was huge fear that Microsoft would corrupt Java and make it a Windows-only technology. Standards would prevent this happening; hence the standards religion that Johnson claims was not thought through.

There is an interesting underlying issue here, which the extent to which our industry meekly follows the lead of influential gurus and big vendors in the solutions which it implements.

That brings me to the second major theme which I noticed at QCon: the rise of REST. Despite sincere attempts at balance, there was an unmistakable tendency to promote REST at the expense of other stuff including WSDL and SOA. In many ways this makes sense to me, but it would be rash to assume that this year’s fashion is immune from the issues that now beset fashions from previous years. One delegate asked what stuck me an an excellent question in the closing session:

“What if you came along last year and saw the rise of SOA, and perhaps went off and did a whole load of SOA, and came back this year and found, SOA is on its way out, I should have done loads of REST stuff – how are we supposed to recognize which are the good horses to back?”

It is this kind of fear that leads many senior IT folk to be conservative in their technology and vendor choices.

Technorati tags: , , , , , , ,

Mono on the iPhone

Unlocked iPhone, of course. Miguel de Icaza has the details and some video links.

Flash, Silverlight, Mono, Java: surely Jobs won’t keep all these runtimes officially forbidden for ever? It strikes me that Flash has the best chance of getting there, simply because without it the Web is a little bit broken for iPhone users. It’s an influential device and its runtime support (or lack thereof) will be a factor in web development trends.

Technorati tags: , , , , ,

Erich Gamma on Eclipse and Jazz

Erich Gamma spoke at Qcon London on the subject of “How Eclipse changed my views on software development.” Or did he? This was a somewhat schizophrenic talk; in part an articulation of general development principles, and in part a description of how Eclipse is developed. Gamma spelt out the Eclipse philosophy, the starting point being that everything is a a plug-in; that APIs matter a lot and its better to get a small API right rather than get it wrong and have to support it for ever.

He then talked about iteration, a key tenet of agile development. He showed a great slide which charted the progress of some projects, from “all the time in the world” at the beginning, to “say goodbye to your loved ones” at the end, followed by total exhaustion after the thing is shipped. Iterative development with continuous builds and sign-offs every 6 weeks is less stressful and more productive.

It’s a great point, but does this work in every instance? What if you have a game to ship for the Christmas market?

He also talked about the benefits of open source development: transparency between developers and customers, critical mass of community activity, frequent feedback, and so on. Nothing new here; but perhaps this simply demonstrates the extent to which the merits of the open source model have become accepted.

Gamma then focused more sharply on Eclipse. He says there is a major new release every year, and they don’t want to ship in the summer or near Christmas, so they ship in June.

He described how the Eclipse project manages its large international team. It comes down to components: developers are divided into teams on specific sites, and each team manages one or more components, and has its own process for planning, building and testing. A weekly integration build prevents incompatibilities between components from getting out of control.

Towards the end of his session, Gamma gives us a tour of Jazz, IBM’s open source but commercial project for collaborative software development. Interesting, but I’m not sure that this product pitch belonged in a talk that was billed as something more general.

Overall: good insight into how Eclipse comes together, but not too exciting. I don’t envy these guys who face heightened expectations because of significant contributions they have delivered in the past. Nobody can change the world daily.

Technorati tags: , , , ,

Adobe AIR now available; not just consumer fluff

Adobe has released AIR and you can download the runtime and SDK now, as well as FlexBuilder 3, the official IDE for AIR. Just to remind you, AIR is a way of running Flash applications on the desktop, supplemented by SQLite, a fast local database manager.

Among the most interesting case studies I’ve seen is from LMG, which runs loyalty schemes including the Nectar card and Air Miles. The big deal for the retailers is that using your loyalty card lets them identify who is buying what, providing mountains of data which can be mined for trends and the like. I do mean mountains. Nectar is used by Sainsburys. Between 25 and 40 million “basket items” are added to the database each day, and the database holds 2 years of data.

LMG’s Self-serve is an app in development which enables Sainsburys and its suppliers to analyze this data; it could potentially be used by other retailers too. “The application answers questions like how’s my brand performing, who’s buying my brand, what else are they buying,” says Garth Ralston, LMG’s Business Intelligence Development Manager.

Self-Serve is built with AIR and Flex. “Excel spreadsheets, which some of our competitors use, and the pie charts than you can create within them, are so 1990’s”, says Ralston. “We’re looking for a little bit more of the Wow factor.”

A couple of things particularly interested me. One is that SQLite is critical for the app, which works by downloading large chunks of data and manipulating it on the client. This means that Self-Serve would not work as a browser application, unless possibly with Google Gears, which also uses SQLLite. Another is the importance of offline working. “The ability to have a user run the app, run a report, download the data to their system, take the laptop on the train and continue to work is an absolute business requirement”, says Ralston.

James Governor, Redmonk analyst, told the press that BMC will be using AIR as a front-end to integrate its mainframe management offerings, and SAP will be using it. “Frankly, I think this will be the front-end for all SAP business applications,” he said. In other words, AIR is not just consumer fluff.

Governor is just back from Sun, as I am, and while I was there I picked up some anxiety at the way Flash and now AIR are doing what Java was intended to do – provide a rich cross-platform client. Has Adobe stolen Sun’s market? “Sun is quite capable of stealing its own market”, he said. “Java just hasn’t delivered the kind of rich desktop experiences that we would expect and hope.” That said, note that FlexBuilder is a Java application, Adobe’s server-side LiveCycle data services are Java, and Adobe’s ColdFusion runs on Java, so there are pros and cons here for Sun’s technology.

Actually, I suspect you could build Self-Serve in Java without much difficulty. The big win for AIR is that it’s home territory for multitudes of Flash designers. This is as much about designer and developer communities as it is about technology. The same applies to Microsoft’s Silverlight, which is ideal for Visual Studio developers to whom Flash is foreign.

I still have reservations about AIR, though there is also much to like. It’s early days of course; I’m looking forward to trying it for real. I also love the way these new initiatives are making us rethink the design of essential applications that have remained essentially unchanged for years.

Sun reflections: open source but not open development?

I’m at the airport following two days of Sun’s Global Media Summit. I’ll be writing up various pieces on this, but in the meantime here are some quick reflections.

In the first dot com boom Sun could do no wrong; its servers were lapped up by every company with an internet presence. In the ensuing years it failed to sustain its momentum and began posting losses. It created Java, which transformed enterprise computing, but somehow others (IBM,Oracle,BEA) seemed to profit from Java more than Sun itself.

Sun has recovered. We were told repeatedly that it has posted profits for several consecutive quarters; its margins are good and its focus is now on growth. It has bold plans for its Solaris operating system. It wants to transform Java into something that will rival Flash and Silverlight as well as doing valuable but dull work on application servers. It still believes in thin clients. It can supply eco-friendly datacenters that offer money savings as well as a reduced carbon footprint.

Above all, Sun is engaged in a fascinating experiment around open source. Most of its software is both free and open source, including of course its big recent acquisition, MySQL. Sun is a company with 4,000 more-or-less unfettered bloggers, talks a lot about community, and wants to be considered just as much an open source company as, say, Red Hat or indeed MySQL.

Has Sun figured out how to do open source and remain profitable? It says it has; though part of its argument is that even free software users need hardware. And if there was one thing I learned this week it is the extent to which Sun is a hardware company. Another journalist said that the one word which sums up Sun is “Datacenter.” We heard a lot about the “Niagara” 64-thread processor; the “Thumper” storage server; and the “Blackbox” datacenter-in-a-container; and we were given a tour of one of Sun’s own datacenters in Santa Clara.

Nevertheless, Sun is serious about open source, though it is early days and the company has not worked out all the implications. Some feel that Sun wants to retain a degree of control that makes Linux-like freedom and diversity impossible. Here’s Ben Rockwood, an external member of the governing board of Open Solaris:

…we have open source but we don’t have open development. Sun has done an admirable job with releasing code, but Sun’s track history in the arena of open development efforts with the free software community has been abysmal. Many engineers inside of Sun “get it” (look at IPS, or almost anything Dr. Stephen Hahn is involved in, just beautiful) but somewhere in that middle-management there is a disconnect.

If Simon Phipps and others like him have their way the community will be “rebooted” from what most of us envisioned, an open development effort in which Nevada [Solaris 11] is developed as a community effort, to a glorified support infrastructure in which the “community” is really just a bunch of bi-standers with no real involvement. The later case is apparently closer to the MySQL model, which I refer to as “glass house development”, that is, you can look in at whats going on but you’re not part of the action.

These tensions and its whole open source experiment will make Sun a fascinating company to watch.

Sun is also serious about eco-friendly computing. In the context of global warming, this is smart business as well as a compelling argument for concepts like thin clients (Sun Ray) and more efficient datacenters.

Conclusions? None yet. This is a company in transition. That said, I’ve come away thinking that its lean years have left it as well prepared as anyone for the coming economic uncertainty.

Adobe: friend or enemy of open source, open standards?

I’m sitting in a session at Adobe Max Europe listening to Senior Product Manager Laurel Reitman talking about what a great open platform Adobe is creating. She refers to the open sourcing of the Flex SDK; the open bug database for Flex; the ISO standardization programme for PDF; the donation of source code to Tamarin, the Mozilla Foundation ECMAScript 4.0 runtime project, and the use of open source projects such as SQLite and Webkit within AIR, the Adobe Integrated Runtime which lets you run Flash applications on the desktop, and the fact that AIR will run in due course on Linux, though the initial release will be Mac and Windows only.

So is Adobe the friend of open source and open standards? It’s not so simple. Adobe is more successful than any other company in promoting proprietary standards on the Internet. It ceased development of the open SVG standard for vector graphics, in favour of the proprietary Flash SWF. Adobe’s efforts may well stymie the efforts of John Resig and others at Mozilla to foster open source equivalents to Flash and AIR. View the slides of his recent talk, which include video support integrated into the browser, a canvas for 3D drawing, HTML applications which run from the desktop without browser furniture, and web applications which work offline. Why is there not more excitement about these developments? Simply, because Adobe is there first with its proprietary solutions.

Adobe is arguably more a consumer than a contributor with respect to open source. It is using the open-source Eclipse for Flexbuilder and Thermo, but as far as I can tell not doing much with existing open source projects within Eclipse, preferring to provide its own implementations for things like graphics and visual application development. It is using SQLite and Webkit, and will no doubt feedback bugs and improvements to these projects, but they would flourish with or without Adobe’s input. Tamarin is perhaps its biggest open-source contribution, but read the FAQ: Adobe is contributing source code, but not quite open-sourcing its ActionScript virtual machine. The Flash Player itself remains closed-source, as do its binary compilers.

Like other big internet players, Adobe is treading a fine line. It wants the world to accept its runtimes and formats as standards, while preserving its commercial advantage in controlling them.

My prediction: if Adobe succeeds in its platform ambitions, the company will come under pressure to cede more of its control over those platform standards to the wider community, just as Sun has experienced with Java.

The problem of old Java runtimes

The August PC Pro arrived this morning, and I enjoyed Steve Cassidy’s rant (page 174) on old versions of Java that typically litter PCs:

I’ve made it my habit to go round all the LAN’s I visit removing all older versions of Java from the machines, because the Java updater doesn’t remove them automatically.

It reminded me that I’d intended to post about this dialog, encountered when installing Accurev for a short review:

The decision here is whether to let AccuRev install its own version of the JRE (Java Runtime Environment), or to use one you already have, in which case you have to identify it. It’s a tough decision. If you follow the recommendation to install a private version, you end up with multiple different versions of Java which will likely never get updated except by the application vendor, if indeed you choose to upgrade. I understand why vendors do this: it simplifies testing and installation, and gives apps a predictable platform on which to run.

Unfortunately the downside is substantial too. In the AccuRev case it was slightly unfortunate, since the supplied JRE was incompatible with Vista and broke Aero graphics. A more painful example was when the JRE installed with APC’s PowerChute utility failed because of an expired cryptographic certificate; the consequences were extreme, and in many cases affected systems would no longer boot. See here for the gory details.

I prefer the way Microsoft handles the .NET runtime, where more than one version can be installed, but they are system files for which Microsoft takes responsibility through Windows Update. Sun installs an updater with its JRE that works for web browsers and other applications that use a shared JRE, but there are still many apps like AccuRev that install private versions.

Technorati tags: , , ,

Eclipse, WebSphere winners in latest Java survey

BZ Research has released its latest survey of Java tools. Let’s start with the caveats:

  • The survey is based only on subscribers to SD Times.
  • Out of 19,623 subscribers invited to take part, only 758 (3.9%) completed the questionnaire.

I’m not surprised: I get bombarded with requests to take part in surveys, and rarely do so. Even so the results are interesting, and the year-on-year comparisons may be indicative of trends.

On to the results (note that percentages are non-exclusive so sum to more than 100):

  • Eclipse increased its usage slightly to 69.6%; NetBeans climbed to 2nd place with 23.3% (up from 17.9%).
  • Oracle’s JDeveloper is up from 15% to 19%.
  • IBM RAD has a decent showing, up from 10.8% to 19.5%, not far behind its WSAD at 22.1%.

The survey also covers app servers. Here, all the shares are down, implying more diverse usage than last year. WebSphere is first with 36.9%, then JBoss with 32 %, then BEA WebLogic at 23.7%. Oracle and Sun are 4th and 5th.

Overall, nothing dramatic to report, though the gain for NetBeans shows that Sun’s investment in this IDE is having some success.

CodeGear’s JBuilder doesn’t feature in the top 5, nor does the excellent IntelliJ IDEA.