[NUG] API 2.0
Tim Streater
timstreater at greenbee.net
Wed Mar 13 15:38:41 CDT 2019
On 13 Mar 2019, at 19:36, Jon Ogden via Nug <nug at xojousers.com> wrote:
> Most of the Xojo framework will be set aside AFAIK. Auto is deprecated and
> Variants are back. Like you said Text is deemphasized. Xojo.Net.HttpSocket has
> been replaced by URLConnection. Etc.
What I've been doing the last two to three years is re-implementing, in Xojo, an app that I previously implemented as a mixture of JavaScript to present to the user (via a browser window), using AJAX to talk to backend PHP scripts on the user's machine, using an instance of apache talking to localhost to do so. The PHP scripts did all the database and socket stuff.
I found some aspects of Xojo irritating while doing this work:
1) Accumulating text as I read from a socket was slow. Concatenation of Text appears to be very slow.
2) Because of (1) I had to accumulate the text as a memoryblock, then convert to a Xojo.Core.memoryblock so I could apply a TextEncoding and convert to Text. This was also slow when you're reading 5Mbytes of text from a socket, line by line, necessary since the the end-of-data marker is a special line in the text stream.
3) Xojo sockets don't have a getline() method so I had to create my own using socket.readall and then return data line by line, doing timeout and error handling too. Fastest way (performance-wise) at the bottom was to keep this sort of intermediate data in byte arrays.
4) Everything was made worse by the fact that the different frameworks (new and old) didn't always implement the same set of methods.
Now having all this working satisfactorily I'm not in much of a mood to change it.
--
Cheers -- Tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.xojousers.com/pipermail/nug_xojousers.com/attachments/20190313/3962d907/attachment.htm>
More information about the Nug
mailing list