wood burning stoves 2.0*
The moose likes Spring and the fly likes Could Spring Roo be written in another JVM language? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Could Spring Roo be written in another JVM language?" Watch "Could Spring Roo be written in another JVM language?" New topic
Author

Could Spring Roo be written in another JVM language?

Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3476

Hi,
AOP (AspectJ I guess?) is behind the magic of Spring Roo. Could Spring Roo be written using a JVM language (such as JRuby or Clojure maybe) that provides the AOP capabilities?
What are the advantages of the AOP solution behind Spring Roo over a dynamic and macros-powered JVM language?

Thanks.
Ken Rimple
author
Ranch Hand

Joined: Jul 20, 2010
Posts: 63

Hussein Baghdadi wrote:Hi,
AOP (AspectJ I guess?) is behind the magic of Spring Roo. Could Spring Roo be written using a JVM language (such as JRuby or Clojure maybe) that provides the AOP capabilities?
What are the advantages of the AOP solution behind Spring Roo over a dynamic and macros-powered JVM language?

Thanks.

Hussein,

Ah yes, but would it be Roo then? ;)

The Roo - AspectJ configuration has the advantage of being compile-time, therefore it's in the bytecode and fast as possible. The downside is that you aren't really going to generate aspects for Groovy classes for example (currently I think that's not working for ITDs as I've tried and banged my head against the wall). However, I currently have a Spock add-on that I can use to test Roo add-ons or other Roo code and it's working rather well so far. You can learn more about that one at http://www.rimple.com/roo-spock-add-on/ - although I have to update all of those add-ons for Roo 1.2.2 (which I'll do this week).

So, it's really a choice of the creators of Roo to focus on staying within Java and weaving features into the bytecode, rather than going to a dynamic language and adding features through DSLs and "method missing" approaches. Could they have done it in another language? Maybe in Scala + AspectJ? But would that be appropriate? I'm unsure.

Ken

Ken Rimple
ken.rimple@gmail.com
Co-author, Manning Spring Roo in Action
I teach for Chariot Solutions (Spring, Maven, Hibernate, other courses). Schedule here
 
 
subject: Could Spring Roo be written in another JVM language?
 
Similar Threads
uses of aop in spring
Spring AOP / Spring AOP + AspectJ ?
AOP
AOP module
Metaphors of AOP