PEAT Online Course -
How To Improve Your Personal Performance in Java work Technology

  • Focus
  • Autonomy
  • Proficiency
  • Purpose
  • Covid-19!!!
  • Deep Hidden Meaning
  • FREE updates
Exclusively on

Devoxx 2010 University Day 1

17 November 2010 1 comment

6 minutes


Devoxx University Day 1

Yours truly arrived on Sunday for the annual Devoxx conference in Antwerp, Belgium. After the experiences of JavaOne only six weeks before it felt rather peculiar to be here on the continent again so soon.

Seam 3 Context Dependency Injection

Monday started for me with the SEAM 3 CDI technical session. Personally I have been less interested in SEAM for a while, because there are other technologies and solutions in this space. SEAM is great for integrated JavaServer Faces and EJB (as in 3.0/3.1 and JPA entities) . It was Gavin King’s originally design baby to solve the conservational scope and the page flows issues, which were prevalent in 2005-2007.  Not to bemoan CDI by any stretch of the imagination, the tech is still relevant to those who marry dependency injection and portability and frameworks. However I wonder about the CDI relevance to other alternative JVM languages like Groovy or Scala.

That said I liked the ability to extend CDI with SEAM modules, and idea of type safe configuration of beans (managed beans).  How is this appropriate to JavaFX 2.0? Could this be a solution? So I skipped out during a tea break and found Neal Ford’s session.

Devoxx 2010

The Productive Programmer

Oh my sweet  funkiness, was Neal Ford on a good form? Was he good? He was great. How about this for a bullet quote:

If you must ever do anything in computing worthwhile. prefer to work like a craftman, not a labourer

Or this one

Always use a real language for scripting

The former quote related to the part where Ford discussing Selenium IDE, automating web UI testing and the latter pertained to automating Microsoft COM using Ruby!

Actually, I had wished that went Neal Ford entire session for the whole morning, especially for this snippet of gold dust:

Top Ten Corporate Smells

(Here Neal Ford’s smells means corporate mistakes or suspicious activities that make a consultant or contractor think twice before agreeing to work on project with that particular corporation)

10. We invested our web/persistence/messaging/caching framework because none of the existing ones was good enough (an averice of dot Net companies where there lack of open source tradition)
9. We bought the entire tool suite (even though we needed about 10% of it) because it was cheaper than buying the individual tools
8. We use WebSphere because … (He always stops listening at this point)
7. We can’t use any open source code because our laywers say we can’t
6. We have an architect who reviews all code precheckin and decides whether or not to allow it into version control
5. The only JavaDoc is the Eclipse message explain how to change default JavaDoc template
4. We keep all of our business logic in stored procedure … for performance reasons (premature optimisation already in up front architect)
3. We don’t have time to write unit tests (we’re spending time doing debugging)
2. The initial estimate must be within 15% of the final cost, the post-analysis estimate must be within 10% and the post-design estimate must be within 5% (A lot of company desparately try to
1. There is a reason that WSAD isn’t called WHAPPY (IBM Websphere derived Eclipse environment that is always several version behind the current Eclipse and crippled by blot)

Actually, this list of corporate smells, which a small sub section of Neil Ford’s larger presentation: 10 ways to improve your code. The main take away was not get involved in business who practice these corporate fails knowingly or unknowingly.

Groovy Update Ecosystem with Guillaime LaForge!

Let me just say simply, Guillaime Laforge is the Groovy Project Manager and now is the “Groovy man”. If you have an question about Groovy then Laforge can probably answer it well enough. This university talk was an overview and update of Groovy starting from version 1.6. Of interest to me was the ideas of AST Transformations, abstract syntax tree manipulations, which mean developers can write annotation that modify the meaning of Groovy code as it is compiled. The fruits of this labours are @Singleton, @Immutable, @Delegate, @Lazy, @Newify, @Mixin and of course @Grab.

Devoxx 2010

Groovy has support dynamic mixins.

Groovy has a DSL for handling JMX.

Groovy 1.7 brings the AST Viewer/AST Builder and anonymous inner classes and nested classes. With the latter you can bring more Java code now into Groovy directly. Groovy 1.7 brings the customisable GrabResolver.

Groovy 1.8 will improve currying so that curry from left associativy or the right associativy,  rcurry() and ncurry() calls respectively.

Groovy 1.8 will add Closure annotation parameters, functional composition, memoisation and trampolining, native JSON improvements, Gradle build and earlier modularisation and alignment with JDK 7 / Project Coin.

If you have an interest in DSL implementations, then Groovy 1.8 will add Command Expressions. This is a feature that is impossible to do in Scala at the moment, and Groovy will have a nice syntax for DSLs

send("Hello").to("Grame Rocher")

With command expression expansion becomes:

send  "Hello" to "Grame Rocher"
sell  100l.shares  of MFST
take 2.pills of chloroquinone  after 6.hours

Wow! These were examples of {verb} followed by a {noun} DSLs! (Why can we not do this well in Scala?)

LaForge covered a lot of Groovy projects in a brief overview and the ecosystem for Groovy is rather rich now.

  • GContracts – André Steingress idea of writing invariant specifications using closures and annotations
  • GPars – parallelisation of Groovy collections, which relies on JSR 166y the concurrent fork join framework created by Doug Lea
  • Griffon – is a Grails like application framework for developing desktop applications in Groovy applications in the style of Grails application (convention over configuration)
  • EasyB – behaviour driven development framework that is similar to RSpec in Ruby
  • Spock – powerful mocking framework and also specification framework with fluent interfaces
  • GMock – another mocking framework and library for Groovy
  • GAELYK – Laforge’s own pet project for running Groovy inside the cloud, namely the Google App Engine

I am very intrigued by Google App Engine and GAELYK, because it may be way to generate Groovy web content sites very efficiently. WIth GAELYK there is lot of Groovy styled DSL implemented to wrap around the App Engine standard services. For instance a DSL wraps the XMPP, Images, User, TaskQueues, URL Fetcher, Memcache, Blob store and of course the key value based Data store. Therefroe it looks to my eyes very easy to write a GAELYK application. The issue here one has to write Groovy Server Pages and break up HTML design into template defintions yourself.

Here is the Groovy sample code for using Memcache DSL

class Country implements Serializable { String name }
def countryFr = new Country( name: France )
memcache['FR'] = countryFr // store inside memcache

// Check memcache for the key and if it is there do some work
if ( 'FR' in memcache ) {
     def countryFromCache = memcache['FR']
     doWork( countryFromCache )

In summary, the Groovy ecosystem talk was very impressive and to my mind showed the strength of Groovy and the users who are actively involved in it.

Overall, it was a very entertaining day at the Devoxx races.

This is Peter Pilgrim at the Devoxx 2010. Out.
Hey all! Thanks for visiting. I provide fringe benefits to interested readers: checkout consultancy, training or mentorship Please make enquiries by email or
call +44 (0)7397 067 658.

Due to the Off-Payroll Working plan for the UK government, I am enforcing stricter measures on contracts. All potential public sector GOV.UK contracts engagements must be approved by QDOS and/or SJD Accounting. Please enquire for further information.