You can learn something every day. That's what is so nice about being a software developer.
Today I was looking at some Grails code, seeing how some of the metaprogramming features of Groovy are used in the framework. After poking around I decided to look at the ServicesGrailsPlugin to see how the automatic wiring of services was done, and ran across the following code:
def doWithSpring = {
application.serviceClasses.each { serviceClass ->
def scope = serviceClass.getPropertyValue("scope")
"${serviceClass.fullName}ServiceClass"(MethodInvokingFactoryBean) {
targetObject = ref("grailsApplication", true)I picked up a copy of The Definitive Guide to Grails this week. I'm most of the way through it, and I'm impressed. The Grails team has definitely done a lot of work. As a result I've started to dig into the code, and I'm getting a lot of ideas for Groovy Works.
Overall I highly recommend getting a copy of the book, whether you use Grails or not. It is well worth a look.
I'll post more thoughts when I finish the book.
Recent comments
4 days 15 hours ago
1 week 1 day ago
2 weeks 12 hours ago
2 weeks 3 days ago
2 weeks 3 days ago
3 weeks 17 hours ago
6 weeks 2 days ago
6 weeks 6 days ago
7 weeks 18 min ago
8 weeks 1 day ago