Flash Killers – Java FX, Microsoft Silverlight, Groovy and Xoetrope

It wasn’t meant to be this way, but I spent most of the IJTC talking to people about Flash Killers. Technologies that look good, work in any browser and are powerful enough to deliver enterprise applications with no installation.

  • Dejan Bosanac, was speaking on Scripting in the JVM. He was kind enough to give me a copy of his book which (for the first time) has got me seriously considering Groovy. Maybe I’m about 3 years behind everybody else on this , but I get there in the end! Dejan’s book (Scripting in Java: Languages, Frameworks, and Patterns) is available on Safari
  • Guillaume Laforge talking on Groovy completed what Dejan had begun. Ironically, I didn’t see the talk , but it was the reaction of the people that did that got me interested.
  • Xoetrope (an Irish Open Source company sponsoring the conference) was demonstrating the XUI framework. Initially I thought that the world did not need another Java presentation framework. What changed my mind is that this has two edges – the first is the IDE – a plugin for either Eclipse or Netbeans , similar in drag and drop style to Visual Basic but generating clean XML Files. The second is that you can deploy on the Desktop (as either SWT or AWT/Swing), or as JSP / HTML. You can download XUI (and IDE plugins) from sourceforge.
  • Richard Bair from Sun were talking about Swing and Java FX (more below). Sun is threating to deliver on the intial promise of Java Applets (Write once, deploy anywhere).
  • Strange for a Java event, but Microsoft was giving out disks containing Silverlight – a time limited Visual Studio Professional with Expression Studio (inc Web / Design / Blend / Media).

(I’m still too traumatised by James Strachan and his Corba coloured underpants to talk about Apache Camel. And that was before Mark Proctor and Emmanuel Bernard starting talking about the size of their …. audiences 🙂

None of the above technologies really solve what I’m looking for; Ideally we’d have a version of Flash (that almost everybody has installed / designers know how to make look good) with Java embedded in it (we need the processing power of the client). Think modern version of Java Applets. Realistically we’ll have to go for 2nd best as such a thing doesn’t exist.

More on the Java FX Stuff: James Weaver of the JavaFX blog was good enough to talk through these requirements. I came across James blog after reading his book (cover below). While the book covers Java FX and FX alone (but does it well), I’ve been promised a blogpost on deploying a JavaFX Script via Webstart. With that, and if Sun makes good their promises on consumer usability in the next version of Java, then maybe we have a Flash Killer. While Sun has dropped the ball in the past (note that it was Microsoft and not Sun handing out CD’s) the response times for the FX team for a casual query about Webstart (which is not their area) gives me some hope.
JavaFx Book Cover

Advertisements

The last Rails For All mail you will ever get, maybe

Most websites do one thing : grab information from the user, and store it in a database.

For these simple websites , using Enterprise Java is like using a sledgehammer to crack a walnut – you’re much better off using a solution like Ruby on Rails. Off course, once you go off the usual path (e.g. to implement complex business rules and workflow) things become a lot more difficult. That’s how we make a living – a post for another day.

So, if you’re a business person looking for a web site ‘that has to be done by the end of the week‘ or a technologist looking to solve the pain of ‘I can’t believe building web sites is still so difficult‘, then it’s worth checking out Ruby on Rails.

Rails for all inon

A good place to start is Rails for All, which has recently moved home to Google Groups, and. The official announcement is below.

Rails For All – No more RFA email Hello everybody, This may be the last email you will get from Rails For All. You loved our email updates you say? Well, we have created two Google groups for your reading pleasure – one for discussions and one for announcements. Good stuff. Tell all your friends.

See you there!

Sincerely,

Robert Dempsey

Founder Rails For All, Inc.

—————

Promoting Ruby on Rails to the developer and business communities

More posts on Ruby

Dear Bruce Eckel : Hybrid Java, Google Web Toolkit and Adobe Flex

Dear Bruce,

First up, thanks for the book. Yes I’m saying thank-you about 8 years too late. ‘Thinking in Java‘ is what got me going in the language and in my mind is one of the best Java books written (sorry Tim). Giving it away free only cemented your reputation as the Bono of the Java world. OK, Bono without the Guitar, the Stetson and with a couple of overloaded constructors thrown in, but a man of stature nonetheless.

Thinking in Java Front Cover

Secondly, I’ll forgive your flirtations with Python, on the basis that I’ve been having an affair myself with JRuby. I now understand the pain that you’ve been having at home, the endless repetitive arguments to get simple things done, and the temptation of a newer, younger, more flexible model.

So , I think you’re onto something here in your blogpost. I can feel the pain, the need to deliver Rich clients to users over the web. I think that Ruby / Google Web Toolkit / Struts 2 / Name your web toolkit has further to go than you may think , but eventually these ‘heroic efforts‘ (nice quote) will run out of steam. On the basis of your recommendation alone I’m willing to look at Adobe Flex, but I’m not sure if this is going to solve all the problems.

Now , a lot of us Java guys don’t like change (and as if you needed proof, just look at the comments on this O’Reilly blogpost on the Google API’s). All the same , we have a problem that gets worse every passing year. 6 Years ago we could have been sure that 90% of web sites were running Internet Explorer 4. Now we’ve got IE, Firefox, Safari (in all their different versions) as well as an explosion of mobile devices. The Windows Vista launch is only going to fragment things further with yet another platform to support.

No one web solution is going to display the same in all of these browsers. We’re not going to get a single solution from Microsoft / Sun / Adobe that everybody from developer to my Granny is going to install. So we’re going to have to take the ‘least bad’ route – something that looks great, but degrades gracefully to standard HTML on less capable devices. Excuse my ignorance, but I don’t know (yet) if Flex does this.

Yes Hybridizing open source Java is the starting point for the solution. Unfortunately we’ve a long way to go yet, and Flex is perhaps only inspiration along the way.

Yours sincerely

Paul

Build your Web2 site quicker – Free Ruby Book

Ruby has a lot of buzz around it. The idiots version of what Ruby is:

  • It’s a programming language (like Java) that allows you to tell computers what to do.
  • Used with the Rails framework , it allows you to churn out your latest Web 2 site faster than you can pitch it to your friendly VC.

InfoQ has a good link to a Free Ruby Book that has just become available. The author of the book (Jeremy) blogs here.

Free Ruby Book Link

We have two main reasons why we’re interested in Ruby:

  1. Java is great for scalable , Enterprise systems used by thousands of people. Sometimes we just want something quick and dirty to try out an idea.
  2. If your idea proves successful , you want a migration path (i.e. not to have to throw away all your original work). Ruby gives you this as the way it is organised means it is less likely to fall into a heap (Object Orientated)
  3. So Why not PHP (the way this blog, using wordpress, is built)?  Ruby has a companion tool called JRuby. This means that you can run Ruby code anywhere you can use Java. Anything that Java can do , Ruby can do as well.

We’re also going down the free book route on Enterprise Web 2.0. Only it’s taking us a lot longer to get there. Currently the problem is a techie version of writers block.

Java and those pesky Google APIs

Recently one or two people disagreed with what I had to say about the impact that the Google, Amazon (and other) API’s will have on Java. Considering the ratio of positive to negative comments (about 3 for and 30 violently against), I obviously need to express myself in a clearer way. The link to the original post is at the end of this article, read on before you consider flaming me.

Amazon Web Services Logo

So , deep breath , here goes.

Compare the the way you develop now , with the way you built software 10 years ago. Do you remember having to manage your own memory? Or the pain of trying to deploy your software on different machines without a JVM? Or the hassle of trying to write distributed software using Corba? Or using a text editor instead of the fine IDE’s (Eclipse, Netbeans or JDeveloper – take your choice) that we have today? Would you consider building your software without a tool like Ant or Maven?

(Shudder). Things have moved on ,and I am very glad they have. Likewise, the way we develop 10 years into the future will be very different. I don’t know what the future will look like, but here’s a simple guess.

The biggest trend today is the move from software running on your computer , to software being delivered over the web. I’m not talking about the buzzwords being thrown about regarding ‘Service Orientated Architecture’ or ‘Enterprise Service Bus’. I’m talking about simple API’s that are available for use over the web today. Like the API’s and products from Google – including their Documents and Spreadsheets, and their Authentication service.

‘Everything should be made as simple as possible, but not one bit simpler’ – Albert Einstein

‘You Ain’t Gonna Need it’ – Anon, XP Mantra

As a good Agile Developer you’d probably agree with these quotes. But what if the most simple way of doing things was not to develop in Java at all? Most people don’t build their own operating system – they use Linux, Windows or OS X instead. Most people don’t write their own Java Server – they use Tomcat, JBoss or your server of choice. The pattern is the same. A small, dedicated core of developers builds the product, and the rest of us say ‘thank you very much’ and use it to get things done.

This range of ‘off the shelf’ solutions is increasing all the time , even before the online services arrived on the scene. As a Java developer , you’ve said ‘thank you’ , downloaded the latest version and integrated it into your solution. The time you save means you deliver other cool features instead. Java is very good at this ‘download and integrate’ process – not only is it a key benefit of Object Orientated Software, but Java has the widest range of solutions available (if you don’t believe me , just check out Sourceforge).

Java can also let us build our solutions (either partly or fully) around the online API’s. Java has great networking and XML handling ability already. In time this will become as normal as the idea of using a JVM. Great – we use these API’s pretty much like we do libraries today, and we can continue developing pretty much as before, right?

Wrong.

Remember, what is the most simple way of doing things? What if the most simple way of doing things was not to use Java but to use a more simple language (like Ruby or PHP) instead? Until now there were a couple of advantages that Java had over these ‘simple’ (and that’s a compliment) languages. When using online API’s these advantages disappear, or worse, become a liability.

  • Scalability and Robustness. Enterprise Java is massively scalable (it’s one of the reasons for it’s complexity). But can even you outscale Google?
  • Security. Enterprises haven’t (yet) learned to trust the security of online applications. This trust will be hard earned over time. But already you can make the argument that you data is safer with Google / Amazon / other service provider than on your average virus-ridden home PC.
  • Language Ties. To use the Java libraries you needed a JVM somewhere in your solution. Once you had a JVM , you might as well write your own solution in Java. But when the product you are extending is hosted elsewhere, you are free to code in the (most simple) language of your choice.
  • Always on. As long as you have a connection to the web, your programs can use the API’s. Scripting languages like Ruby and Python can claim to be even more portable. Not only can they run natively in most environments, they can also be deployed via a JVM if that is your choice (under the guise of JRuby and Jython)
  • Features. Need a feature that you don’t have in your scripting language? Just borrow it from Java by running in the JVM. How can Java win a ‘features arms race’ against that?

So do we face a form of developer apartheid, where a ‘hard core’ of Java Experts develop web API’s that the rest of us use via scripts? Let me know what you think. Like the original blogpost said, it may not be the end of Java, but perhaps the end of Java as we know it.

Dear Open Source Santa,

Dear Open Source Santa,

Now that you have Java in your open source toy bag, can I have Duck Typing please ? It shouldn’t be too hard to do, since the elves in Ruby-Wonder-Land have been making toys with Duck Typing for years. I’ve been a good boy all year and promise to play nicely with the .Net kids next door.

You don’t know what Duck Typing is? Sorry, I forgot that you’re more than 1000 years old. Little Jamie next door got Ruby last year and he says that ‘if it looks like a duck, and walks like a duck , then it is a duck’. He says making the computer do more work makes it a lot easier to write programs.

My Teacher says not to be greedy, and that you’re very busy making Toy Trains. She says just ask for getters and setters. You know, the boring code like ‘getSomeValue()’ and setSomeValue(). She says the Apache imps have been very good with Dynaforms but that writing a Java web application is still just too slow.

Rudolph will tell you that writing get(“someValue”) is about as cool as having a bright red nose. He would also want to put ‘someValue’ in one place only (the web page). Having to write config files and javabeans feels too much like homework.

Santa, I know there are other children that need changes to the core Java code more than I do, so maybe you know of an open source project that already has this.

Paul

P.S. :I still want to keep compile time type checking to make sure I don’t make any mistakes.