0 Replies Latest reply on Apr 25, 2009 1:06 AM by Arbi Sookazian

    Seam with Groovy integration

    Arbi Sookazian Master

      Has anybody had any good/bad experiences with Groovy integration in Seam apps and care to share?  For example, from a performance or productivity perspective.  I know that .groovy files compile to Java bytecode that the JVM can interpret, so perhaps performance is not really an issue, but there are constructs like closures that may or may not perform well (I honestly don't know) compared to tried-and-true Java equivalents.

      from ref doc:

      Groovy natively support the notion of properties (getter/setter), so there is no need to explicitly
      write verbose getters and setters

      Although generating getters/setters using your IDE is typically trivial, less lines of code is good.

      That feature in addition to closures (and writing less lines of code) is a good reason to start using Groovy with Seam.

      But who uses .groovy files with Seam apps in practice?

      Here's an example:

      printMapClosure = { key, value -> println key + "=" + value }
      [ "yue" : "wu", "lane" : "burks", "sudha" : "saseethiaseeleethialeselan" ].each(printMapClosure)

      private void foo(String key, String value){
          System.out.println(key + "=" + value);
      public void bar(){
          foo("yue", "wu");
          foo("lane", "burks");
          foo("sudha", "saseethiaseeleethialeselan");

      How bout Scala (multi-core/concurrent programming) support in Seam 3 or Web Beans?