« The Uniform Interface | Main | Understanding REST »

I know, I'll use a framework

To paraphrase Zawinski: Some people, when confronted with a web application, think "I know, I'll use a framework." Now they have two problems.

I've spent the afternoon reminding myself how struts works. Here's what I had to do to spark up a login page that doesn't check anything or log anyone in.

  • write 2 java classes
  • write two jsp pages.
  • link them all up in a struts xml config file.
  • deploy the lot using a servlet config xml file.

Some initial thoughts:

  • This stuff is going to be hard to test
  • Splitting Actions and Forms isn't making sense to me
  • Looks like there's going to be lots of downcasting - bad sign
  • No interfaces
  • If I'm not careful, I'll drown in my own Action hierarchy
  • perform() is invoked but execute() is not (this is 1.1)
  • magic .do extensions are being added to my html - ugh

I chose Struts for a console/admin webapp over WW/Rife/Spring because I'm the only person at work who knows WW/Rife/Spring, I'm liable either to be pulled out of that work unit or be forced to delegate it, and we have about half a dozen folks who know struts well, will get the job done if needed, and don't whinge as much as I do about frameworks. But here I am, and I'm already thinking about ways to abstract struts out of existence or hook in WW/Rife/Spring, but in a way that will let someone else work within struts. Nonetheless, thank goodness for Ted Husted.

Anyone out there integrating struts with WW/Rife/Spring?


October 27, 2003 07:17 PM

Comments

Thomas Risberg
(October 27, 2003 09:42 PM #)

Matt P
(October 27, 2003 10:07 PM #)

I believe a knowledgeable struts developer already has the leg in the door for learning another framework. The tranistion from struts to webwork is not that great. Much less that going from no frame to a framework.

Matt

Daniel Campers
(October 28, 2003 01:28 AM #)

I saw this the other day and thought id pass it on, might be a good approach to take to make using struts a bit nicer. http://crazybob.org/roller/page/crazybob/20031024
Also you could make the .do .htm instead if possible

Trackback Pings

TrackBack URL for this entry:
http://www.dehora.net/mt/mt-tb.cgi/1109