Thankyou for the thoughtful comments. It strikes me that a JS object
and an Sqlite row map nicely. When I was writing the part of my
application server which encapsulates Sqlite rows in JSON I was struck
by how simple the interface was, particularly compared to XML which
involves a little more attention to create well formed XML and a whole
lot more involvement to parse and generate on the client side. Adding
JSON as an alternative to XML was a good idea.
I do not try to create dynamic HTML pages using JS and use a much
simpler and more efficent application specific language compiled to byte
code (somewhat analogous to Java or VDBE bytecode). At that level JS is
merged into the page in such a way that the JS is matched to the browser
and locale to remove redundancy.
The sophistication in the otherwise simple application specific language
is an inference engine to resolve a knowledge base of rules stored in
the Sqlite database and an event driven capability linked to the
activity of the database.
The same capability which creates dynamic HTML/Javascript will also
generate PostScript to deliver PDF and no doubt other formats which may
show up in the future.
Michael Ruck wrote:
I am all for it and am very interested in your project as I'm working on
something similar. I've been using JS to create dynamic HTML pages in
combination with SQLite using a JSON wrapper from this list. The only issue
I see here is the treatment of JS objects - there's again the OO and
relation mismatch involved. You may need some kind of OO mapper to map to
SQLite tables/views.
HTH,
Mike
-----Ursprüngliche Nachricht-----
Von: John Stanton [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 6. April 2007 02:43
An: sqlite-users@sqlite.org
Betreff: [sqlite] Function Language
I have been looking around at handy way to implement elaborate functions in
Sqlite. Implementing PL/SQL came to mind but recently it struck me that
Javascript has data rules very similar to Sqlite and has the useful property
that all executables are just data.
Does anyone have views for or against Javascript as an embedded language for
realizing functions? I see as a positive its data typing affinity with
Sqlite and its widespread usage and a large base of active programmers.
----------------------------------------------------------------------------
-
To unsubscribe, send email to [EMAIL PROTECTED]
----------------------------------------------------------------------------
-
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------