>
> Is there a better way to set up the web service??

Yes: in general, never use 1 ton of frameworks if it can be done in 1 line
of code :)

The answer depends on a hundred different factors (you didn't tell us
anything about the app itself, so it's hard to guess), but if for "better"
you mean "smaller", and you are only planning to retrieve data from the
database (not update), I would just get rid of the ZEND frameworks as a
whole, set up a HTTPservice with resultFormat="text", make a simple PHP
that return a plain CSV with your results (5-6 lines of code), and on
arrival just decode it (split by ",") and assign it to your datasource.

If your data is more sophisticated, you can go up to JSON, but stay away
from using objects as much as possible: use plain arrays, or try to use
really simple object property names ("n" instead of "first_name"), since
they will be used thousand of times in the response (assuming you return
thousands of rows)

In this case, the size of the results (your original question) is exactly
the size of the plain text file/json returned by the php (minus http
compression if applies), no need to SCOUT it :)

https://en.wikipedia.org/wiki/KISS_principle

On Thu, Sep 7, 2017 at 3:28 AM, bilbosax <waspenc...@comcast.net> wrote:

> Javier, thanks for your reply.  I'm sorry, I guess I couldn't figure out
> how
> to use a lot of the suggestions posted.  My app is an AIR app running on a
> mobile device, so there is no browser involved.  If I am missing something,
> if you can think of a way to obtain the amount of data returned to my
> mobile
> device, I would really appreciate any thoughts on that.
>
> You bring up an interesting point though that I wanted to ask you about
> further.  I am using PHP to connect to my MySQL database, and it uses ZEND
> to pass the data back to me using AMF.  When profiling in Scout, i notice
> that during the query it sends a MessageResponder.result back that occupies
> 31MB of space.  When I drill down into the MessageResponder.result, I
> eventually dead end at two entries that say XMLList which occupies 14MB and
> XML which occupies 4MB.
>
> Does this suggest that PHP is packaging and returning the results as XML???
> Is this bad?  Is there a better way to set up the web service??
>
>
>
> --
> Sent from: http://apache-flex-users.2333346.n4.nabble.com/
>

Reply via email to