halley has asked for the wisdom of the Perl Monks concerning the following question:
My goal is to develop a straightforward web-based application.
I am finding a lack of suitable examples from which I can learn "best practices" beyond the barest fundamentals. I understand CGI. I have already set up my database. I know how SELECT and INSERT work. I understand one-to-one, one-to-many and many-to-many relations. I know what placeholders are, and how to use them.
What I don't know is how to architect the application which allows users to manipulate their own records and view others. What kinds of designs contribute to a hard-to-maintain soup of code. What kinds of designs end up hitting the bottlenecks by joining too many tables into queries. What kinds of architecture makes it tough to refactor the data design or the functionality without completely razing the database and starting over.
A brief outline of my desired project application's schema:
-- -- A database of "events" to which a community can contribute. -- -- There are three basic entities: events, agents, and blurbs. -- -- > An event is a unique point of data with a complex structure. -- > An agent is essentially a user who can log into the application. -- > A blurb is a text comment which can be attached to an event. -- > Blurbs know which agent added them. Blurbs can be edited later. -- CREATE TABLE agents ( agentid SERIAL UNIQUE, agent TEXT NOT NULL, biography TEXT, PRIMARY KEY agentid ) ; CREATE TABLE blurbs ( blurbid SERIAL UNIQUE, blurb TEXT NOT NULL, agentid INTEGER NOT NULL REFERENCES agents (agentid), PRIMARY KEY blurbid ) ; CREATE TABLE events ( eventid SERIAL UNIQUE, event TEXT NOT NULL, -- other fields of interest PRIMARY KEY eventid ) ; CREATE TABLE event-blurbs ( eventid INTEGER NOT NULL REFERENCES events (eventid), blurbid INTEGER NOT NULL REFERENCES blurbs (blurbid) ) ;
Most of the examples I have found focus on the basics which I already understand. I would like to find good standalone examples which are between 1000 and 5000 lines of Perl; meaty enough to get something useful about the architecture, not just the syntax to use the primitives. Examples which aren't based on editing purchase orders would be a plus, but maybe I'm asking too much.
I've selected PostgreSQL and Perl (DBI/DBD::Pg and CGI) and Linux, as they're the most friendly to my way of working at home. I know there are alternatives to these but that's not particularly pursuant to my question. I especially don't want to entertain arguments about the superiority or completeness of mySQL or PHP-Nuke or Zope or Java, thanks. ;)
--
[ e d @ h a l l e y . c c ]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: PostgreSQL web application examples?
by Fendaria (Beadle) on Feb 21, 2005 at 19:47 UTC | |
by halley (Prior) on Feb 22, 2005 at 14:36 UTC | |
|
Re: PostgreSQL web application examples?
by punkish (Priest) on Feb 21, 2005 at 21:23 UTC | |
by mpeters (Chaplain) on Feb 21, 2005 at 22:29 UTC | |
|
Re: PostgreSQL web application examples?
by aufflick (Deacon) on Feb 22, 2005 at 00:02 UTC | |
|
Re: PostgreSQL web application examples?
by Tuppence (Pilgrim) on Feb 22, 2005 at 00:08 UTC | |
by halley (Prior) on Feb 22, 2005 at 14:31 UTC | |
|
Re: PostgreSQL web application examples?
by tphyahoo (Vicar) on Feb 23, 2005 at 09:53 UTC | |
|
Re: PostgreSQL web application examples?
by tphyahoo (Vicar) on Feb 24, 2005 at 15:21 UTC |