- TS-5764 - Grails in Depth
- TS-5793 - Groovy and Grails: Changing the
Landscape of Java™ Platform, Enterprise Edition (Java EE Platform)
Patterns
As well as a single talk at Monday's CommunityOne 08 event:
See you there!
Thought's about software, Grails, Java, web development and anything else that comes to mind.

Further evidence of the growing community is the Grails plug-in eco-system where Grails now has no less than 47 user contributed plug-ins in the plug-in repository representing nearly 2 million lines of user contributed code:
Clearly, we still have a long way to go to make Grails as hugely popular as things like Spring and Hibernate, but we're heading in the right direction which is great news.
Call shell.evaluate("x = 100")
Call System.gc()
Thread.sleep(1000)
Record used memory
Repeating (1-4)
grails create-app name
mvn archetype:create -U \
-DarchetypeGroupId=net.liftweb \
-DarchetypeArtifactId=lift-archetype-blank \
-DarchetypeVersion=0.4 \
-DremoteRepositories=http://scala-tools.org/repo-releases \
-DgroupId=your.proj.gid -DartifactId=your-proj-id
My goodness, what a mouthful the Maven example is. There is a common acronym in the open source world called RTFM (read the *ing manual), when a user asks a question on a mailing list and the "experts" respond by pointing them to the place in the manual.
"First, we needed a scripting language that runs in the JVM, so that ruled out some languages right there. Anything that runs outside the JVM will require some duplication of processes, and interprocess communication is more complicated. Second, we felt that Hibernate and Spring were well proven and we wanted to take advantage of them. Finally, the Groovy syntax and lifecycle management is very Java-like. This matters because the availability of skilled programmers is crucial in the enterprise space, and there are loads of Java developers out there."
1. module InvokableHashWhich then can be used as a method like:
2. def as(java_ifc)
3. java_ifc.impl {|name, *args| self[name].call(*args)}
4. end
5. end
1. impl = {
2. :i => 10,
3. :hasNext => proc { impl[:i] > 0 },
4. :next => proc { impl[:i] -= 1 }
5. }
6. iter = impl.as java.util.Iterator
7. while (iter.hasNext)
8. puts iter.next
9. endIf you were to implement this in Groovy you could do:1. Map.metaClass.as = { delegate.asType(it) }
However, in a further act of irony this code actually uses Groovy's built in coercion support and hence is in fact rather useless. All in one line of code!1. { println 'foo' } as RunnableAnd it can be extended by implementing the asType method.