Re: a web framework for postgresql? - Mailing list pgsql-general

From Peter Wilson
Subject Re: a web framework for postgresql?
Date
Msg-id du4rgl$ofo$1@news.hub.org
Whole thread Raw
In response to a web framework for postgresql?  ("falcon" <shahbazc@gmail.com>)
Responses Re: a web framework for postgresql?  ("falcon" <shahbazc@gmail.com>)
List pgsql-general
falcon wrote:
> Hi,
> Most of the web applications I work on are nothing more than front-ends
> to postgresql.  I have used Perl (CGI), Java, C# and am now looking at
> Django.  Each generation of frameworks lessens the pain of donig
> web-apps, but it still seems redundant.
>
> Does any one know of a framework where the database server (or a
> web/app server integrated with a DB server) serves web pages?  The
> database contains the data-model; names of tables, names of attributes,
> their types, foreign key relationships among tables...that's A LOT of
> information.  Sql query, views or stored procs could serve as 'reports'
> served off the data.  Perhaps the only thing that needs to be outside a
> database is something that describes how the data is to be displayed
> (CSS).  There could be some java/c#/python/ruby/whatever engine which
> takes all the information provided in the database and generate
> html/xhtml, default css, javascript validation, etc....but all that
> should be invisible to the user.
>
> Any one know of such a framework?
>
> (I'm asking this in pgsql because such a framework will have to be
> fairly closely linked to a database...and I mainly use pgsql).
>

I don't know of one - I think I'd be a little uneasy with that kind of model to be honest on several levels.

Complex web applications involve a lot of complex logic, which tends to be very processor intensive. It's good to be
ableto scale such sites by  
adding more processing engines and so partitioning the logic from the database is a good idea.

We use (and wrote) Whitebeam which goes some of the way to providing a framework. It cuts down the amount of database
knowledgeyou need by having a  
defined schema that represents data in a very flexible way (although you are free to develop SQL level applications if
youwant to). Whitebeam uses  
Postgres to model arbitrary things and the relationships between those things. The things can be CMS web pages or
productcatalogues. JavaScript  
(server side) is then used to add the semantic meaning to those things for each application.

The Whitebeam abstraction is higher than SQL (for example it represents arbitrarily deep directories of information and
providesmechanisms for  
searching those) while at the same time being flexible enough to allow a wide range of data-driven applications (CMS,
discussionforums, surveys,  
document repositories etc).

The programme files that drive the application are still stored in the standard file system. You could store those in
thedatabase as well if you  
wanted to but you'd be adding more contention for a central resource. To get the best performance you have to have a
pragmaticapproach to building  
your system.

Most applications also of course have to use other services such as sendmail, spell checkers, image tools. The datbase
isonly one part of the  
solution, although admittedly one you have to get right!

Pete
--
Whitebeam :  (http://www.whitebeam.org)
YellowHawk : (http://www.yellowhawk.co.uk)

pgsql-general by date:

Previous
From: Guido Neitzer
Date:
Subject: Re: a web framework for postgresql?
Next
From: Tony Caduto
Date:
Subject: Special offer with a possible dontation to the project