Thread: Language C - Console-based FrontEnd

Language C - Console-based FrontEnd

From
"Marcelo Pereira"
Date:
Hi There,

I'm a PostgreSQL developer, and I use to access the databases from PHP
scripts, almost everything is on PHP, but right now I have to bring up some
'diskless stations', these computers are going to be used to query the
database, like kiosks.

So, unfortunately, theses computers doesn't support X11 and I have to set up
an interface console-based.

I think I will have to program in C, and I know C (more or less). But, which
library's, which this, which that ??

Are there anybody who has experience is this topic ?? I have no idea on
where (and how) to begin.

Thanks in advance,

Marcelo Pereira
Programmer


Re: Language C - Console-based FrontEnd

From
"Tim Barnard"
Date:
We used NCurses and libpq to write our own character-based front-end. Of
course, that still left a whole lot of work to be done :-(

Tim

----- Original Message -----
From: "Marcelo Pereira" <gandalf@sum.desktop.com.br>
To: <pgsql-general@postgresql.org>
Sent: Friday, July 20, 2001 10:46 AM
Subject: [GENERAL] Language C - Console-based FrontEnd


> Hi There,
>
> I'm a PostgreSQL developer, and I use to access the databases from PHP
> scripts, almost everything is on PHP, but right now I have to bring up
some
> 'diskless stations', these computers are going to be used to query the
> database, like kiosks.
>
> So, unfortunately, theses computers doesn't support X11 and I have to set
up
> an interface console-based.
>
> I think I will have to program in C, and I know C (more or less). But,
which
> library's, which this, which that ??
>
> Are there anybody who has experience is this topic ?? I have no idea on
> where (and how) to begin.
>
> Thanks in advance,
>
> Marcelo Pereira
> Programmer
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>


Re: Language C - Console-based FrontEnd

From
"Roderick A. Anderson"
Date:
Sorry I delelted and expunged the origianl messsage.

> > I'm a PostgreSQL developer, and I use to access the databases from PHP
> > scripts, almost everything is on PHP, but right now I have to bring up
> some
> > 'diskless stations', these computers are going to be used to query the
> > database, like kiosks.

I take it running a text based browser on the console isn't an option.
Links and lynx come to mind.
   Links supports frames (which are needed sometimes) but doesn't use
the same keys as lynx.  I haven't used links a lot but it is being
looked at by a few of us that use SQL-Ledger in a similar situation.


Rod
--
                 Remove the word 'try' from your vocabulary ...
                     Don't try.  Do it or don't do it ...
                                Steers try!

                                                            Don Aslett


Re: Language C - Console-based FrontEnd

From
"Roderick A. Anderson"
Date:
On Mon, 23 Jul 2001, Marcelo Pereira wrote:

> Hi,
>
> But I wouldn't like to port my php code. I really would like to make
> another interface. I would like to experience C... but I dunno where
> to start.

I thought PHP was as server side scripting language.  So you would only
have to clean up any stuff that relied on graphics to make it work with
a text based browser.
   I just tried lynx going to a site I know uses PHP and it worked fine.
Only problem was the site used frames. (For some reason links stopped
working on my home system - too many upgrades that appear to have broken
some libraries - so I could not try it.)  But otherwise it worked fine I
just selected the main frame and went right into the site.


Rod
--
                 Remove the word 'try' from your vocabulary ...
                     Don't try.  Do it or don't do it ...
                                Steers try!

                                                            Don Aslett



Re: Language C - Console-based FrontEnd

From
Marcelo Pereira
Date:
Hi Again,

We are working in a big project. Then we have to have the following:

. A huge database;
. A text-based interface to be acessed all around the company. There will
  be a lot of diskless stations (X11 not supported), a lot, to make the
  job easier (The idea is: 'There is a machine near you, always');
. A graphic interface (in planning), wrote in Tcl/tk, Kylix or any graphic
  language (to be defined), to be accessed by administrative depths.
. A web interface, to external persons have access to statistic data.

So, I have a single database and three interfaces. Each one to each type
of depth.

I think it is a good idea. And I have to program the console-based
interface soon. I would like to tell someone who have already used C,
curses and ncurses to program this type of interface.

Thanks in advance,

See ya,

Marcelo Pereira
Programmer

-- Remember that only God and Esc+:w saves.
        __
       (_.\           Marcelo Pereira       |
        / / ___       marcelo@pereira.com   |
       / (_/ _ \__    Matematica/99 - Imecc |
_______\____/_\___)___Unicamp_______________/

--- You, with your fast fingers, wrote:

:> On Mon, 23 Jul 2001, Marcelo Pereira wrote:
:>
:> > Hi,
:> >
:> > But I wouldn't like to port my php code. I really would like to make
:> > another interface. I would like to experience C... but I dunno where
:> > to start.
:>
:> I thought PHP was as server side scripting language.  So you would only
:> have to clean up any stuff that relied on graphics to make it work with
:> a text based browser.
:>    I just tried lynx going to a site I know uses PHP and it worked fine.
:> Only problem was the site used frames. (For some reason links stopped
:> working on my home system - too many upgrades that appear to have broken
:> some libraries - so I could not try it.)  But otherwise it worked fine I
:> just selected the main frame and went right into the site.
:>
:>
:> Rod
:> --
:>                  Remove the word 'try' from your vocabulary ...
:>                      Don't try.  Do it or don't do it ...
:>                                 Steers try!
:>
:>                                                             Don Aslett
:>
:>
:>


Re: Language C - Console-based FrontEnd

From
"Tim Barnard"
Date:
There isn't a sample I could send you that shows how ncurses talks to
postgresql, because it doesn't. Ncurses simply handles the "display" portion
and you use the libpq library from postgresql to communicate with the
backend.

Information on how to use libpq can be found at:
www.postgresql.org/idocs/index.php?libpq.html

Information on NCurses can be found at:
web.cs.mun.ca/~rod/ncurses/ncurses.html

Good luck,

Tim

----- Original Message -----
From: "Marcelo Pereira" <gandalf@sum.desktop.com.br>
To: "Tim Barnard" <tbarnard@povn.com>
Sent: Monday, July 23, 2001 5:04 AM
Subject: Re: [GENERAL] Language C - Console-based FrontEnd


> Hi,
>
> Can you send to me a sample of code ??
> I really would like to receive it...
>
> I will be waiting.
>
> See ya,
>
> Marcelo Pereira
> Programmer
>
> ----- Original Message -----
> From: Tim Barnard <tbarnard@povn.com>
> To: Marcelo Pereira <gandalf@sum.desktop.com.br>
> Cc: <pgsql-general@postgresql.org>
> Sent: Friday, July 20, 2001 7:30 PM
> Subject: Re: [GENERAL] Language C - Console-based FrontEnd
>
>
> > We used NCurses and libpq to write our own character-based front-end. Of
> > course, that still left a whole lot of work to be done :-(
> >
> > Tim
> >
> > ----- Original Message -----
> > From: "Marcelo Pereira" <gandalf@sum.desktop.com.br>
> > To: <pgsql-general@postgresql.org>
> > Sent: Friday, July 20, 2001 10:46 AM
> > Subject: [GENERAL] Language C - Console-based FrontEnd
> >
> >
> > > Hi There,
> > >
> > > I'm a PostgreSQL developer, and I use to access the databases from PHP
> > > scripts, almost everything is on PHP, but right now I have to bring up
> > some
> > > 'diskless stations', these computers are going to be used to query the
> > > database, like kiosks.
> > >
> > > So, unfortunately, theses computers doesn't support X11 and I have to
> set
> > up
> > > an interface console-based.
> > >
> > > I think I will have to program in C, and I know C (more or less). But,
> > which
> > > library's, which this, which that ??
> > >
> > > Are there anybody who has experience is this topic ?? I have no idea
on
> > > where (and how) to begin.
> > >
> > > Thanks in advance,
> > >
> > > Marcelo Pereira
> > > Programmer
> > >
> > >
> > > ---------------------------(end of
broadcast)---------------------------
> > > TIP 1: subscribe and unsubscribe commands go to
majordomo@postgresql.org
> > >
> >
> >
>
>


Re: Language C - Console-based FrontEnd

From
Marcelo Pereira
Date:
Thanks,

I'll check the sites.

See ya,

Marcelo Pereira

-- Remember that only God and Esc+:w saves.
        __
       (_.\           Marcelo Pereira       |
        / / ___       marcelo@pereira.com   |
       / (_/ _ \__    Matematica/99 - Imecc |
_______\____/_\___)___Unicamp_______________/

--- You, with your fast fingers, wrote:

:> There isn't a sample I could send you that shows how ncurses talks to
:> postgresql, because it doesn't. Ncurses simply handles the "display" portion
:> and you use the libpq library from postgresql to communicate with the
:> backend.
:>
:> Information on how to use libpq can be found at:
:> www.postgresql.org/idocs/index.php?libpq.html
:>
:> Information on NCurses can be found at:
:> web.cs.mun.ca/~rod/ncurses/ncurses.html
:>
:> Good luck,
:>
:> Tim
:>
:> ----- Original Message -----
:> From: "Marcelo Pereira" <gandalf@sum.desktop.com.br>
:> To: "Tim Barnard" <tbarnard@povn.com>
:> Sent: Monday, July 23, 2001 5:04 AM
:> Subject: Re: [GENERAL] Language C - Console-based FrontEnd
:>
:>
:> > Hi,
:> >
:> > Can you send to me a sample of code ??
:> > I really would like to receive it...
:> >
:> > I will be waiting.
:> >
:> > See ya,
:> >
:> > Marcelo Pereira
:> > Programmer
:> >
:> > ----- Original Message -----
:> > From: Tim Barnard <tbarnard@povn.com>
:> > To: Marcelo Pereira <gandalf@sum.desktop.com.br>
:> > Cc: <pgsql-general@postgresql.org>
:> > Sent: Friday, July 20, 2001 7:30 PM
:> > Subject: Re: [GENERAL] Language C - Console-based FrontEnd
:> >
:> >
:> > > We used NCurses and libpq to write our own character-based front-end. Of
:> > > course, that still left a whole lot of work to be done :-(
:> > >
:> > > Tim
:> > >
:> > > ----- Original Message -----
:> > > From: "Marcelo Pereira" <gandalf@sum.desktop.com.br>
:> > > To: <pgsql-general@postgresql.org>
:> > > Sent: Friday, July 20, 2001 10:46 AM
:> > > Subject: [GENERAL] Language C - Console-based FrontEnd
:> > >
:> > >
:> > > > Hi There,
:> > > >
:> > > > I'm a PostgreSQL developer, and I use to access the databases from PHP
:> > > > scripts, almost everything is on PHP, but right now I have to bring up
:> > > some
:> > > > 'diskless stations', these computers are going to be used to query the
:> > > > database, like kiosks.
:> > > >
:> > > > So, unfortunately, theses computers doesn't support X11 and I have to
:> > set
:> > > up
:> > > > an interface console-based.
:> > > >
:> > > > I think I will have to program in C, and I know C (more or less). But,
:> > > which
:> > > > library's, which this, which that ??
:> > > >
:> > > > Are there anybody who has experience is this topic ?? I have no idea
:> on
:> > > > where (and how) to begin.
:> > > >
:> > > > Thanks in advance,
:> > > >
:> > > > Marcelo Pereira
:> > > > Programmer
:> > > >
:> > > >
:> > > > ---------------------------(end of
:> broadcast)---------------------------
:> > > > TIP 1: subscribe and unsubscribe commands go to
:> majordomo@postgresql.org
:> > > >
:> > >
:> > >
:> >
:> >
:>
:>