Building JSF Applications with JRuby and ActiveRecord-JDBC
JavaServer Faces (JSF) is a Java platform Web application framework developed by Sun. Unlike most Web frameworks, which are request-driven, JSF uses UI components on the front end (typically a Web browser, none the less) that interact over the network, triggering events that cause various actions within a back end application. Rogério Pereira Araújo has put together a solid two part (so far) tutorial that demonstrates how to create JSF applications using JRuby and the JDBC variant of ActiveRecord.
Part one covers declaring JRuby-powered beans within the application and setting up a simple class. Part two goes into defining models, interacting with a database, and presenting data using the UI components.
None of what Rogério presents is particularly mind blowing by itself, but it's a great introduction to using Ruby in a previously unanticipated way. With JRuby's flexibility on the Java platform, it seems that Ruby can, to many extents, replace the need for the Java language in many situations. If you're locked on to the Java platform, with the enterprise world, say, experiments like these could help you use the power of Ruby / JRuby while still being able to roll out and support a platform that's already won favor with the rest of the IT department.
March 21, 2008 at 4:49 am
If you're locked into the Java platform, definitely have a look at JRuby and see where you can use Ruby instead of Java. But if you're locked into JSF, definitely have a look at Indeed and consider a new job. JSF seems to thrive on anti-patterns and take Enterprisy to its extreme, with all due respect to Ruby, I don't think it help recover from these losses.