Thread: Form builder?

Form builder?

From
webb.sprague@gmail.com
Date:
I don't want to revisit or be redundant... but is there a quick and
dirty and cross-platform system for developing user input forms for
Postgres?  Ideally, I am interested in something such that you can give
it ("it" being something like a Python function) a table name,
resulting in a magically appearing input form.  It should be able to
deal with getting the format more or less correct for a datatype, not
displaying system columns, etc, using the system tables to get the
necessary info.

I thought first about hacking xdialog, but they don't have multiple
field forms.  I have looked at wx, but real gui programing is complex
and not general.  Right now I have an ugly hack that writes out a text
file with colon separated lines for each row, with a defaults option so
that you can chain together a set of One-Many forms (eg you enter a
person, then you can cycle through with library books each referencing
that person in a for loop).

I would rather trade ease of use for functionality, if it can get it
90% correct just by the table name and the defaults.  And I refuse to
use XML.  And I want pure Linux.  If I have to develop the darn thing,
of course I am happy to share.

I want to develop an anthropological fieldwork database, but the form
based data entry is important for ease of use.

Cheers.


Re: Form builder?

From
Kenneth Downs
Date:
webb.sprague@gmail.com wrote:

We wrote a system that does exactly that, its called "Andromeda", and it
is GPL.

http://docs.andromeda.com

It uses a data dictionary to do two things: 1) build the database and 2)
generate HTML maintenance forms.  But it can also have multiple virtual
sites going into the same database, so in many cases we have the "admin"
site which is generated for free and then 1 or more public sites reading
the same database but intended for anonymous access.  These other sites
go through a professional design process quite different from the
table-maintence sites.

It also automatically generates links to child and parent tables based
on foreign keys, so for a table "customers" you will see a link
automatically generated for "orders" that goes to that customer's orders.

Our largest project technically has about 290+ tables, our most active
project is a system of about 30 tables in which we've made small hacks
to a couple of pages to enhance the defaults.

The codebase is extremely small.  The main library is less than 10,000
lines, easy to walk through and change.

The default interface has been tested on IE and Firefox, and also
supports keyboard navigation (at least on Firefox).

The project is running on PHP and currently targets postgres.  We run on
Linux.  In principle it can run on Windows but we haven't tried.

If you would like to see a running system I can give you an account any
of our systems under development and you can see it.

>I don't want to revisit or be redundant... but is there a quick and
>dirty and cross-platform system for developing user input forms for
>Postgres?  Ideally, I am interested in something such that you can give
>it ("it" being something like a Python function) a table name,
>resulting in a magically appearing input form.  It should be able to
>deal with getting the format more or less correct for a datatype, not
>displaying system columns, etc, using the system tables to get the
>necessary info.
>
>I thought first about hacking xdialog, but they don't have multiple
>field forms.  I have looked at wx, but real gui programing is complex
>and not general.  Right now I have an ugly hack that writes out a text
>file with colon separated lines for each row, with a defaults option so
>that you can chain together a set of One-Many forms (eg you enter a
>person, then you can cycle through with library books each referencing
>that person in a for loop).
>
>I would rather trade ease of use for functionality, if it can get it
>90% correct just by the table name and the defaults.  And I refuse to
>use XML.  And I want pure Linux.  If I have to develop the darn thing,
>of course I am happy to share.
>
>I want to develop an anthropological fieldwork database, but the form
>based data entry is important for ease of use.
>
>Cheers.
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 2: Don't 'kill -9' the postmaster
>
>


Attachment

Re: Form builder?

From
John DeSoi
Date:
On Jun 22, 2006, at 7:38 AM, Kenneth Downs wrote:

> We wrote a system that does exactly that, its called "Andromeda",
> and it is GPL.
>
> http://docs.andromeda.com


Sounds interesting but this link does not work (apparently no server
at that address).



John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


Re: Form builder?

From
Kenneth Downs
Date:
John DeSoi wrote:

>
> On Jun 22, 2006, at 7:38 AM, Kenneth Downs wrote:
>
>> We wrote a system that does exactly that, its called "Andromeda",
>> and it is GPL.
>>
>> http://docs.andromeda.com
>
OOPS:

http://docs.secdat.com

>
>
> Sounds interesting but this link does not work (apparently no
> server  at that address).
>
>
>
> John DeSoi, Ph.D.
> http://pgedit.com/
> Power Tools for PostgreSQL
>


Attachment

Re: Form builder?

From
Tony Caduto
Date:
webb.sprague@gmail.com wrote:
> I don't want to revisit or be redundant... but is there a quick and
> dirty and cross-platform system for developing user input forms for
> Postgres?
Don't know if this has already been mentioned, but how about Rekall?
http://www.rekallrevealed.org/kbExec.py#

You could also use Lazarus.
http://www.lazarus.freepascal.org/


--
Tony Caduto
AM Software Design
http://www.amsoftwaredesign.com
Home of PG Lightning Admin for Postgresql
Your best bet for Postgresql Administration


Re: Form builder?

From
webb.sprague@gmail.com
Date:
So far, here are the candidates:  Andromeda, Lazarus, and Rekall.

I was probably fairly inarticulate in my first post, but none of these
seem to meet my criteria for automatic generation of forms based on the
database definition.  Most of the above frameworks have a good deal
more functionality than I need, at least at first.  Really I want to be
able to open, say, ipython and type:

Someobject.form(table='sometablename', times=3)

(Maybe at the SQL prompt:  "> \form name=name times=3")

And have it give cycle three times through a reasonable (though
possibly still imperfect) form for entering three rows in table
sometablename.  I don't want to do any developing except for finding
out the table names in the database.  I don't want to drag and drop
forms into a visual editor and hook them up with procedures, and any
extra processing should be done inside the database via triggers,
defaults, etc (so the system would have to handle rollbacks and notices
gracefully).  Speed of data entry is the most important thing in the
form and form chain itself. I have some ideas for chaining together
forms when there are FK's, but I will talk about that later.

I think it may be up to me at this point.  Would anyone else find this
useful?


Re: Form builder?

From
Tony Caduto
Date:
Lazarus or Delphi can do what you want, but you have to code it
yourself, but luckily it's not that difficult
becasue of the database stuff is all based on the tdataset framework.

I do automatic form generation from a table in PG Lightning Admin and
it's not that difficult at all.
You simply loop through the fields and depending on what type they are
you dynamically create
the visual components/widgets you need.

I could probably whip up a simple example in Lazarus if you wanted.

Later,

Tony

webb.sprague@gmail.com wrote:
> So far, here are the candidates:  Andromeda, Lazarus, and Rekall.
>
> I was probably fairly inarticulate in my first post, but none of these
> seem to meet my criteria for automatic generation of forms based on the
> database definition.  Most of the above frameworks have a good deal
> more functionality than I need, at least at first.  Really I want to be
> able to open, say, ipython and type:
>
> Someobject.form(table='sometablename', times=3)
>
> (Maybe at the SQL prompt:  "> \form name=name times=3")
>
> And have it give cycle three times through a reasonable (though
> possibly still imperfect) form for entering three rows in table
> sometablename.  I don't want to do any developing except for finding
> out the table names in the database.  I don't want to drag and drop
> forms into a visual editor and hook them up with procedures, and any
> extra processing should be done inside the database via triggers,
> defaults, etc (so the system would have to handle rollbacks and notices
> gracefully).  Speed of data entry is the most important thing in the
> form and form chain itself. I have some ideas for chaining together
> forms when there are FK's, but I will talk about that later.
>
> I think it may be up to me at this point.  Would anyone else find this
> useful?
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>
>

--
Tony Caduto
http://www.amsoftwaredesign.com
Home of PG Lightning Admin for Postgresql 8.x


Re: Form builder?

From
Kenneth Downs
Date:
webb.sprague@gmail.com wrote:

>So far, here are the candidates:  Andromeda, Lazarus, and Rekall.
>
>I was probably fairly inarticulate in my first post, but none of these
>seem to meet my criteria for automatic generation of forms based on the
>database definition.  Most of the above frameworks have a good deal
>more functionality than I need, at least at first.  Really I want to be
>able to open, say, ipython and type:
>
>Someobject.form(table='sometablename', times=3)
>
>(Maybe at the SQL prompt:  "> \form name=name times=3")
>
>And have it give cycle three times through a reasonable (though
>possibly still imperfect) form for entering three rows in table
>sometablename.  I don't want to do any developing except for finding
>out the table names in the database.
>
This is no small task.

I can say with plenty of confidence that we have tried almost every
approach to automating the generation of code.

The problem you run into is that there is no end to the kind of "macros"
that can be made.  What we settled upon was to create the most necessary
and basic stuff, and then to embellish it later as needed.  The two
fundamentals turn out to be a browse of search results and a display of
detail.

For one customer we then experimented with a three-row editable grid of
data from a child table, but found when working with it that users shied
away from it, and back we were to the primitives that have been working
so well since day 1.

All of that being said, if you want to do it yourself, I would still
claim that you'd get there a lot faster adopting Andromeda, because all
you are really trying to do is embellish what we've already done.

Attachment

Re: Form builder?

From
"Webb Sprague"
Date:
> This is no small task.

But that a mans reach should exceed his grasp...

> All of that being said, if you want to do it yourself, I would still
> claim that you'd get there a lot faster adopting Andromeda, because all
> you are really trying to do is embellish what we've already done.

The problem with Andromeda are three fold, the last being trivial and
brekaing the camels back for me:

1.  I don't know Andromeda, while I kind of know Python/Tk

2.  Andromeda is not an item in the standard Linux style toolkit,
while Python/Tkinter is part of the system level installations on most
Linuxes, and is easily installed on Windows and Macs.

3.  I can't get Andromeda to compile on my installation of Gentoo.

I am still figuring out the vagaries of Tkinter, but I think my
approach will involve mapping a little language of table names,
modifiers, and connecting operators  to a sequence of forms.   I think
I can do a little magic in propagating fields chosen in early forms
down to defaults in later forms in a sequence to get the effect of
entering, say, a student and her three classes.

I will announce to the list if I get a working prototype.

w

Re: Form builder?

From
Sandro Dentella
Date:
On Wed, Jun 21, 2006 at 06:07:33PM -0700, webb.sprague@gmail.com wrote:
> I don't want to revisit or be redundant... but is there a quick and
> dirty and cross-platform system for developing user input forms for
> Postgres?  Ideally, I am interested in something such that you can give
> it ("it" being something like a Python function) a table name,
> resulting in a magically appearing input form.  It should be able to
> deal with getting the format more or less correct for a datatype, not
> displaying system columns, etc, using the system tables to get the
> necessary info.

if I understand it correctly I did develop something as you ask... really I
did 2 such things. One is tksql (www.tksql.org) deveoped in tcl/tk. he
development stopeed a couple of years ago at release 0.8 but in perfectly
working state. I've beeing using it in the last 5 years continuesly.

Last autumn after meeting python and GTK I decided to make a fresh new
implementation to overcome some limts. I based it on sqlalchemy so that it is
not specific of postgreSQL... the only problem is that it is not yet
released... write now can edit a db from command line in mask o tabl
flavour. Takes advantage of foreign keys to show correct values.

You can download it and give a try to:

   sqledit postgres://user:pass@host/dbname

Apart from the look and many more controls, an OO implementation,..  you may
first want to look at tksql to get the sempsation of what it does.

I'm working at this project at full time now, with the goal of releasing it
within July, docs in August.


sandro
*:-)


--
Sandro Dentella  *:-)
http://www.tksql.org                    TkSQL Home page - My GPL work