Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Comments on my HTML frontend to DBM?

0 views
Skip to first unread message

Kirk Is

unread,
Dec 19, 2001, 11:52:39 AM12/19/01
to

Hi, I'm wondering what people think of this one db front end I put
together. I'd like to know if other people might find it useful, if it's
been done (better?) elsewhere, if people have any suggestions for where it
should go...

A description, along with source, can be found at
http://alienbill.com/abp/online/
It's the first entry, "k/db"

The general is that you write up a small text file that describes the
fields of the database. There's then a single cgi program that reads
these files, and presens link to a database for each one. Each database
is a single table, and the main view is an HTML table dumping all the
rows.

One of the cooler things is that it automatically constructs a CGI Form
for the add/edit entry dialog, based on the description file.

There are different "field types": standard textboxes and textareas, a
date textfield (defaults to "today"), a select list with predetermined
options, and a "combo box" where you can enter a new value into the text
field, or select an option which is than javascripted inserted into the
text fied.

Oh, plus with the text fields, any text of the form http://etc
gets turned into a link on the main database view.

The general program is inspired by "ThinkDB" for the Palmpilot, which let
you configure simple single table databases, though it had richer
facilities for designing columns as well as forms (actually, I found the
multiple form editor to be overkill) The entire thing is just a frontend
for dbm, I map it to a hash (constructing keys based on the timestamp and
PID, with values as \n delimited collections of data (doing the
appropriate cleaning first))

I've already found the program to be *very* useful. I've made a
bugtracking database out of it, (actually forked a version, with a new
auto incrementing field), a collection of future entriesd for my
blog, "development notes" (passwords and URLs for work), a log of what
movies I've seen and books I've read, etc. Since I've put it on my own
server, I can get to it from work and from home.

I'm looking for ways of enhancing it. It could use a cleaner, more
flexibile "dump to file" capability, and maybe a way of setting up new
tables/db's over the web, rather than having to go and edit the text
files. Currently, the entire program is a single index.cgi file, which
makes it super easy to install, though I might want to move this kind of
'admin' functions to a seperate script. Other ways of expanding it might
be to have the idea of roles, where people can add to db's but not
subtract, and not be 'db admins'. And maybe making it smarter about
different access permissions for different dbs (right now you'd have to
put in seperate instances of the program, and then rely on htpasswd for
protection) Theoretically it could take advantage of a different backend
db as well.

Any feedback is welcome. I'm guessing this isn't of wide enough interest
to really spin off into bona fide open source project project, but the
ability to trivially setup new online data bases, complete with UI, has
scratched a big itch for me, so maybe others would find it useful as well.

--
QUOTEBLOG: http://kisrael.com SKEPTIC MORTALITY: http://kisrael.com/mortal
Life's too short for sentences that begin "life's too short for..."
--Slashdot

news.kc.sbcglobal.net

unread,
Dec 20, 2001, 11:11:51 PM12/20/01
to

"Kirk Is" <kirk...@alienbill.com> wrote in message
news:rB3U7.1322$l2.5...@news.tufts.edu...

That's very interesting. It's just the kind of thing I was looking for for
sometime ago. But then I found using the DBI module with DBD::CSV to use
flat comma seperated value files with sql commands. Also that seemed like a
good intro into using an actual database later( for me Informix some two
monthes later)

Kirk Is

unread,
Dec 21, 2001, 4:50:54 PM12/21/01
to
zen...@highstream.net wrote:

> On Wed, 19 Dec 2001 16:52:39 GMT, Kirk Is <kirk...@alienbill.com>
> wrote:
>>together. I'd like to know if other people might find it useful, if it's
>>been done (better?) elsewhere, if people have any suggestions for where it
>>should go...
>> Each database
>>is a single table, and the main view is an HTML table dumping all the
>>rows.

> I would find it useful to have the HTML output to
> automatically "page" itself , with auto-generated headers and
> footers to go forward and back. (And since it's Christmas, how about
> making the "rows per page" a user set variable?):-)

Is the implication that the script itself is something you find/would find
useful? I haven't gotten much feedback on this, so I kind of assumed that
it was my own little thing up 'til now...

--
QUOTEBLOG: http://kisrael.com SKEPTIC MORTALITY: http://kisrael.com/mortal

Love is two crickets hopping in the same direction --W.T.Vollmann

0 new messages