Обсуждение: Character mode forms designer

Поиск
Список
Период
Сортировка

Character mode forms designer

От
Chris Newman
Дата:
I have been working on a simple forms designer using curses and libpq and
now that my initial rush of enthusiasm for this project has subsided I
thought it might be a good time to gather some opinions on how worthwhile
this might be.

Unless I have somehow missed it, I don't recall that there is any software
currently available to allow the development of character mode applications
which connect to a PostgreSQL backend.

However, as the majority of messages to this list concern "pretty"
interfaces, (e.g. pgaccess, pgadmin) I realised it would be worthwhile
checking if others would be interested in this kind of product, or if I am
becoming evermore the minority in preferring terminal use to that wretched
mouse thing. :)

I would be interested to hear both from those who might find a use for such
an application, and any others who have undertaken similar projects.  What
I am looking for, having passed that "Eureka" moment when the first form
query is fetched back successfully, is the motivation to keep going until
it becomes a freely distributable product.

Ideally, I am hoping that there is enough interest to warrant the forming of
a project group to work on this sort of application, be it based on my
prototype or the start of a brand new project.

Please feel free to contact me with any comments.

Chris Newman
--
chris@lightwood.demon.co.uk

Re: [INTERFACES] Character mode forms designer

От
"Billy G. Allie"
Дата:
I create character mode applications using a tool available on System 5
Release 4 based UNIXs (UnixWare, Solaris and others) call FMLI [ Form and Menu
Language Interpreter ].  Communication with the database is through a program
I wrote that is similar to psql, but is designed to function as a co-process
with FMLI.
The program (I call 'getsql') receives SQL queries via STDIN and sends the
results to STDOUT with each field delimited by a TAB or, optionally, any other
character.  After all the rows have been output, a end of rows sentinal is
output to let FMLI that there are no more rows.  Also, special care is taken
to ensure that the output buffers are flushed.

I have also used this program to allow programs such as 'awk' and 'ksh' to
interacte with postgreSQL by running getsql with STDIN and STDOUT attached to
named pipes.

The following shows how I connect to postgreSQL with FMLI.

    banner="CMS Version 2.1"
    title="WLECOME TO"
    columns = 35
    rows=7
    text="
     The Choir Management System

     Copyright 1995
     Billy G. Allie
     All Rights Reserved."
    slk_layout=4-4
    # Create the pipe to the database.
    `cocreate -i PGSQL -e '*** END-OF-ROWS ***' getsql -p -D choir | message`

The following shows how I use a form to update a table in postgreSQL.

    form="Add Entry"
    done=`cosend -n PGSQL "insert into choir values (nextval('id'), ";
        if [ "X$F1" = "X" ];
            then cosend -n PGSQL "NULL, ";
            else cosend -n PGSQL "$F1, ";
        fi;
        cosend PGSQL "'$F3', '$F2', '$mvalue', '$F5');" | message`update
    Name="Folder No:"
    nrow=1
    ncol=1
    frow=1
    fcol=12
    flen=5
    rows=1
    columns=5
    valid=`[ "X$F1" = "X" ] ||
        cosend PGSQL "select val1_id($F1);"`
    invalidmsg="Folder number $F1 already exists!"
    fieldmsg="Enter a unique number."

    Name="Last Name:"
    nrow=2
    ncol=1
    frow=2
    fcol=12
    flen=35
    rows=1
    columns=25
    scroll
    fieldmsg="Enter the last name of the new member."

    [ remaining text removed ... ]

In the preceeding example, $F1 is the contents of Field #1 and val1_id() is a
SQL function that returns the string "TRUE" is $F1 already exists as an ID in
the database or "FALSE" if it does not.

All in all, if you have a need to do character mode applications with
postgreSQL and your system has FMLI, I would recommend using it.  Also, if
there is interest, I will send 'getsql' to the contrib area on the postgreSQL
site.

--
____       | Billy G. Allie    | Domain....: Bill.Allie@mug.org
|  /|      | 7436 Hartwell     | Compuserve: 76337,2061
|-/-|----- | Dearborn, MI 48126| MSN.......: B_G_Allie@email.msn.com
|/  |LLIE  | (313) 582-1540    |



Re: [INTERFACES] Character mode forms designer

От
James Olin Oden
Дата:
> Unless I have somehow missed it, I don't recall that there is any software
> currently available to allow the development of character mode applications
> which connect to a PostgreSQL backend.
>
> However, as the majority of messages to this list concern "pretty"
> interfaces, (e.g. pgaccess, pgadmin) I realised it would be worthwhile
> checking if others would be interested in this kind of product, or if I am
> becoming evermore the minority in preferring terminal use to that wretched
> mouse thing. :)
>

Well, I like both worlds.  Each has its place.  GUI is not the answer
everwhere.  Though, I think a bigger threat to the typical terminal frontends is
not GUI but HTML which can run on GUI or anything.  Beleive me, though, there
are plenty of shops that still have some sort of vertical app that is basically
a terminal application.  The users may have GUI based workstations, but their
company's bread and butter application is accessed via some sort of Terminal
emulation package (like BLAST for instance).

I used to work for a communications company called BLAST (thus the advertisement
above), and a year ago we were still selling plenty of product for terminal
emulation purposes (though filetransfer is really there bag).  Anyway, my only
point is that character based solutions are still viable, just not as
common...james



Re: [INTERFACES] Character mode forms designer

От
JohnDz
Дата:
Your enthusiasm should not be subsided for long as I feel this is a very
worthwhile endeavor, especially since a refurbished wyse50 terminal can
be purchased for about $90. A good application could be developed
without making the customer go broke in the process.

You may want give TCL/Tk another look. PgAccess is a bit more than
"Pretty", it is very much a cross platform application. I am using it
now to connect to a pgSQL database from a Macintosh client and am
impressed with the performance. Best of all, connectivity to the
database has very little overhead, with no need for ODBC.

It would not surprise me a bit if someone out there hasn't already
created a character mode version. I am sure with reasonable effort, an
extension could be created for decent character mode user interfaces. In
a perfect world, Pgaccess or a similar app could run in character mode
with little modification. It seems to me that this is possible.

--
-----------------------------------------------------------------
|John Dzilvelis                                                 |
-----------------------------------------------------------------

Chris Newman wrote:
>
> I have been working on a simple forms designer using curses and libpq and
> now that my initial rush of enthusiasm for this project has subsided I
> thought it might be a good time to gather some opinions on how worthwhile
> this might be.
>
> Unless I have somehow missed it, I don't recall that there is any software
> currently available to allow the development of character mode applications
> which connect to a PostgreSQL backend.
>
> However, as the majority of messages to this list concern "pretty"
> interfaces, (e.g. pgaccess, pgadmin) I realised it would be worthwhile
> checking if others would be interested in this kind of product, or if I am
> becoming evermore the minority in preferring terminal use to that wretched
> mouse thing. :)
>
> I would be interested to hear both from those who might find a use for such
> an application, and any others who have undertaken similar projects.  What
> I am looking for, having passed that "Eureka" moment when the first form
> query is fetched back successfully, is the motivation to keep going until
> it becomes a freely distributable product.
>
> Ideally, I am hoping that there is enough interest to warrant the forming of
> a project group to work on this sort of application, be it based on my
> prototype or the start of a brand new project.
>
> Please feel free to contact me with any comments.
>
> Chris Newman
> --
> chris@lightwood.demon.co.uk

Re: [INTERFACES] Character mode forms designer

От
Anil Amarakoon
Дата:
Hi!
Do you use Tcl/Tk for Mac? have you tries same interface on Windoz??
Tks
Anil

JohnDz wrote:

> Your enthusiasm should not be subsided for long as I feel this is a very
> worthwhile endeavor, especially since a refurbished wyse50 terminal can
> be purchased for about $90. A good application could be developed
> without making the customer go broke in the process.

> It would not surprise me a bit if someone out there hasn't already
> created a character mode version. I am sure with reasonable effort, an
> extension could be created for decent character mode user interfaces. In
> a perfect world, Pgaccess or a similar app could run in character mode
> with little modification. It seems to me that this is possible.
>