Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: One proxy to handle many calls, or many proxies to handle one each?  (Read 7487 times)
jeffyamada
Newbie
*
Posts: 4


View Profile Email
« on: April 14, 2009, 03:37:11 »

Ok, so I have a series of related service calls for data. In this instance they're about an "Event" ( as in a conference ). There are xml feeds for things like the "Event Schedule", or "Upcoming Events", or "Hotel/Travel Listings".

All of these feeds are interelated, as they all relate to events, usually a specific one, or in the case of upcoming events, several. What I'm sitting here wondering is if I should have a single proxy handle calls to these feeds, or a proxy per feed.

I think I like the proxy-per feed approach mostly because it allows me to keep the proxies closer to the IProxy signature making them more reusable and easily understood. It also helps encapsulate feed specific actions such as parsing to one domain model per proxy...right?

Anyone have any thoughts?
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: April 14, 2009, 03:55:00 »

If they're different services, I'd definitely go with multiple proxies. Then you can use commands to assemble/cross-relate the data in the view. Or let the proxies know about each other and form their own hierarchies.

-=Cliff>
Logged
jeffyamada
Newbie
*
Posts: 4


View Profile Email
« Reply #2 on: April 14, 2009, 04:09:37 »

Awesome! Thanks Cliff!
Logged
Pages: [1]
Print