Converting AppFuse to use Spring for MVC
It's been a long and painful week - with 3 or 4 nights where I was up to 4 or 5 in the morning. Last night I was up until 4:30 and Abbie woke me up promptly at 7:30. Ugh, sleeping more is probably a good idea. I started on the Spring MVC layer for AppFuse on Thursday night and it took me almost 2 days to convert everything. There's still a few kinks and workarounds - but if you're running it through a browser, everything works the same as it did with the Struts version. The hardest part about it was writing the unit tests. With Struts, it's rather easy b/c I use StrutsTestCase, which provides a very simple API for testing Actions. I'm sure Spring will soon have this same capability with its Servlet API Mocks, but I was definitely banging my head against the wall a few times. I did manage to convert the LabelTag to recognize required fields and error messages. The JSP conversion was a slight pain - but mostly because you have to type a lot more for input fields than you do for Struts. I'm looking forward to WebWork which requires one line to do the whole table row. It has Velocity templates for its tags and they write the <tr>, <label> and the <input>. Pretty slick IMO - less typing is always attractive to me.
I'd like to write-up a detailed entry on "migrating from Struts to Spring" on JRoller, but it's been flakey over there for a few days now - so I might just do it here. We'll see - the lack of sleep is draining my motivation to write. I hope to do the Ant-based installation for Spring in the next couple of days - then I'll release 1.5 beta. My main reason for the beta is because the Spring stuff can probably be cleaned up a lot, as well as it gives me time to write documentation before the final release.
Posted by bren on May 02, 2004 at 10:56 PM MDT #
Posted by Matt Raible on May 03, 2004 at 02:45 AM MDT #
Posted by Seth Ladd on May 03, 2004 at 06:40 PM MDT #
Posted by 209.87.176.3 on June 09, 2004 at 06:46 PM MDT #
Posted by Pål Brattberg on July 13, 2004 at 06:37 PM MDT #