At 09:54 pm 12-06-2002 -0700, you wrote:
>Quite frankly, it baffles me when people want to use form beans as the
>model. Doing this couples the model to the view in wholly undesirable ways.
>
>For instance, what happens when the UI designer moves things around in the
>pages in such a way that the mappings between UI elements and pages (and
>thus form beans) change? It seems that you'd have to change the model now,
>just because the UI designer made some tweaks to the view. This kind of
>coupling is entirely unacceptable in anything other than trivial apps.


Not dispute about this. But, you can view it from the other angle:

In my case, I want to use something from the model as the formbeans, not 
the other way round (as we all know having a model->view dependency is 
bad). However, because of the way formbean is designed in Struts, this ends 
up having the ActionForm class and the other dependent apis dragged into 
the model tier.

So, to paraphrase my question: "Does it make sense to modify Struts such 
that it allows other objects (e.g. from the model tier) to participate the 
role of formbeans but does not create an ugly model->view dependency?"

(The situation is like in Swing, a model object can implement a Listener 
interface and let the view components talk to them. This isn't regarded as 
a model->view coupling.)

-- 
John Yu                       Scioworks Technologies
e: [EMAIL PROTECTED]         w: +(65) 873 5989
w: http://www.scioworks.com   m: +(65) 9782 9610

Scioworks Camino - "Rapid WebApp Assembly for Struts"


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

Reply via email to