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: Remoting with AMFPHP / ZENDAMF / WEBORB  (Read 12411 times)
Sammi
Courseware Beta
Full Member
***
Posts: 45


View Profile Email
« on: November 21, 2008, 04:00:34 »

Hi,

I am in the process of adding remoting to my PureMVC application and I would like to hear from someone that has been doing that.  I know how to set things up and they work just fine - but there is this one thing:

In past past projects I have been a fan of XML and E4X for searching and filtering the external data. My proxies often have methods to search and filter. But with remoting I don't think the PHP classes can return XML objects - or can they??

How do you do this?  Do you return ArrayCollections or Arrays and then create your own methods to search/filter the data?

And finally.  Which remoting package do you prefer??  I think I like ZendAMF but they are missing a service browser that is extremely helpful when testing the classes.

Best,
Sammi
Logged
hasan
Newbie
*
Posts: 8



View Profile WWW Email
« Reply #1 on: December 10, 2008, 12:16:39 »

Hi Sammi,

I know this is a bit late but, there's nothing wrong with returning an Array/ArrayCollection of VOs, etc. from your services and then using the power of IViewCursor and a Sort to do your searching/filtering ;D

If it has to be XML returns, PHP can return your data formatted as XML if you like. If you're running PHP5, check out SimpleXML, new to version 5, which makes the object creation super easy.

As far as preferences, we currently utilize AMFPHP at my firm and that decision was based on that framework feeling much lighter than its main competitors at the time, WebOrb and CakeAMFPHP. However, with the emergence of ZendAMF, we've begun evaluating it and I must say that I am pleased with what I've seen thus far, despite its shortcomings (no service browser, no AMFext support, etc). It has the same lightweight feel that drew us to AMFPHP initially.


Logged

P E A C E

Hasan
senator_larson
Newbie
*
Posts: 1


View Profile Email
« Reply #2 on: January 28, 2009, 04:46:50 »

I'm a fan of WebORB. It may seem complicated at first, but it's really simple if you're trying to do simple things. It's great because it gives you much more control and information for what's happening on the server. It has logging features which are important if you're trying to debug performance issues. It also generates value objects for you which saves a lot of time. I also like that my flash team can integrate with several languages (php, .Net, Ruby, etc.) so we don't have to change our approach if the server technology changes.

I haven't looked at performance of WebORB vs. PHPAMF but I have looked at the performance of WebORB vs. XML and it is significant. If you're needing to load more than a few hundred rows of data, you'll slow way down with xml. If I remember right, 10,000 rows took 6 seconds with xml and 500 ms with WebORB.
Logged
Joel Hooks
Courseware Beta
Sr. Member
***
Posts: 146


baby steps

 - 46288188  - passport@provinsal.com  - joeltuff
View Profile WWW Email
« Reply #3 on: January 28, 2009, 06:21:03 »

Does WebORB implement amfext? That C extension makes it incredibly fast. I've used it with amfphp. I use PyAMF and the implemented the straight c encoding lately and it makes a noticeable difference.

XML is easy, but in terms of speed it is a real drag.
Logged

http://joelhooks.com - my ramblings about developing with actionscript and python using pureMVC and django respectively.
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #4 on: January 31, 2009, 06:17:52 »

If you need a service browser it doesn't have to come from the AMF framework vendor. Pick up the Charles web debugger - highly recommended and worth paying for. The free version quits after 30 minutes I think.

-=Cliff>
Logged
omar
Newbie
*
Posts: 9


View Profile Email
« Reply #5 on: November 13, 2009, 08:41:44 »

For those still looking for a ZendAMF Service Browser, I just posted one of my newest projects named ZamfBrowser.  It is an AIR ZendAMF service browser, there's some documentation at http://www.zamfbrowser.org.  I put a walk through in the documentation page.  If you wanna leave me some questions you can post them here: http://www.almerblanklabs.com/2009/11/zamfbrowser-1-0-zendamf-service-browser/

Hope you like! :)
Logged
eco_bach
Courseware Beta
Sr. Member
***
Posts: 81


View Profile Email
« Reply #6 on: November 21, 2009, 06:51:49 »

AMFPHP all the way. Finished a project recently using PureMVC and AMF
http://www.growersaunaturale.com/

Although Zend is officially supported by Adobe, I seem to recall AMFphp was written by the same developer ??and has some speed -performance advantages as well


As for debugging remoting projects, can't recommend the java based tool, Service Capture enough
http://www.kevinlangdon.com/serviceCapture/
Logged
omar
Newbie
*
Posts: 9


View Profile Email
« Reply #7 on: November 21, 2009, 07:47:53 »

AMFPHP all the way. Finished a project recently using PureMVC and AMF
http://www.growersaunaturale.com/

Although Zend is officially supported by Adobe, I seem to recall AMFphp was written by the same developer ??and has some speed -performance advantages as well


As for debugging remoting projects, can't recommend the java based tool, Service Capture enough
http://www.kevinlangdon.com/serviceCapture/

AMFPHP is cool, but there are a few caveats everyone should now.

1.  Yes Wade Arnold manages both AMFPHP and ZendAMF.  However, AMFPHP has been in beta for over 2 years, and since Wade took over more than a year ago there have been 0 updates, while ZendAMF has received several.

2.  Yes ZendAMF is supported by Adobe, which is probably why it is getting updates while AMFPHP is not, ZendAMF is backed by Zend, it won't be going to the wayside.

3.  Debugging can now happen with my browser at http://www.zamfbrowser.org.  While things like Service Capture and Charles are nice, those debuggers require you write service implementation code, and they do not generate AS3 code for you.

4.  Upgrade to PHP 5.3 and see what happens to AMFPHP.  Unless you are either a.) willing to maintain AMFPHP beyond PHP 5.2 or b.) willing to not update your server from PHP 5.2, you are stuck with the current server setup and will not be able to upgrade unless you accept one of the two conditions.

So although AMFPHP might seem like the more attractive and comfortable option, ZendAMF does have its advantages.  Personally, I'd rather go with the solution that is actually getting updates and that is officially backed by both Zend and Adobe.  This is why I thought it was absolutely crucial that it have a Service browser, so I made one. 

In the end, its always the developer's choice what they go for, I'm just lettin' ya know why I chose the way I did.
Logged
eco_bach
Courseware Beta
Sr. Member
***
Posts: 81


View Profile Email
« Reply #8 on: November 22, 2009, 07:03:37 »

Some valid points, but not sure what you mean by 'Service Capture and Charles are nice, those debuggers require you write service implementation code'
Also there is a service browser for amfphp
http://5etdemi.com/amfphp2/browser/
Logged
omar
Newbie
*
Posts: 9


View Profile Email
« Reply #9 on: November 23, 2009, 02:03:43 »

Some valid points, but not sure what you mean by 'Service Capture and Charles are nice, those debuggers require you write service implementation code'
Also there is a service browser for amfphp
http://5etdemi.com/amfphp2/browser/

What I meant by that is if you are developing a new backend, and you create some AMFPHP services.  You can debug those services with Charles or Service Capture and see the data going back and forth between the client and server.  However, to get to that point you have to write ActionScript 3 code to actually test the services from an AMF client.  With ZamfBrowser you can just point the browser to your gateway link and test the services with different values, without the need to write any test code.  Then you can generate your AS3 code with ZamfBrowser so you don't have to write all the code to communicate with all your services.  You can't do that with Charles or Service Capture.


Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #10 on: November 23, 2009, 10:05:38 »

This is functionality similar to that of the WebORB Console, which also exposes your service methods and allows you to invoke them with input from the browser.

What we reaaaaaalllly need is a way to view RTMP server-push stuff.

-=Cliff>
Logged
omar
Newbie
*
Posts: 9


View Profile Email
« Reply #11 on: November 23, 2009, 12:26:25 »

Is that a challenge/request I'm hearing??  :o
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #12 on: November 24, 2009, 08:51:36 »

It would certainly give the WebORBians a boot to get things in motion. I'm working on a WebORB project now, and not being able to view the RTMP on all the channels I'm subscribed to is maddening! Charles and ServiceCapture only see the http requests.

-=Cliff>
Logged
Pages: [1]
Print