Vita Rara: A Life Uncommon

Programming

Mark's [J]Ruby on Rails Notes


Categories: | |

Using GoldSpike to run Ruby on Rails in Standalone Mode

When running Ruby on Rails in a war using the GoldSpike servlets and context-param jruby.standalone is set to true you will need to use the jruby-complete jar file. Rails requires Gems in order to boot strap. I found that using the jruby jar file caused Rails to fail in initializer.rb when it tried to require 'logger' which is included in the ActiveSupport gem.

Also be sure to copy your required gems into WEB-INF/gems.

[EDIT: Better yet use ruby gem install --install-dir WEB-INF/gems. ]

Model Auto Completer

Quadran: Shakedown Run


Categories: | |

Today is the first day we have our client's complete staff using Quadran. It's a good feeling. This is a day years in the making. We had our first meeting about this project in the fourth quarter of 2004. That's a long time ago. We started the actual project in July of 2006. Today we have everyone in the business running on Quadran, and using their old system in parallel. There are issues, but nothing fundamental, no burning houses, or staff jumping off the ship. Overall it has been a calm deliberate test.

We have created more automated test cases for this project that any other project I have ever worked on. In the early going I opted for Struts 2, POJO service beans, and JPA, because they were testable. I think this has paid off pretty well, because it's quiet here. I'm not hearing screaming and gnashing of teeth. We'll see what the rest of the day brings.

Replacement Systems are Really Hard


Categories: | |

Create a list of the hardest things to accomplish in software development and I'm sure near, if not at the top of the list, will be replacing an existing system. Especially a system that runs the lion's share of a business' operations. Especially when you can't look at the source of the system you're replacing.

For the past year I've been working on my Quadran project. Quadran is a drop in replacement for a system my client has been using for about five years. Completing Quadran has been just about the hardest things I've ever done. It has felt like an IT death march.

Quadran Update


Categories: | |

We're in the final push to getting our first release of Quadran out the door. We' implemented a lot of functionality over the past two weeks. The data model has grown and morphed as time has gone on. We look to have a running system up within two weeks.

As I mentioned in another post we're starting to use Scrum to manage our software projects. The transition with Quadran has been interesting. Quadran is a fork lift replacement of an existing system that runs our client's complete operation. About the only thing that isn't in Quadran is invoicing and receivables. This makes the conversion to Scrum a little hard, because we're so close to finishing the first release. And we can't deploy the new system until it does everything else the old system does. (The old system took five man years to develop in the bad old days of EJB 1.1.)

Getting Into Scrum


Categories: |

At Vita Rara we're beginning to use Scrum to manage our software projects. Our first pure Scrum project is going to be a SaaS Scrum tool. Stay tuned for more on that as we make progress.

We're currently starting to use Scrum to manage our Quadran project. We have identified a client to act as our model customer, and have explained the Scrum process to them and they have bought in.

Compiling JasperReports JRXML Files with Maven


Categories: |

I recently started using JasperReports in Quadran. I'm using Maven to manage the Quadran project, and I wanted the JasperReports to fit into the process like everything else.

There is a Maven plugin in the Mojo collection for compiling jrxml files. Currently the plugin is in the sandbox, so you will need to check it out of Subversion and install it yourself in your local Maven repository.

ApacheCon US 2007: Using Groovy with Struts 2


Categories: | | | |

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.

Creating a Login Interceptor in Struts 2


Categories: | |

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:

  • An interceptor class,
  • An interceptor definition in our struts.xml file,
  • An interceptor stack that uses our interceptor in our struts.xml file,
  • A global result in our struts.xml file,
  • A JSP page to accept the username and password,
  • A service bean to process our user's login attempt,
  • A way to wire our service bean to our interceptor.

ApacheCon 2007 US Submissions


Categories: | | |

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!)

Post and Redirect in Struts 2


Categories: | |

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:

Syndicate content