Code Generation STILL in Action 1

Posted by Steve Longdo Sat, 17 Feb 2007 15:30:00 GMT

The Past

Jack Herrington wrote a book Code Generation in Action way back in 2003. It took advantage of the little programming language that could, Ruby. I remember having a discussion with a colleague back then about the value of generated code. We were of the opinion then that it would only apply to simple repetitive cases and wouldn’t make much of an impact.

If only I could go back in time and slap both myself and my colleague in the face! We missed out on being early adopters of time saving technology. In fact almost everyone using Java was already taking advantage of code generation whether they realized it or not , Eclipse would generate getters and setters and had its refactoring capabilities, Spring was beginning to handle externalizing dependencies, and the then fledgling Hibernate Framework was manipulating bytecode to enhance Java methods.

At the same time my colleague and I were hammering out code with the tried and true cut-n-rape technique that had been popular since before we were born.

Modern Day

I have the “opportunity” to work on porting some old JSPs which, in true 20th century Model 1 style, link directly to each other and the database via scriptlets, to a more modern Java MVC framework. Rather than just wade in blindly, manually translating JSP scriptlet page to Java MVC framework code, I decided to make the project interesting and have been writing a Ruby JSP parser/code generator. It can identify scriptlet code and extract it for me. I have been enhancing the parser to handle generation of Spring MVC code and am working on having it generate Spring Web Flow flows from reading the form action attributes in the JSPs to model application flows.

Here is a 2006 appearance by Jack Herrington at Google on the subject of Code Generation that is worth a watch.

Spring now in 3D

Posted by Steve Longdo Tue, 12 Dec 2006 01:50:00 GMT

I have resisted posting anything about the Spring Experience 2006 until now. Mostly because postings on my blog have been Ruby-centric or me-centric, but let’s break the embargo for a post or two.

The opening keynote by Rod Johnson was a loser. He started out by checking his bank balance and then doing a UK patent search to demonstrate that some websites in the world use Spring under the covers! Duh!

While Rod was dumbing it down for those in attendance, a table at the back of the room featuring some of the conference speakers as well as a baby, began to reminisce about other conferences they’ve gotten money for and such. They were loud enough it was hard to hear the keynote. This was especially rude because the speakers are only there to present because people like me (well my company) paid money for them to be there. Glad you guys enjoy being around each other, but take it out in the hall next time with the baby if you want to be loud.

Also I think some limited mockery of Domain Driven Design is called for. People need to stop making up ?DD acronyms. I’m all for having a software methodology and following its doctrines when they make sense, but you just know some idiot somewhere is going to post about how This JEE Web 2.0 website , is now brought to you in 3D!.

The Spring guys seem to have bitten into this D3 stuff hook, line, and sinker. Martin Fowler blessed the book with his own brand of stink so it must be good right? There was a dedicated D3 track available at the conference on the topic. I can’t figure out why there wasn’t enough Spring content to fill out that track as well. It was the Spring Experience after all!

Anyway there was some good content presented, Matt Raible did a great job writing it up for the Java faithful. I’ll leave my non-mocking commentary on the conference some other time.

Java, Spring and Why I Haven't Posted Lately...

Posted by Steve Longdo Fri, 06 Oct 2006 03:37:00 GMT

Things have been busy on the work side of my activities lately. Work is currently revolving around Java and using Spring MVC. Since I have primarily focused on Ruby and Rails information on my blog, I've been reluctant to blog about where my head is at in the Java space. If someone is interested, leave a comment and I'll see what I can come up with.

Which isn't to say I am not tracking recent developments in the Rails community, just that I haven't had time to analyze their impact and vomit forth a blog entry or two :-)

Okay, one little morsel of my experience with Spring relates to one of the core tenets of Rails: "Convention over configuration".
It finally found a way into a Java web development framework!

Older posts: 1 2