Template for create/find/display/edit

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I'm just starting another PHP project and can see a familiar task not far on
the horizon. I have several database record tuples that I need to
manipulate - person, department, client, job, etc. - and each one needs a
form where the user can enter new details to create a new tuple in the DB,
another form where the user can enter a name/id/whatever to query the DB
and display the results, another form where the user can modify the
existing details and have the modifications changed in the DB. And so on.

Surely a large percentage of PHP based applications need this kind of
facility? I would expect, therefore, that this task has been solved many
times over and maybe appears in some sort of "template" code? Can anyone
recommend such a thing? Preferably free and with a Postgresql back end?

The email address used to post is a spam pit. Contact me at
http://www.derekfountain.org : <a
href="http://www.derekfountain.org /">Derek Fountain</a>

Re: Template for create/find/display/edit

Astonishing! Dogs scampered and hid under sideboards, hamsters stopped
turning in their wheels, and silence fell as Derek Fountain paused, put
down his Happy Meal, and blurted:

Quoted text here. Click to load it

90% of applications require just that. Which is why it is worth developing
your own code for the purpose and modifying it as required.


You read too far. You should stop the moment you see Von Heler." Archangel
"long lunged  + acting 'interesting' = Von Heler" Football Commentator

Re: Template for create/find/display/edit

Derek Fountain wrote:
Quoted text here. Click to load it
Create your own!

It is easy to do.  You will understand ALL of the code.  You can
design and write to conform to your own standards.

One trick is to build the skeleton code and plug in "JJ" for
each of the variables that you will have to change in your real
code.  (If you are not using English and "JJ" is valid in your
language of choice select any invalid letter pair).

When the time comes to write a "new" program just copy your
skeleton over and with your favorite editor search for "JJ" and
replace each occurrence with the appropriate variable name.


Re: Template for create/find/display/edit

Quoted text here. Click to load it


Dave Patton
Canadian Coordinator, Degree Confluence Project
http://www.confluence.org /
My website: http://members.shaw.ca/davepatton /

Re: Template for create/find/display/edit

Derek Fountain wrote:

Quoted text here. Click to load it

My company has developed such a thing, and though it is not Free Software,
we would likely grant favorable terms to developers who were early
adopters.  We call it "Andromeda", because it is the "first step on a
larger scale".

Coincidentally, it does hit PostgreSQL, we are targetting 7.4.x.  The web
layer is 100% PHP.  

There are a great many advantages to this approach, not the least of which
is that you can boast "This system optimized for any *browser*", because
once you work out a good library you use it for everything.

If you are not able to license the product, I would still be happy to offer
some of my experience.  Central to any product of this nature is the data
dictionary that brings it to life.  Before starting this project I came to
the conclusion that it must be possible to completely specify an entire
application solely in scalar data.  This conclusion is difficult for many
people to accept, but failure to accept it will cripple your efforts.

Also central is the conviction that there are no special or unsolved cases
out there, only cases we may not recognize.  This is also difficult to
accept because it is a direct challenge to that awful beast -- human pride.
It is much easier for me to look at a problem and declare it "special", and
therefore requiring my unmatched brilliance to solve, then to say, "I don't
recognize the pattern, I'll have to dig around and ask, it has probably
been solved before."  

The second idea makes possible the first.  If the universe of database
applications contains a finite number of patterns, then all applications
that can ever be written can be described with a finite set of terms,
combined in infinite ways.  That means you just have to be clever about how
you build your data dictionary, for it embodies your understanding of what
patterns exist and what problems you can solve.

You are welcome to check out our web site (which you can work out from my
anti-bot email in sig block), but alas, only now are we bringing it online,
so it is quite sparse.  We will be adding a new page every day or two for
the next two weeks, and we hope to bring some demo systems up also in the
next two weeks.

Hope this helps, cheers!

Kenneth Downs
Secure Data Software, Inc.

Site Timeline