[NUG] API 2.0

Jon Ogden jogden at mac.com
Wed Mar 13 17:00:23 CDT 2019


I feel your pain, Tim.  I’ve recently been dealing with the need to negotiate Telnet connection control characters.  Normally I’ve ignored them but I had a customer application where the device I was connecting to required an answer when it sent stuff like:  0xFF 0xFD 0x01.  If I don’t respond back properly then it would block the connection.  And since I don’t want my response or those characters in the output being shown to the user, I have had to basically come up with my own buffering and storing the buffer myself.  Seems like it works OK.  I’ve never moved to the Xojo.Net.TCPSocket since it doesn’t have a listen method and it’s a PITA to read stuff into a memory block.  Seems like Xojo just didn’t want to finish the development and give text or string out to the user.

And yeah, now what do you do since you’ve done all the work to migrate and now it’s abandoned for the most part.  Code gets messy.



> On Mar 13, 2019, at 3:38 PM, Tim Streater <timstreater at greenbee.net> wrote:
> 
> On 13 Mar 2019, at 19:36, Jon Ogden via Nug <nug at xojousers.com <mailto: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-- 
> Nug mailing list
> Nug at xojousers.com <mailto:Nug at xojousers.com>
> http://mail.xojousers.com/mailman/listinfo/nug_xojousers.com <http://mail.xojousers.com/mailman/listinfo/nug_xojousers.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.xojousers.com/pipermail/nug_xojousers.com/attachments/20190313/598d8151/attachment.htm>


More information about the Nug mailing list