-
1. Re: Using Seam and Groovy together question
samdoyle Oct 22, 2007 1:18 PM (in response to samdoyle)I know this is a bit winded but would like to hear from someone who has gone through the Seam + Groovy experience if there are any out there.
S.D. -
2. Re: Using Seam and Groovy together question
samdoyle Oct 22, 2007 3:46 PM (in response to samdoyle)Nobody has tried Groovy and Seam together? Do I need to be the first and take a leap even though I don't really see the reason for doing so? =/
S.D. -
3. Re: Using Seam and Groovy together question
norman.richards Oct 22, 2007 5:38 PM (in response to samdoyle)The main advantage is simply being able to write in Groovy. If you can write a component more quickly using less code that is more understandable, that's a win. Groovy development doesn't require a compile step, which might make your development faster. Basically, if you prefer Groovy, for whatever reason, Seam is there for you. I think being able to write a facelets template that talks directly to a groovy component is pretty neat thing, but if you don't already have a need/desire to use Groovy, stick with Java. There's no obligation to make use of it.
We don't provide any direct integration with other Groovy technologies like GSP, but we'd welcome any Groovy users out there to try it out and report back. We're rather eager to make Seam more groovy. -
4. Re: Using Seam and Groovy together question
samdoyle Oct 22, 2007 6:08 PM (in response to samdoyle)Hi Norman and thanks for for the response.
I think we are just going to have to take it for a test drive and see for ourselves. I mean I'm pretty happy with Java but if this is something that can help in being more productive in the long run then it is certainly worth the time evaluating.
S.D. -
5. Re: Using Seam and Groovy together question
kontro_timo Oct 23, 2007 3:07 PM (in response to samdoyle)I have been writing Seam app using only groovy.
It works nicely (although I had to upgrade to groovy-1.1-beta-3).
Biggest issue is JPA entities there groovy works like miracle. Since groovy generates getters and setters for variable without scope.
So jpa entity written in groovy looks like this:@Entity class MyEntity implements Serializable { @Id Integer id String value_field }
With session beans groovy does not help that much since there has to be getters and setters defined in inteface. But if one uses seam managed pojos productivity would increase a lot.
Since I do not use IDE (coding using vim) more shallow directory tree for source files is nice too. Groovy does enforce rule that source file of com.mydomain.project.feature.thing has to be in folder com/mydomain/project/feature/. So since in one project every package has same domain (like: com.mydomain.project) I put source file in folders like src/feature.
Groovy also allows multiple classes in one source file. So I have source file like MyClass.groovy and it contains both MyClassBean and MyClass local interface. Easy to add method for both since those are in same file.
Writing unit tests using groovy is great fun since creating lists and maps for mocks is so much easier.
So far I can not see how groovy would make project more difficult to manage. Just replace javac with groovyc in build.xml and have fun.
Please do not ask about performance compared to plain java - I do not care since most of the processor time goes for handling tcp/ip stack, ssl and database queries anyway.
Biggest problem with groovy is that it adds many pages to the paper stack that defines project dependencies. Adding groovy specs top of all those jsr, facelets, richfaces, seam reference specs/howtos/tutorials does not make 9 to 5 coder happy.
-kontro- -
6. Re: Using Seam and Groovy together question
epbernard Oct 25, 2007 1:57 PM (in response to samdoyle)Today the main reason to use Groovy in Seam is the language features: closure, duck typing, list, map, properties etc etc. So essentially, code conciseness.
The hot deployment can actually be done with regular classes (provided that you compile them).
In the near future, we plan to do some things related to GString and Seam injection. Depending on how people are interested, something like GORM for DAOs might be on the target too. -
7. Re: Using Seam and Groovy together question
fangzx Dec 31, 2007 11:18 AM (in response to samdoyle)About hot deployment:
When I use java to write service component, and modify the java source code, hot deployment take effect. But when I use groovy to write service component,the hot deployment effect disappear.
Can anyone help me? -
8. Re: Using Seam and Groovy together question
fangzx Jan 2, 2008 10:24 PM (in response to samdoyle)The above hot deployment occurs only in Glassfish v2ur1, in Tomcat 6.0.14, it is ok?
-
9. Re: Using Seam and Groovy together question
fangzx Jan 2, 2008 10:25 PM (in response to samdoyle)The above hot deployment problem occurs only in Glassfish v2ur1, in Tomcat 6.0.14, it is ok!