[flexcoders] [Flex 2 beta 2 - Cairngorm 2 - AMFPHP]
Hello guys, Did someone try to use Cairngom (architectural framework for flex) with AMFPHP ? I ask because I don’t see clearly (in the sample Cairngorm Login) how to change LoginDelegate and Services.mxml to use it with AMFPHP… (for exemple where to introduce the RemotingConnection of Tweenpix (http://www.tweenpix.net/blog/index.php?2006/01/03/543-hello-world-en-amfphp-avec-flex20 )) If you tried one time, coud you explain us please. Thank you, William. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [flexcoders] [Flex 2 beta 2 - Cairngorm 2 - AMFPHP]
Hi William, usually, you would define the AMFPHP interface in Services.mxml, retrieve it via ServiceLocator from your Delegate. But ServiceLocator can only return you either mx.rpc.AbstractService or mx.rpc.http.HTTPService (for Flex2 's out of the box RPC services). However you could create the AMFPHP specific details in your Delegate. But better would be to add a method to Cairngorm's ServiceLocator that either returns a generic object or an object compatible to AMFPHP (RemotingConnection or NetConnection). Let me know how you get on. Best, Alex Alex UhlmannConsultant (Rich Internet Applications)Adobe ConsultingWestpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UKp: +44 (0) 131 338 6969 m: +44 (0) 7917 428 951 [EMAIL PROTECTED] From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of William LambéSent: 25 March 2006 22:10To: flexcoders@yahoogroups.comSubject: [flexcoders] [Flex 2 beta 2 - Cairngorm 2 - AMFPHP] Hello guys, Did someone try to use Cairngom (architectural framework for flex) with AMFPHP ? I ask because I dont see clearly (in the sample Cairngorm Login) how to change LoginDelegate and Services.mxml to use it with AMFPHP (for exemple where to introduce the RemotingConnection of Tweenpix (http://www.tweenpix.net/blog/index.php?2006/01/03/543-hello-world-en-amfphp-avec-flex20 )) If you tried one time, coud you explain us please. Thank you, William. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [flexcoders] [Flex 2 beta 2 - Cairngorm 2 - AMFPHP]
I've forgot to say that I import flash.net.Responder instead of org.nevis.cairngorm.Responder2006/3/26, Oriol Gual <[EMAIL PROTECTED]>: Hi,I've been working also on this, and I couldn't do it with the service locator, cause I didn't know how. I know it's not the best solution but I've defined the gateway in the model locator, and then, on each command I do this: var model:ModelLocator = ModelLocator.getInstance();model.gateway.call( "service.method", new Responder(onResult, onFault), args); My problem now is with VO, I always get a badversion error, and I think I've mapped it correctly at advancedsettings.php, any one has had the same problem?Oriol.2006/3/26, Alex Uhlmann < [EMAIL PROTECTED]>: Hi William, usually, you would define the AMFPHP interface in Services.mxml, retrieve it via ServiceLocator from your Delegate. But ServiceLocator can only return you either mx.rpc.AbstractService or mx.rpc.http.HTTPService (for Flex2 's out of the box RPC services). However you could create the AMFPHP specific details in your Delegate. But better would be to add a method to Cairngorm's ServiceLocator that either returns a generic object or an object compatible to AMFPHP (RemotingConnection or NetConnection). Let me know how you get on. Best, Alex Alex UhlmannConsultant (Rich Internet Applications)Adobe ConsultingWestpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UKp: +44 (0) 131 338 6969 m: +44 (0) 7917 428 951 [EMAIL PROTECTED] From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of William LambéSent: 25 March 2006 22:10To: flexcoders@yahoogroups.comSubject: [flexcoders] [Flex 2 beta 2 - Cairngorm 2 - AMFPHP] Hello guys, Did someone try to use Cairngom (architectural framework for flex) with AMFPHP ? I ask because I don't see clearly (in the sample Cairngorm Login) how to change LoginDelegate and Services.mxml to use it with AMFPHP… (for exemple where to introduce the RemotingConnection of Tweenpix ( http://www.tweenpix.net/blog/index.php?2006/01/03/543-hello-world-en-amfphp-avec-flex20 )) If you tried one time, coud you explain us please. Thank you, William. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service . -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [flexcoders] [Flex 2 beta 2 - Cairngorm 2 - AMFPHP]
Hi,I've been working also on this, and I couldn't do it with the service locator, cause I didn't know how. I know it's not the best solution but I've defined the gateway in the model locator, and then, on each command I do this: var model:ModelLocator = ModelLocator.getInstance();model.gateway.call( "service.method", new Responder(onResult, onFault), args); My problem now is with VO, I always get a badversion error, and I think I've mapped it correctly at advancedsettings.php, any one has had the same problem?Oriol.2006/3/26, Alex Uhlmann <[EMAIL PROTECTED]>: Hi William, usually, you would define the AMFPHP interface in Services.mxml, retrieve it via ServiceLocator from your Delegate. But ServiceLocator can only return you either mx.rpc.AbstractService or mx.rpc.http.HTTPService (for Flex2 's out of the box RPC services). However you could create the AMFPHP specific details in your Delegate. But better would be to add a method to Cairngorm's ServiceLocator that either returns a generic object or an object compatible to AMFPHP (RemotingConnection or NetConnection). Let me know how you get on. Best, Alex Alex UhlmannConsultant (Rich Internet Applications)Adobe ConsultingWestpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UKp: +44 (0) 131 338 6969 m: +44 (0) 7917 428 951 [EMAIL PROTECTED] From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of William LambéSent: 25 March 2006 22:10To: flexcoders@yahoogroups.comSubject: [flexcoders] [Flex 2 beta 2 - Cairngorm 2 - AMFPHP] Hello guys, Did someone try to use Cairngom (architectural framework for flex) with AMFPHP ? I ask because I don't see clearly (in the sample Cairngorm Login) how to change LoginDelegate and Services.mxml to use it with AMFPHP… (for exemple where to introduce the RemotingConnection of Tweenpix ( http://www.tweenpix.net/blog/index.php?2006/01/03/543-hello-world-en-amfphp-avec-flex20 )) If you tried one time, coud you explain us please. Thank you, William. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service . -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [flexcoders] [Flex 2 beta 2 - Cairngorm 2 - AMFPHP]
Just to back up Alex's excellent email here. When Cairngorm used to be used for Flash-based RIA we would use Flash Remoting, Open AMF, etc with success. If you do a search on www.richinternetapps.com (or search my previous emails on Flexcoders) you'll find a reference to the ActionScript 2.0 Dictionary where Alistair McLeod and I posted an email link to the PDF chapter we wrote about this. Back in those days, the ServiceLocator was an ActionScript class, that handled all the complexities associated with creating NetConnections/etc that you assume responsibility for when descending to the detail of Flash Remoting. When working with Flex-based RIA, it's typical to ascend the foodchain towards RemoteObejct, WebService and HTTPService (though not necessary) and so we made the decision in Cairngorm that the ServiceLocator be an MXML implementation, that could allow Flex to do all the heavy-lifting with the RPC Service tags. That way, we didn't have to worry ourselves anymore with NetConnections, and Java object serialisations/etc. However, if you want to use AMFPHP, you can do what many others have done, you can ensure that your ActionScript service locator is able to return these services. You want to hide all the details of service creation and lookup in the ServiceLocator so that your business delegate is immune to the implementation. I know others have done this already ... but if you can share your solution with us, we can ensure that others can leverage from your findings. If you have any more questions, please don't hesitate to ask. Best, Steven Steven WebsterPractice Director (Rich Internet Applications)Adobe ConsultingWestpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UKp: +44 (0) 131 338 6108 m: +44 (0) 7917 428 947 Alex UhlmannSent: 26 March 2006 11:57To: flexcoders@yahoogroups.comSubject: RE: [flexcoders] [Flex 2 beta 2 - Cairngorm 2 - AMFPHP] Hi William, usually, you would define the AMFPHP interface in Services.mxml, retrieve it via ServiceLocator from your Delegate. But ServiceLocator can only return you either mx.rpc.AbstractService or mx.rpc.http.HTTPService (for Flex2 's out of the box RPC services). However you could create the AMFPHP specific details in your Delegate. But better would be to add a method to Cairngorm's ServiceLocator that either returns a generic object or an object compatible to AMFPHP (RemotingConnection or NetConnection). Let me know how you get on. Best, Alex Alex UhlmannConsultant (Rich Internet Applications)Adobe ConsultingWestpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UKp: +44 (0) 131 338 6969 m: +44 (0) 7917 428 951 [EMAIL PROTECTED] From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of William LambéSent: 25 March 2006 22:10To: flexcoders@yahoogroups.comSubject: [flexcoders] [Flex 2 beta 2 - Cairngorm 2 - AMFPHP] Hello guys, Did someone try to use Cairngom (architectural framework for flex) with AMFPHP ? I ask because I dont see clearly (in the sample Cairngorm Login) how to change LoginDelegate and Services.mxml to use it with AMFPHP (for exemple where to introduce the RemotingConnection of Tweenpix (http://www.tweenpix.net/blog/index.php?2006/01/03/543-hello-world-en-amfphp-avec-flex20 )) If you tried one time, coud you explain us please. Thank you, William. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [flexcoders] [Flex 2 beta 2 - Cairngorm 2 - AMFPHP]
Just to make thinks easier to others: PDF chapter: http://www.richinternetapps.com/archives/AS2_DesignPatterns_for_RIA.pdf Code: http://aspatterns.iterationtwo.com/downloads/as2patterns.zipI hope you meant that pdf Steven.Oriol. 2006/3/27, Steven Webster <[EMAIL PROTECTED]>: Just to back up Alex's excellent email here. When Cairngorm used to be used for Flash-based RIA we would use Flash Remoting, Open AMF, etc with success. If you do a search on www.richinternetapps.com (or search my previous emails on Flexcoders) you'll find a reference to the ActionScript 2.0 Dictionary where Alistair McLeod and I posted an email link to the PDF chapter we wrote about this. Back in those days, the ServiceLocator was an ActionScript class, that handled all the complexities associated with creating NetConnections/etc that you assume responsibility for when descending to the detail of Flash Remoting. When working with Flex-based RIA, it's typical to ascend the foodchain towards RemoteObejct, WebService and HTTPService (though not necessary) and so we made the decision in Cairngorm that the ServiceLocator be an MXML implementation, that could allow Flex to do all the heavy-lifting with the RPC Service tags. That way, we didn't have to worry ourselves anymore with NetConnections, and Java object serialisations/etc. However, if you want to use AMFPHP, you can do what many others have done, you can ensure that your ActionScript service locator is able to return these services. You want to hide all the details of service creation and lookup in the ServiceLocator so that your business delegate is immune to the implementation. I know others have done this already ... but if you can share your solution with us, we can ensure that others can leverage from your findings. If you have any more questions, please don't hesitate to ask. Best, Steven Steven WebsterPractice Director (Rich Internet Applications)Adobe ConsultingWestpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UKp: +44 (0) 131 338 6108 m: +44 (0) 7917 428 947 Alex UhlmannSent: 26 March 2006 11:57To: flexcoders@yahoogroups.comSubject: RE: [flexcoders] [Flex 2 beta 2 - Cairngorm 2 - AMFPHP] Hi William, usually, you would define the AMFPHP interface in Services.mxml, retrieve it via ServiceLocator from your Delegate. But ServiceLocator can only return you either mx.rpc.AbstractService or mx.rpc.http.HTTPService (for Flex2 's out of the box RPC services). However you could create the AMFPHP specific details in your Delegate. But better would be to add a method to Cairngorm's ServiceLocator that either returns a generic object or an object compatible to AMFPHP (RemotingConnection or NetConnection). Let me know how you get on. Best, Alex Alex UhlmannConsultant (Rich Internet Applications)Adobe ConsultingWestpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UKp: +44 (0) 131 338 6969 m: +44 (0) 7917 428 951 [EMAIL PROTECTED] From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of William LambéSent: 25 March 2006 22:10To: flexcoders@yahoogroups.comSubject: [flexcoders] [Flex 2 beta 2 - Cairngorm 2 - AMFPHP] Hello guys, Did someone try to use Cairngom (architectural framework for flex) with AMFPHP ? I ask because I don't see clearly (in the sample Cairngorm Login) how to change LoginDelegate and Services.mxml to use it with AMFPHP… (for exemple where to introduce the RemotingConnection of Tweenpix ( http://www.tweenpix.net/blog/index.php?2006/01/03/543-hello-world-en-amfphp-avec-flex20 )) If you tried one time, coud you explain us please. Thank you, William. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service . -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [flexcoders] [Flex 2 beta 2 - Cairngorm 2 - AMFPHP]
Alex,Do you think this approach would apply to socket connections as well. E.g. XMLSocket, or Binary Sockets?My issue is that these socket connections would need to broadcast dataReceived() events. These should be caught by the FrontController, correct? Does it make sense for the ServiceLocator to be broadcasting such events? ScottOn 3/26/06, Alex Uhlmann <[EMAIL PROTECTED]> wrote: Hi William, usually, you would define the AMFPHP interface in Services.mxml, retrieve it via ServiceLocator from your Delegate. But ServiceLocator can only return you either mx.rpc.AbstractService or mx.rpc.http.HTTPService (for Flex2 's out of the box RPC services). However you could create the AMFPHP specific details in your Delegate. But better would be to add a method to Cairngorm's ServiceLocator that either returns a generic object or an object compatible to AMFPHP (RemotingConnection or NetConnection). Let me know how you get on. Best, Alex Alex UhlmannConsultant (Rich Internet Applications)Adobe ConsultingWestpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UKp: +44 (0) 131 338 6969 m: +44 (0) 7917 428 951 [EMAIL PROTECTED] From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of William LambéSent: 25 March 2006 22:10To: flexcoders@yahoogroups.comSubject: [flexcoders] [Flex 2 beta 2 - Cairngorm 2 - AMFPHP] Hello guys, Did someone try to use Cairngom (architectural framework for flex) with AMFPHP ? I ask because I don't see clearly (in the sample Cairngorm Login) how to change LoginDelegate and Services.mxml to use it with AMFPHP… (for exemple where to introduce the RemotingConnection of Tweenpix ( http://www.tweenpix.net/blog/index.php?2006/01/03/543-hello-world-en-amfphp-avec-flex20 )) If you tried one time, coud you explain us please. Thank you, William. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service . -- : : ) Scott -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [flexcoders] [Flex 2 beta 2 - Cairngorm 2 - AMFPHP]
Remember that not everything needs to be shoe-horned into a Cairngorm provided class. I'm going to discuss around a few issues here, and hopefully coalesce a point by the end. First of all, the front controller will tyipcally listen for *user* gestures; button clicks, drag and drops, menu selections, etc. However, when we've been building applications with server-push, or collaborative appliations where one instance of an application wishes to change the state of another running instance, we've certainly broadcast Cairngorm events to our front controller. Hold that thought. Next - the ServiceLocator is really a repository for RPC services, it doesn't have to be where you encapsulate your XML Binary sockets. I'd consider that you create a class of your own devising, that encapsulates everything about the XMLSocket - it opens the socket, stuffs data down it and handles the responses. We've often called these classes "bridge" classes, but you may call them adapters, facades, proxies, services ... let's not get religious about naming. Your business delegate classes could use your "bridges", and once again the business delegate is making use of a different type of service, but hiding the use of that service from the command classes. Your "bridge" class could then more elegantly mutate low-level events (such as dataReceived) into higher-order events (such as QuoteController.STOCK_PRICE_UPDATED) that are broadcast to the front-controller. I feel funny about the ServiceLocator broadcasting these events - it smells like the wrong class responsibility to me, which is an indication of the Extract Class refactoring just waiting to happen (http://www.refactoring.com/catalog/extractClass.html) You may decide to hide the location details of the XML socket into the ServiceLocator - let's leave that as an exercise in readability and maintainability that you decide. So there are many ways to solve this; but I think encapsulation of the XMLSocket comms into a separate class and mutation of protocol-specific events into application-specific events, would be good guideline principles in deciding upon your own design. Good to see you guys all pushing Cairngorm in these new and exciting ways; if this becomes more common use-case for Flex 2.0 development, then we can consider some of your solutions as candidate infrastructure or recommendations. Best wishes, Steven Steven WebsterPractice Director (Rich Internet Applications)Adobe ConsultingWestpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UKp: +44 (0) 131 338 6108 m: +44 (0) 7917 428 947 Alex,Do you think this approach would apply to socket connections as well. E.g. XMLSocket, or Binary Sockets?My issue is that these socket connections would need to broadcast dataReceived() events. These should be caught by the FrontController, correct? Does it make sense for the ServiceLocator to be broadcasting such events? Scott -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.