May 28 2007

Evolutionary Java – General Session

Evolutionary Java was a general session held at noon on the first day of JavaOne 2007. This general session delved into some proposed features for Java SE 7. Some proposed features for Java SE 7 include modularization which will introduce the concept of super package, new byte code and careful evolution of the Java language, and better support for multiple and dynamic languages in the JVM.

During this session there where more demos including one of JRuby on Rails running a standard Rails application, Mefisto. Tor Norbye gave a demo of the new JRuby/Rails support in a beta version of NetBeans with code completion, code highlighting, and wizards for creating new projects. There was a great demo of GL Studio for Java. Basically the demo mashed up Google Earth-like earth simulation provided by NASA Ames and DiSTI 3D models of a realistic F-16 jet fighter. One of the best demo was Iris, a Flickr mashup with some great eye candy.

There was an additional demo and information on JavaFX Script (JFX). JavaFX Script is an object-oriented programming language with a declarative syntax. Think of JFX as a mini-DSL for effects, animations, and rollovers for the JVM. JFX is a programming language especially designed for effects and animations. It is interesting to note that most of the demos of JFX are ports of Flash applications. A common questions amongst those present was, why introduce another language? Why not just a Java-based library?

Technorati Tags: , , , , ,


May 28 2007

JRuby on Rails – Agility for the Enterprise

Charles Nutter and Thomas Enebo, Sun employees and key contributors to the JRuby project, gave the typical introduction into the Ruby programming language, JRuby implementation, and JRuby on Rails. Ruby is a pure Object-Oriented programming language with plenty syntactic sugar for arrays, maps, regular expressions, anonymous blocks, duck typing, and meta-programming. JRuby is a first class citizen in the JVM.

A common theme by the scripting folks, is their common dislike for regular expression in Java and how the leverage the libraries already available in Java. JRuby, in short combines the libraries and power of Java with the syntax and expressiveness of Ruby.

Charles stated that the benefits of JRuby over Ruby include better scaling, will soon be faster, native unicode support, Java libraries, easy adoption in the enterprise environment and existing applications. The benefits of JRuby over Java include Ruby language features and Ruby applications like Rails, Rake, Rave, and RSpec.

Charles Nutter, the lead on JRuby did state the the current focus is ‘compatibility over performance.’ By this, his focus is for JRuby to be equivalent to the C implementation of Ruby 1.8. Ruby does not have an official language specification, the C implementation is as close as you get to a language spec. Charles Nutter has stated that the lack of a official specification as a pain point in the development in JRuby.

There are some JRuby extras on RubyForge, include a Web Application Resource plugin recently renamed to Goldspike. Originally named Rails Intregation, the Goldspike plugin allows you to create a WAR file for a JRuby on Rails project which can be deployed on Tomcat, Jetty, or any other Servlet container. Other interesting projects include ActiveRecord-JDBC and a Java port of RMagick, the popular image package used in Rails applications.

The speakers also mentioned on the precepts and philosophy behind Rails such as Convention over Configuration, Don’t Repeat Yourself (DRY), and agile development. The typical quote around the JRuby on Rails peeps is that there is “less Rails code than Java application configuration.”

There was a question from an audience member about how JRails compares with Grails. The JRuby folks feel that Ruby on Rails currently has more books, more focus, and more developers. Grails was heavily inspired from Rails, and both projects have borrowed ideas from each other. I personally strongly recommend either Grails, and JRuby on Rails over some of the other available web application frameworks.

Technorati Tags: , , , , , , , ,


May 28 2007

JavaOne 2007: Tuesday General Session

John Gage, Sun co-founder and Chief Researcher, kicked off JavaOne 2007 by saying that there were 81-hours until the end of JavaOne. He recommended that we all take the time and meet the fellow developers and engineers sitting to each other at each session. Engineers, as a breed, tend to be introverts but John reminded us to not be shy. He recommended that you forget that you are Swedish, forget you are British, polite, and reserved. He said, “For the next 81 hours you are Brazilian.” To this declaration, the Brazilian contingent raised the roof with their cheers. John said that in that conference hall room are all the authors of every Java book, leader of many Open Source projects, and innovators in just about every front. He recommended that we all take advantage of that fact.

The big announcements at JavaOne 2007 from Sun has been JavaFX Script, formerly known as Form Follows Function (F3). I think of JavaFX Script as a scripting Domain Specific Language for Rich Internet Applications which begs the question, why a new language? Why not accomplish the same functionality using Groovy, JRuby, or a unified and simplified API? Recently Sun also made inroads into the mobile space by purchasing the SavaJe mobile phone technology. At JavaOne, Sun announced JavaFX Mobile. JavaFX Mobile is an iPhone-inspired Java-powered software system for mobile devices. Rich Green, Vice President of the Software division at Sun, said that JavaFX Mobile is some “serious mobile eye candy.”

The general session is also meant to inspire all those present to share ideas, contribute code, and to participate. To this end, Rich Green said, “This is not a read-only life style.” Scott McNealy, former CEO of Sun, made a brief appearance on stage to announce his current project, Curriki, a elementary to high school curriculum wiki. Scott McNealy also had time to joke that Rich Green is a ‘short sleeve version of Steve Jobs.’

Technorati Tags: , , , , ,


May 28 2007

CommunityOne 2007: G2One

The G2One, Groovy and Grails mini-pre-JavaOne conference, was put together by the folks behind No Fluff, Just Stuff conferences. The G2One mini-conference brought together Guillaume LaForge, the Groovy project lead, Graeme Rocher, Grails project lead, and Groovy in Action author Dierk Koenig amongst other Groovy developers and evangelist.

Guillaume started the event by proving a quick introduction of Groovy and going into the details of the upcoming release. Groovy provides semantic sugar and sweetness to the Java VM. Groovy is Java-like and compiles down to Java to byte code but with the added bonus of the GDK, the Groovy Development Kit. You can mix and match Java/Groovy classes seamlessly, no bridge/connector required. I think that Groovy is what Java 3 should and might be. For example, Groovy provides string substitution, array and map literals, and regex literals. There are Eclipse plugins for Groovy that come with code completion, navigation, and highlighting. Groovy 1.1-beta has support for annotations.

Graeme talked about the currently available Grails 0.5 release. Grails builds on top of Groovy as the language used in the models and controllers, Spring for the Inversion of Control container, Hibernate for the Object Relational Mapping, Quartz for task scheduler, and Sitemesh for templeting. Grails comes with an embedded Jetty servlet container and embedded HSQLDB database for quick turn around agile development. Graeme stated that most of the behavior in Grails is provided by plugins. So what is new in Grails 0.5? Command Objects in controllers. List and map support in GORM. Cascading validation. Script event hooks. Converter plugin to automatic convert models too XML, JSON, or RSS.

There was a series of rapid fire demoes by Guillaume, Graeme, Dierk, and other Groovy developers. One demo used the SwingBuilder groovy class to mashup GMaps and Flickr data. The demo used XMLSlurp to consume XML RSS feeds. Remixing and mashing up Google Maps and Flickr is like the ‘Hello, World’ first program of Web 2.0 mashups. When demoing the Swing-based mashup, Dierk Koenig said of the aesthetics of his demo, “This is what happens when you program in Swing, the first attempt is usually ugly.”

Technorati Tags: , , , , , , , , , ,


May 27 2007

CommunityOne 2007: Up the Stack

The last session of CommunityOne 2007 was titled Up the Stack. The main concern of this session was the whole software development stack, from the Operating System to the database and all the way to the web framework. For the most part, developers these days working on the next great Web 2.0 pay no heed to limitations and strengths of the OS.

This session dealt with performance and profiling considerations spanning the whole stack from using DTrace on Solaris to using caching in your application. Dtrace is dynamic tracing utility made available in Solaris that will help you discover bottlenecks in your application by analyzing the whole process.

Another session dealt with GlassFish. GlassFish is an enterprise ready Java EE 5 Application Server with easy management tools and clustering support. GlassFish supports RIFE, Rails, Struts, Wicket and just about every other Java web application framework under the sun, no pun intended.

Tim Bray of Sun moved up the stack and talked about web technologies such as PHP and Rails. Tim stated that PHP is easy to learn and quick to develop with. PHP has a share nothing architecture that is great for scaling but is historically known for the tons of security holes, SQL injection, and cross-site scripting attacks. Tim noted that some developers would trade the security of JEE for the speed of development of PHP to get first to market. Tim also mentioned that Don’t Repeat Yourself, Convention Over Configuration and the expressiveness of Ruby while talking about Rails. The Ruby programming language allows for Rapid Agile Development. The big knock against Rails is its lack luster performance and it’s multi-headed mongrel deployment story. PHP or Rails are a good solution for many of the CRUD applications that babysit a database.

The last session of the talked compared Ehcache and memcached. Memchached is said to be used in LiveJournal and Slashdot as well as many Ruby on Rails applications. Ehcache distributed peer-based caching in Java sync/async operations used in Spring and Hibernate.

Technorati Tags: , , , , , , , , , ,


May 27 2007

CommunityOne 2007: JRuby: Understanding the Fuss

Fellow Sun engineers Tor Norbye and Charles Nutter presented on the past, present, and future fuss of JRuby at CommunityOne 2007. To understand where JRuby is heading, the presenters painted a clear picture of the Ruby programming language. Ruby is a dynamically typed pure object-oriented language originally written by Yukihiro ‘Matz’ Matsumoto. The Ruby programming language is an expressive, powerful, and easy to learn, read, and write.

Tor and Charles gave a quick tour of the Ruby language features such as string substitution, modules and mixins, open classes, meta-programming, duck typing, literals for arrays and maps, and code blocks. Ruby is an incredible flexible and expressive language. The more expressive the language, the less code you’ll end up writing and maintaining.

Tor also demoed his work with NetBeans support for JRuby. NetBeans includes code highlighting, code completion, and documentation support for JRuby. While demoing NetBeans and thinking of JPA Tor Norbye said, “I wish they had annotations in this language.”

Technorati Tags: , , , , , , , ,