struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nic Werner <wer...@sonoma.edu>
Subject Seperation between Controller and Model
Date Wed, 04 May 2005 03:03:47 GMT
Hi again,
   My apologies for a probably obvious problem. I've got an example 
where I need to check (on update) if this object is actually being 
'moved' (ie, keypair is being changed), and if there is already data at 
the dest. keypair, go back to the page, display both objects and confirm 
the user wants to overwrite the actual data there. If confirmed, null 
out the old keypair data and update the new keypair.

    Now, I'm confused on where I should put the logic for all this? This 
almost seems like the perfect place for  custom Validation code, and 
seems like something the Controller would do, but it also seems that 
this is business logic and shouldn't be coupled to Struts. I'm thinking 
that all Struts should call is my DTO.Update() method?

      Maybe because I don't have much so-called business logic in this 
application that I'm not sure of what really should be in that layer, 
the above example is about as complex as the logic gets for me.

Thanks,

- Nic.
   

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message