Ajax for real programmers

Are there lots of people like me who are a bit uncomfortable with the current fashion in web programming for script languages?  Judging by the growth in frameworks for Java, it seems I am not alone.  It may be a bit old fashioned, but I like fairly strong typing, and conformance to OO principles.

I’ve been playing with IT Mill, and I am really quite impressed.  It has the pretty features of Google’s GWT, but with the security of placing most of the application logic firmly and safely on the server side.  Anyone familiar with Swing will immediately feel at home with this solution.  And it’s Open Source…

Is Ajax coming of age, or am I a relic of the past, grateful for the comfort blanket that has just been thrown in my direction?

(The toolkit just got a new name, Vaadin, and a new home – same owner, same nice Apache license…)

May 6, 2009 • Tags: , • Posted in: Uncategorized

3 Responses to “Ajax for real programmers”

  1. John Topley - May 22, 2009

    JavaScript is actually a very powerful programming language that in many ways makes Java look rather dumbed-down. For example, it includes functional programming features such as functions as first-class objects (i.e. you can pass a function to a function) and closures. By contrast, to achieve similar results in Java you end up having to use awkward constructs such as anonymous inner classes. JavaScript also allows prototype-based OO.

    Ruby is a wonderful, dynamic programming language. It’s so flexible that it allows you to practise prototype-based OO or class-based OO, as per Java. In fact, Java isn’t really an Object-Oriented Programming language at all, rather it’s a Class-Oriented Programming language because it doesn’t let you have objects without classes. Ruby does.

    I blogged about Ruby’s elegance and power a while back: http://www.johntopley.com/2009/01/10/the-power-and-beauty-of-ruby/

    Of course, you could have the best of both worlds and use JRuby, which is a Java implementation of Ruby. So you get Ruby’s expressive syntax and power, access to the vast Java platform and the ability to run on your existing JVM infrastructure.

  2. Simon - May 23, 2009

    I can’t agree that Java is not OO, but of course you do raise an interesting question – how do you define OO? There is broad agreement on many of the necessary properties, but no single definition (good summary here for those that are interested). My biggest worry with JavaScript is the amount of client-side code, and the consequent security risk.

    I agree with you about Ruby – it is a nice language (as an old Smalltalk programmer, I could hardly say otherwise – now there’s a real OO language!).

    Maybe the biggest benefit of technologies like those from IT Mill is that they help consolidate skills.

  3. John Topley - May 23, 2009

    I think it’s unlikely that Alan Kay had the cryptic syntax of Java Generics or C++ templates in mind when he coined the term Object-Oriented Programming in the 1970s!

    I agree, Smalltalk is a great language. Obviously you do program with objects in Java, but I’d rather OO newbies cut their teeth on a purer OO language such as Smalltalk rather than Java. As you probably know, a lot of the niceties of modern Java IDEs such as class browsers and refactoring tools came from the Smalltalk world.

    I think that client-side JavaScript is fine as long as you accept that nothing from the client can be trusted and must always be validated on the server too. Don’t forget that there’s server-side JavaScript as well and I know that Google are doing some interesting things with this. Steve Yegge blogged about an internal port of Ruby on Rails using JavaScript that runs on Mozilla’s Rhino: http://steve-yegge.blogspot.com/2007/06/rhino-on-rails.html

    I think these are interesting times because the boundaries are blurring. Sun are now embracing the running of non-Java languages on the JVM, just as Microsoft have with their .NET CLR. It feels like a real freedom of choice is opening up and progressive organisations are recognising that one language doesn’t necessarily fit all and that they can use the best technologies for the job. Those technologies might be from very different communities but they can all run on a common VM.

Leave a Reply