Re: pengines extension to html_requires

Jan Wielemaker <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
On 02/07/2014 03:34 AM, Anne Ogborn wrote:
> It'd be delightful if pengine code worked with the resources stuff so
> we could use with html generation.

That was in Torbjörn's version by declaring html//1 as safe.  As html//1 
does
a lot of difficult to track meta-calling, it is surely unsafe.  It is
probably also pretty hard to explain enough of it to the sandboxing
system to make it really safe.  Probably it requires a different sandbox
architecture from the start.  That might happen at some point, but not now.

That said, why would you want that?  The idea behind pengines is to
be able to query native Prolog predicates and massage the query result
data into something that the application can use without doing a lot of
additional processing.  That saves exchanging a lot of data and exploits
the fact that Prolog is a lot better in massaging its own data into
ready-to-process stuff for the UI that JavaScript.

If you want to do server-side page generation, why not do it the way
it is described in your tutorial, i.e., just by extending the server?
What do pengines add to this picture.

You may want to mix the two, generating a page from the server and using
pengines to provide AJAX functionality to the page.

	Cheers --- Jan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.