I think Clarke is speaking to a single 'one off' component though.  I
recently built one like this.  Its sole function is to provide a Text field
with a search icon, clicking the search icon gives the user a search dialog
to search for a employee in our people soft database.  I wanted this one
piece to be plug-n-playable to any tool.  So, I build the server calls right
inside it, no MVC, framework, patterns, etc... its just a single mxml file.
Now any developer can drop it in and get to work.

DK

On 3/14/07, Mike Britton <[EMAIL PROTECTED]> wrote:

I usually don't put remoting calls in my MXML.  I'd set up an MVC to
handle the remote calls and bubble the results back up to your
component.  This way you could use the same architecture for other
components.

Defining callbacks in your MXML component's attributes:

<britton:MyManager someEvent="this.someHandler" />

Optionally (as seen above) you could create a Manager that would talk
to your Controller of choice.  This would be the class that sends
events back to your component.

If it gets more complicated than this, I'd use Cairngorm.  Sorry about
the brevity of this explanation, but right now I'm trying to make Cake
PHP and Flex play together :-)


hth,

Mike


On 3/14/07, Clarke Bishop <[EMAIL PROTECTED]> wrote:
> In my main application, I've got an Accordion that contains three custom
> components. At least two of the components need to talk back to the
server.
> The function of each component is totally independent -- They will be
doing
> different things and calling different web services.
>
> Here's my question: Is it bad form or a bad idea to embed the web
services
> or remoting code in the components?
>
> I know, Cairngorm fixes this, but my app is too simple to deal with all
the
> Cairngorm overhead.
>
> I'm still struggling with thinking about how to encapsulate
functionality
> cleanly in Flex, so any pointers are much appreciated!
>
>    Clarke
>
>
>
>
>
> -------------------------------------------------------------
> To unsubscribe from this list, simply email the list with unsubscribe in
the subject line
>
> For more info, see http://www.affug.com
> Archive @ http://www.mail-archive.com/discussion%40affug.com/
> List hosted by http://www.fusionlink.com
> -------------------------------------------------------------
>
>
>


--
Mike
----------
http://www.mikebritton.com
http://www.mikenkim.com


-------------------------------------------------------------
To unsubscribe from this list, simply email the list with unsubscribe in
the subject line

For more info, see http://www.affug.com
Archive @ http://www.mail-archive.com/discussion%40affug.com/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------





--
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?



-------------------------------------------------------------
To unsubscribe from this list, simply email the list with unsubscribe in the 
subject line

For more info, see http://www.affug.com
Archive @ http://www.mail-archive.com/discussion%40affug.com/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------

Reply via email to