From: Michael McGrady <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: Re: Accessing bean properties problem
Date: Fri, 13 Aug 2004 06:22:38 -0700

Janne Mattila wrote:

I am aware that I can use the approach you suggested (parse request parameters manually), and have been doing that for ages before I started learning Struts :) I was just expecting that Struts would somehow help me with this task. I have been looking into indexed properties but I have not quite figured out how to properly implement this kind of functionality using them.


All the solutions involve parsing the request parameters, Janne. That is clearly the only way you will ever know what they are. The difference is that there is a clear, extensible, light, fast, loosely coupled, solution and a messy, solution specific, heavy, slow, tightly coupled version of the solution. You are seeking the latter for some reason. There is NO reason to couple your solution to Struts. Struts is a framework and is not meant to be a fulcrum to solve this problem. If you were using the solution I have suggested for "ages", you should go back to it. Your present solution is horrible in comparison. That is just plain true.

If you use Struts to do your HTTP request processing, you'll couple your HTTP request processing to Struts. I don't know what all this nonsense about "decoupling from Struts" is meant to be. That is the whole point of using Struts, there is absolutely no logic in trying to decouple you application's HTTP parameter handling from Struts. It is what Struts does.


You seem to like parsing HttpServletRequests manually, so why don't you skip Struts altogether and parse all request parameters manually? I bet it would be "clear, extensible, light, fast, loosely coupled solution". Hell, who needs ActionForms after all? They make your solution tightly coupled to Struts!

_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to