Funny, I was just dealing with this same question. I did it at the command because it seemed to me that is where all the application logic should go and so any additional processing and data handling that must be done should be done in the command. But I wasnt 100% sure. That was my gut. I would be curious as well if anyone doing caringorm longer has any thoughts.

Regards,
Hank

On 10/10/06, Robin Burrer <[EMAIL PROTECTED]> wrote:

Hi there

 

Let's say I want to do a server request. I want to search my database for a particular keyword and return a record set.

The user would type in the keyword in a text area and I would then create a SearchDatabaseEvent which then would trigger a SearchDatabaseEventCommand and so on …

 

However I also want to send the userID when I do my server request. Should the SearchDatabaseCommand get the userID from the model or from the SearchDatabaseEvent (so I would have two properties in my event "keywords" and "userId")? The SearchDatabaseCommand obviously knows about the model because it has to populate the model with the result record set. So I could just get the user ID from the model when the "execute method" is triggered.

 

This approach seems a bit wired though because it seems that couples my command to strongly to the model. On the other hand it seems strange to query the model from my view to populate the SearchDatabaseEvent with userId property as well.

 

Any thoughts?

 

 

Cheers

 

Robin

 

 


__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to