On Thu, Jul 2, 2009 at 5:21 PM, Matthew Ratzloff
<[email protected]>wrote:

> Is the Front Controller pattern + ACL too heavy for what you want to do?
>

No. This is pretty much what I am imagining. The difference is that all
requests will need to be in the form of an argument used in a remote object
call. This is what is a bit confusing for me. I'm thinking about send a
"request" object to the remote method or "service" on the server. Zend_Amf
will deserialize the actionscript request object into a php request object.
This is different than any other AMF remoting examples I can find, but I
think it should work. Just want to get some opinions and more information
before moving forward.

Thanks.

>
> -Matt
>
>
> On Thu, Jul 2, 2009 at 1:24 AM, J DeBord <[email protected]> wrote:
>
>> We're in the design stage of an application that is going to use Adobe
>> Flex / Actionscript for the front end and use AMF to communicate with the
>> server.
>>
>> We need to control access and record information regarding each request
>> made to the server.
>>
>> I am thinking about coding a class that recieves all AMF traffic.
>> Basically all requests coming from the app will call the same remote method
>> (Service). The argment for each request will be a "request" object that will
>> have some basic required attributes such as the name of the user making the
>> request, etc.
>>
>> It will also contain the name of a class and method (controller and
>> action) that is required to carry out whatever action the client is
>> requesting. Any data or variables can be included as other objects in the
>> "request" object and then used by the class method ultimately called on the
>> server.
>>
>> One scenario: A user wishes to upload a file. The client handles all the
>> user interface, creates a request object, creates a Value object for the
>> file information, creates a bytearray of the file, inserts the file value
>> object and the bytearray of the file into the request object and calls the
>> remote service on the server. The request object is sent to the server via
>> AMF, where it is recreated as the corresponding PHP object.
>>
>> Then the class (controller) is created since the request object contains
>> the name of the controller needed, the method (action) needed to save the
>> file is called and the file value object and the bytearray of the file are
>> used as arguments, much like post data would be used.
>>
>> I'll use pieces of the Zend_Framework of course as required.
>>
>> Are there any similar design patterns I should be looking at? Any
>> roadblocks you guys see? Am I thinking wrong about anything here? Anyone
>> doing work with Flex or Flash clients like this?
>>
>> Appreciate your time,
>>
>> Jason
>>
>
>

Reply via email to