This past week or so two developers whom I greatly respect and admire really opened my eyes. It's been an interesting time since then. On October 23 on the Struts Developer list Craig McClanahan wrote:
To which Ted Husted followed up:
On Tuesday, November 13 I will be presenting a training session at ApacheCon 2007 in Atlanta, GA, Using Groovy with Struts 2. Learn how to use Groovy with Struts 2. Topics covered will include: Integrating Groovy into the Struts 2 Maven archetype; implementing actions, and service beans in Groovy; using Spring to wire Groovy service beans and action classes; using dynamic Groovy actions that do not require a server restart; writing Data Access Objects in Groovy and using Spring based transaction support with Java Persistence API (JPA).
Groovy Works has been the benefactor of a lot of development this past week. With upgrades for better class caching, better utilization of the GroovyClassLoader, and integration with Groovy-1.1-beta-3-SNAPSHOT and Spring 2.
I have moved Groovy Works to Google Code. To get the latest release please see the download section on Google.
To use the plugin in your Struts projects you'll need to remove the standard Struts Spring plugin. Groovy Works provides all of the functionality of the existing Spring plugin.
It's a quiet Saturday and I'm working. Yea, I know some people would scoff at that, but lately my office and business life during the week are so hectic I can't get into that "place" where development just flows.
Well, today I'm the only one in the office and I'm getting development done. I'm tackling a very tricky screen in Quadran, and Struts 2 is making it a joy. The more I use Struts 2 I realize that a lot of development and thought has gone into solving real web developer needs. When I think of some new feature I'd like in Struts 2 I frequently find that it's already there.
I've started using the "method" property on submit buttons. I know I'm late to the party. This is just so neat. I used to use hidden properties and switches to get to the right logic. Now, just set method on the <s:submit> tag, and voila! I'm in the right place in my action.
I received an email from ApacheCon today. They have accepted my Using Groovy with Struts 2 training session.
Using Groovy with Struts 2: A hands on half day training session. Learn how to use Groovy with Struts 2. Topics covered will include: Integrating Groovy into the Struts 2 Maven archetype; implementing actions, and service beans in Groovy; using Spring to wire Groovy service beans and action classes; using dynamic Groovy actions that do not require a server restart; writing Data Access Objects in Groovy and using Spring based transaction support with Java Persistence API (JPA).
I don't have scheduling information yet, but I believe it will either be on November 12 or 13. Stay tuned for more information.
I'm seriously considering writing a dead tree Struts 2 cookbook. What types of recipes would you like to see? Beyond what is already in my cookbook I've been thinking of the following:
Controlling access to web resources with a a login process is a common use-case. Implementing this using an interceptor in Struts 2 is very straight forward.
The parts of the solution:
I've submitted three proposals for talks at ApacheCon 2007 US, login to see the proposed sessions and give feedback on them.
I've never submitted a proposal to do a presentation at a technical conference before. So, this is a first. I've done a lot of training and mentoring, but never worked for an employer who saw sharing the knowledge as something of value they wanted their employees doing. (It's good to be self-employed now!)
Redirecting a user of a web application after submitting an HTTP POST is a common pattern. A common use case is to redirect to a display page after a user has created something, such as a purchase order or sales order.
This post and redirect pattern is supported by Struts 2. The means of doing this wasn't obvious to me, but some reading and searching turned up the answer. There are some examples around for doing a redirect using static parameters, but that doesn't help when you want to redirect someone say to display the order they just placed on your website.
Redirects in Struts 2 can use static or dynamic parameters. Here's a simple static redirect:
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.