Models dispatching to Services

itsbdo's Avatar

itsbdo

08 Jul, 2010 09:40 PM

I was wondering what the best practice for the below situation would be.

In my application a button updates a url via swfaddress. The url is then parsed in a service to get a variable from the url which is the id of an image. This information is put into a model (other parts of the application will use this information). The id needs to be queried in a database to retrieve the image's information for loading into a view.

What I'm wondering is what's the best way to approach this? Would it be wise to have the model talk to another service to query the db or should the mediator for the view that will receive the loaded image ask the service to query the db and then have the service update the model which will then dispatch a notification with the image information in a payload for the view.

  1. 1 Posted by itsbdo on 08 Jul, 2010 11:35 PM

    itsbdo's Avatar

    Of course there would be a command to go between the model and service in the first scenario.

  2. Stray closed this discussion on 10 Feb, 2011 05:29 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac