[x3d-public] SAI, using classes or functions to do PROTOs

John Carlson yottzumm at gmail.com
Sat Nov 6 17:02:03 PDT 2021


AFAIK, programming PROTOs in standard SAI requires dropping into VRML or
XML.   More recent SAI, such as X3DJSAIL or X3DPSAIL uses can make use of
instance collections and setters designed through what I call “builders”. I
do not know which is the preferred mechanism for ECMAScript for the new
standard.   In my VRMLSerializer, I use VRML or       XML.   In my
JavaScriptSerializer, I use builders.   I think we want to have PROTOs as
data.   This kind of excludes classes in ECMAScript unless we support an
entire Abstract Syntax Tree, which is what compilers use to do stuff like
DOM.   DOM is like a generic AST.   There are other ways to parse XML, like
SAX and StAX.  ANTLR 4 takes the SAX approach for parsing in multiple
languages.

It would seem like the SAX method is more effective for really large data
sets, that’s meshes and images for us.  Indeed, X3D is moving away from DOM
for large data sets, and the web is moving towards WASM.  The question I
ask is, can we also keep with simple to parse structures that mere humans
can understand, if not read.   I know that Joe often describes his need to
tweak various codes.   This is a strength of XML, JSON and VRML.

DFDL offers conversions between XML and binary formats, but it would seem
like one needs to be an expert to create DFDL files.

Suggestion:  create user-friendly tools for creating DFDL.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20211106/407b75b8/attachment-0001.html>


More information about the x3d-public mailing list