Components not an IDE?

Richard Gaskin ambassador at fourthworld.com
Tue Nov 24 11:58:45 EST 2015


David Bovill wrote:
> Richard below I am actually suggesting using npm as is - not simply
> implementing a library in LiveCode. That way any node developer could get
> up and running using LiveCode with a single "npm install livecode" call.
> The Livecode package would be described in package.json and would install
> the needed binaries / engines.

Unless LiveCode objects are directly interoperable with Node.js, what is 
the advantage of that format?

JSON is a great solution for exchanging data between programs that don't 
need to know much about each other's internals, a more streamlined 
alternative to the role XML played just a few years ago.

Useful as plain-text representations are for exchanging data, programs 
generally don't actually use the data until it's been de-serialized from 
its plain-text format into a local object/array.

MongoDB uses BSON ("Binary JSON") for more efficient storage and 
transfer, and in LiveCode we have what I like to call "LSON", 
associative arrays serialized into a compact binary form with the 
arrayEncode function.

The engine-level support for LSON is robust and very efficient, 
performing probably at least an order of magnitude over any plain-texxt 
representation like JSON.

The code to serialize and deserialize LSON is already written in C++ and 
compiled into machine code in the engine - and better still, 
field-tested for many years.

We have several JSON libraries in the community, and while they're 
becoming more robust and efficient I don't believe it will ever be 
possible for any scripted solution to perform as well as what we can do 
today with LSON.

I appreciate the benefits of using existing standards, even de facto 
ones, where relevant; for this reason I submitted an enhancement request 
for BSONencode and BSONdecode as options for workflows where we 
currently use only arrayEncode and arrayDecode:
<http://quality.livecode.com/show_bug.cgi?id=15678>

But unless the data contained within the format is useful within the 
system for which the package manager was designed, it would seem the 
benefits would be limited, and ultimately whether we choose npm or apt 
or rpm would make little difference.

All that said, my experience with Node.js has been far from hands-on; 
I've read only a hundred pages or so on it, but have never actually used 
it for any practical task.  Is there something in Node.js I may have 
missed that would make it practical to exchange LiveCode objects with it?

-- 
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  Ambassador at FourthWorld.com                http://www.FourthWorld.com




More information about the use-livecode mailing list