Category: ruby

Creating JSF applications with JRuby and ActiveRecord-JDBC (Part 2)

Posted by – March 16, 2008

My last article about this topic showed how can we start the development of an JSF webapp with JRuby and ActiveRecord-JDBC, we will discuss on this article how can we create the dao, domain class and the view used to show costumer data.

In this example, CostumerDao illustrate how can we perform some data persistence/retrieval using ActiveRecord domain classes, we defined MyCostumer JRuby class to act as a proxy of our domain class:
More

Share

Creating JSF applications with JRuby and ActiveRecord-JDBC (Part 1)

Posted by – March 16, 2008

Is there any way to create JSF applications using scripting languages and its own persistence engines? The answer is: Yes! After some hours trying to integrate JSF + JRuby + ActiveRecord I finally could get a very simple application working, this application contains only one page where the user can add some costumer data, we have jsp as view, spring as IoC container and integration point with JRuby, ActiveRecord-JDBC as ORM.

The page has a managedbean defined as Ruby class, each Ruby bean must implement a Java interface to allow integration with Java/Spring, when the bean is requested by Spring a Java proxy class is instantiated based on its Java interface and then all Ruby code can be consumed properly.

If you wanna try by yourself you must create a webapplication and add the jars described on my previous post (except groovy-1.5.4.jar) plus these jars below on WEB/lib folder:
More

Share

Dynamic languages and JSF

Posted by – March 6, 2008

Yesterday I started to think about how can I use languages like Groovy, JRuby, Jython or Scala with JSF, after some research I found a elegant way to do it, in order to do that, you must add the following jars to your project:

  • antlr-2.7.6.jar
  • aopalliance-1.0.jar
  • asm-2.2.3.jar
  • commons-beanutils-1.7.0.jar
  • commons-codec-1.3.jar
  • commons-collections-3.1.jar
  • commons-digester-1.6.jar
  • commons-el-1.0.jar
  • commons-lang-2.1.jar
  • commons-logging-1.0.4.jar
  • commons-validator-1.2.0.jar
  • groovy-1.5.4.jar
  • myfaces-api-1.1.5-SNAPSHOT.jar
  • myfaces-impl-1.1.5-SNAPSHOT.jar
  • oro-2.0.8.jar
  • spring-aop-2.5.1.jar
  • spring-beans-2.5.1.jar
  • spring-context-2.5.1.jar
  • spring-core-2.5.1.jar
  • spring-web-2.5.1.jar

Now you must create the necessary configuration files:
More

Share

Looking for a new notebook

Posted by – November 2, 2007

My current notebook doesn’t fit my needs anymore, now I’m trying to find a cheap notebook that can help me in my development tasks, like create application frontends for FAST ESP or databases using Eclipse and JSF.

Unfortunately, the most powerful notebooks are very expensive in Brazil since most notebooks needs to be imported from US and other countries, the final price of each notebook is increased a lot, a US$ 1.999 notebook in US cost R$ 6.000 in Brazil, sad but true.

In the meantime, I’ll try to keep studying RoR, JSF and all .NET related stuff in my old and slow notebook.

Share