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: Retrieving and sending data to and from php  (Read 7510 times)
lostatoll
Jr. Member
**
Posts: 15


View Profile Email
« on: September 09, 2010, 11:27:22 »

I know this may label me as a total noob, but I've just yet to have to do it this way, most of my projects have been driven by our own simple XML.

My question is why is making a remote connection considered a proxy when I think of it as a command?

But beyond that, I would love any reccomendation of the best way to call a php class that returns XML. I've found a couple things online already such as amfphp, which looks awesome and easy, but is there any point to calling binary when the php is sending it formatted as XML already?

As always, thanks, You guys rule.
Logged
lostatoll
Jr. Member
**
Posts: 15


View Profile Email
« Reply #1 on: September 10, 2010, 07:55:15 »

So that you can store the vo's you're retrieving in the models data. Man, I should really stop asking questions on here. But if you have any recommendations on loading the php that would be swell.
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #2 on: September 12, 2010, 11:13:35 »

Sorry I'm a little behind the curve on the forums this week, I was pretty slammed with work.

Anyway, it was an early design decision that the Model region of an PureMVC client should take care of the services, shielding the rest of the app from coupling with the back end. The main reason for this was the realization that the Model is really the most portable part of the app; most likely to be reused in another app. For instance a desktop AIR app and a web-based Flex app might share the same Model but have different use cases to execute against it.

Another reason is that Commands are short-lived actors; created as needed and garbage collected when done. So, maintaining a connection to a service for two-way communication isn't really a good responsibility for a Command. A Proxy, on the other hand is typically instantiated once and lives for the duration of the app's runtime. It's convenient because any Command or Mediator (or even another Proxy) can retrieve it and interact with it.

-=Cliff>
Logged
Pages: [1]
Print