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: Newbie question RE: proxies  (Read 6807 times)
fauntlers
Newbie
*
Posts: 1


View Profile Email
« on: April 29, 2008, 11:48:27 »

Hi,

I have an XML file in my Flex application that contains a list of webservices and some configuration for each one (WSDL, operation etc. etc.).

I have created WebServiceDefinitionVO which encapsulates a single web service definition.

I have created WebServiceDefinitionProxy which contains the logic to get the information from the XML file.  It's data type is an ArrayCollection to which I add all of the WebServiceDefinitionVOs created from the file.

So...what I'm grappling with is....my proxy encapsulates a list of web service definitions but I really need something that encapsulates a single web service definition as I'm going to have methods that perform domain logic on the web service definition level.

So....do I put those methods directly onto the WebServiceDefinitionVO class and use the proxy to deliver instances of the VO class?
OR
do I create another proxy that encapsulates a single WebServiceDefinition?

I know I can get it working...I just want to know what best practice is.
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: April 30, 2008, 08:41:48 »

What you might do is create separate proxies for each of the webservice definitions in your list. So once the WebServiceDefinitionProxy has retrieved the XML and created all the WebServiceDefinitionVOs, it then creates and registers the appropriate proxy for each.

Then the only issue is how to have the WebServiceDefinitionProxy know what the appropriate Proxy to instantiate for a given WebServiceDefinitionVO.

-=Cliff>
Logged
Pages: [1]
Print