Re: Using Postgresql as application server - Mailing list pgsql-general

From David Johnston
Subject Re: Using Postgresql as application server
Date
Msg-id 008b01cc5b9d$2d2da160$8788e420$@yahoo.com
Whole thread Raw
In response to Re: Using Postgresql as application server  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-general
-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Merlin Moncure
Sent: Monday, August 15, 2011 6:10 PM
To: David Johnston
Cc: Darren Duncan; pgsql-general@postgresql.org
Subject: Re: [GENERAL] Using Postgresql as application server

On Mon, Aug 15, 2011 at 4:54 PM, David Johnston <polobo@yahoo.com> wrote:
>>>
>>>I believe that it is ideal for Postgres to be computationally
>>>complete in that one *could* use it to implement a complete
>>>application.  That isn't to say one should do this as a matter of
>>>course, good to use appropriate tools for a >>job, but that it should
>>>at least be possible if one wanted to. -- Darren Duncan
>
> So who wants to fund the effort to create the necessary infrastructure to
display a programmer-defined user interface screen (think of the "Forms"
module in Microsoft Access)?  Or are you expecting the end-user to open up
PgAdmin and type "SELECT hello_world();".  I would argue that because
PostgreSQL is able to talk with many languages that can create these "Forms"
(or even - through extensions - a web-browser) that such functionality is
NOT DESIREABLE and thus PostgreSQL would not ideally be "computationally
complete" by that definition.

I've been thinking for a while about doing this: describe the interface in
tables along with some rendering code which directly accepts the request and
spits out some html.  I'd be gunning for something with the speed and ease
of development of delphi, which fwict has never been reproduced.  So you'd
have a 'form' table which you could then bind to a real table via an adapter
or some automatic scaffolding which renders the entry based on the structure
of the table.  Sitting in front of the database would probably be an ultra
thin web server like node.js which just grabs the request and hands it to
the database through a simple connection pool.

merlin

--------------------------------------------------

A more powerful (and complex) solution would be to integrate some form of
"Templating" solution  (e.g., Velocity) and require that the interface
definitions be templates that generate valid HTML upon processing (since
your solution already requires an external web browser anyway).  Hstore and
Cursors (with a named composite type) could be used to feed data into the
template.

David J.



pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: [ADMIN] Using Postgresql as application server
Next
From: Darren Duncan
Date:
Subject: Re: Using Postgresql as application server