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

Show Posts

| * |

  Show Posts
Pages: [1]
1  Announcements and General Discussion / Architecture / Appropriate use of MXML WebService on: July 02, 2008, 03:33:14
Does using PureMVC in a Flex app prevent the use of data services that are mxml based?

I was going about implementing a web service in one of my proxies when I discovered that there is an AS3 version and an mxml version.  They seem similar with the exception that the mxml version includes a property called showBusyCursor (which I would like to use so that the user knows that the UI is waiting on the remote data to load).  The AS3 version doesn't have this ability. 

Would it be horrible to put an mxml WebService (non-visual) component in my display hierarchy and cache a reference to it in my proxy?  It sounds not-right somehow (coupling model and view).  There may be a way to send a notification as I invoke the WebService that the view will respond to which will set the cursor to busy and then send another notification onResult to change the cursor back, but that also seems a bit clunky.  I guess it's really a reflection of flex allowing you to define display objects as well as non-visual data-layer and business-layer objects (Xml, Bindings, WebService for example) in mxml.  Is there a way to use these mxml classes that seem to be made for things that fall into the model and controller areas in a way that adheres to best practices?
Pages: [1]