Vita Rara: A Life Uncommon

Grails

  • user warning: Got error 28 from storage engine query: SELECT DISTINCT(p.perm) FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN (1) in /home/vrorg/website/html/cms/includes/database.mysql.inc on line 120.
  • user warning: Got error 28 from storage engine query: SELECT t.tid, t.* FROM term_data t INNER JOIN term_hierarchy h ON h.parent = t.tid WHERE h.tid = 74 ORDER BY weight, name in /home/vrorg/website/html/cms/includes/database.mysql.inc on line 120.
  • user warning: Got error 28 from storage engine query: SELECT t.* FROM term_node r INNER JOIN term_data t ON r.tid = t.tid INNER JOIN vocabulary v ON t.vid = v.vid WHERE r.nid = 161 ORDER BY v.weight, t.weight, t.name in /home/vrorg/website/html/cms/includes/database.mysql.inc on line 120.
  • user warning: Got error 28 from storage engine query: SELECT t.* FROM term_node r INNER JOIN term_data t ON r.tid = t.tid INNER JOIN vocabulary v ON t.vid = v.vid WHERE r.nid = 116 ORDER BY v.weight, t.weight, t.name in /home/vrorg/website/html/cms/includes/database.mysql.inc on line 120.

Closures and Bindings in Groovy


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)

The Definitive Guide to Grails


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.

Syndicate content