Обсуждение: web interface for postgreSQL-P.S.

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

web interface for postgreSQL-P.S.

От
"Andrew Dellinger"
Дата:
I need to build a web interface for postgreSQL. Beyond doing something with java, what are my options?
 
I have been playing around with perl, but I can't figure out how to get javascript and perl to interact.
 
PS I need the interface to be dynamic (able to insert and modify data).

Re: web interface for postgreSQL-P.S.

От
Thomas Good
Дата:
On Sat, 16 Dec 2000, Andrew Dellinger wrote:

> I need to build a web interface for postgreSQL.
> Beyond doing something with java, what are my options?
>
> I have been playing around with perl, but I can't figure out how to
> get javascript and perl to interact.

use CGI;

... in your code do the usual
<SCRIPT>
</SCRIPT>

> PS I need the interface to be dynamic (able to insert and modify data).

I run perl CGI scripts for both Postgres and Mumps...samples available.
You will need DBI to use my samples or you can hack them to use
whatever interface you prefer.

--------------------------------------------------------------------
               SVCMC - Center for Behavioral Health
--------------------------------------------------------------------
Thomas Good                          tomg@ { admin | q8 } .nrnet.org
IS Coordinator / DBA                 Phone: 718-354-5528
                                     Fax:   718-354-5056
--------------------------------------------------------------------
Powered by:  PostgreSQL     s l a c k w a r e          FreeBSD:
               RDBMS       |---------- linux      The Power To Serve
--------------------------------------------------------------------


Re: web interface for postgreSQL-P.S.

От
Charles Curley
Дата:
On Sat, Dec 16, 2000 at 07:30:45PM -0500, Andrew Dellinger wrote:
>
>    I need to build a web interface for postgreSQL. Beyond doing something
>    with java, what are my options?
>
>    I have been playing around with perl, but I can't figure out how to
>    get javascript and perl to interact.
>
>    PS I need the interface to be dynamic (able to insert and modify
>    data).

Um, javascript runs on the browser, perl and pgsql on the server, right?
So they communicate via http.

To get perl working with pgsql, get on CPAN and search on "postgres" and
"database". There are at least four libraries that will do the job for
you. For details, see the Perl Cookbook, Tom Christiansen et al.,
O'Reilly, 1998.

--

        -- C^2

No windows were crashed in the making of this email.

Looking for fine software and/or web pages?
http://w3.trib.com/~ccurley
Вложения

Re: web interface for postgreSQL-P.S.

От
Alejandro Fernandez
Дата:
Hi

I'd like to avoid "my language is better than yours" flames, but I think
there's 4 possibilities in a unix based environment. If you're on windows you
could use asp, but I have no idea about how it works, or if there's alibrary
for postgres on it.

PHP: should be very simple to use, I kicked together a little program that read
a select statement into an html table in just a little while (considering I
took ages to download it first). Lots of people use it, and there are good
resources on the net for it: http://www.php.net/

perl: higher learning curve, but quite c like and a lot of people use it. The
libraries that interface with postgres are easy to install and come with redhat
6.2 if that's what you're using. Perl has been around for ages, so it's what
most people use.

python: This is my first choice, being a beginner with this kind of thing. It's
very readable ,and I hear more scalable than perl: at my last job nobody could
understadn the patchwork, humungous perl script that ran the web interfaces
with the database, because the main developer left, and his code was
unreadable, and a collection of quick hacks. Python developers have made a
standard API for all database interfaces, and you can use a standard ODBC
library, so if you switch databases you probably don't have to tweak your code
much. PyGreSQL is a library that only works with postgres, but it doesn't
follow the API spec. It also comes with redhat 6.2, and probably 7.0. I've
given it a try, and it seems usable. A major linux online news/programming site
did a tutorial on that, that showed how to make your first steps with it. I can
dig it up for you if you want.

Java: I know you say you don't want to use java, but it might be worth it, if
the library that interfaces with it is simple. I hear servlets are getting to
be viable, and much quicker than before. Also, your code is going to be
probably more readable, and more scalable.


You can probably find out more by popping a question to the pgsql-interfaces
list, where they should know more.

Ale

On Mon, 18 Dec 2000, you wrote:
> >%_On Sat, Dec 16, 2000 at 07:30:45PM -0500, Andrew Dellinger wrote:
> >
> >    I need to build a web interface for postgreSQL. Beyond doing something
> >    with java, what are my options?
> >
> >    I have been playing around with perl, but I can't figure out how to
> >    get javascript and perl to interact.
> >
> >    PS I need the interface to be dynamic (able to insert and modify
> >    data).
>
> Um, javascript runs on the browser, perl and pgsql on the server, right?
> So they communicate via http.
>
> To get perl working with pgsql, get on CPAN and search on "postgres" and
> "database". There are at least four libraries that will do the job for
> you. For details, see the Perl Cookbook, Tom Christiansen et al.,
> O'Reilly, 1998.
>
> --
>
>         -- C^2
>
> No windows were crashed in the making of this email.
>
> Looking for fine software and/or web pages?
> http://w3.trib.com/~ccurley

----------------------------------------
Content-Type: application/pgp-signature; name="unnamed"
Content-Transfer-Encoding: 7bit
Content-Description:
----------------------------------------

--
Alejandro Fernandez Bscp 5 Caledonian University
0141 586 3913 - ale@nin.cx

Re: web interface for postgreSQL-P.S.

От
"Brett W. McCoy"
Дата:
On Wed, 20 Dec 2000, Alejandro Fernandez wrote:

> I'd like to avoid "my language is better than yours" flames, but I think
> there's 4 possibilities in a unix based environment. If you're on windows you
> could use asp, but I have no idea about how it works, or if there's alibrary
> for postgres on it.

Just for the record, you can use Perl, PHP, Python, etc on Windows also.
Note ASP can also be done with Perl, not just VBScript, and you can
connect to PostgreSQL via ODBC (or ADO?) in Windows.

-- Brett
                                     http://www.chapelperilous.net/~bmccoy/
---------------------------------------------------------------------------
Put cats in the coffee and mice in the tea!


Re: web interface for postgreSQL-P.S.

От
Jason Davis
Дата:
>Hi
>
>I'd like to avoid "my language is better than yours" flames, but I think
>there's 4 possibilities in a unix based environment.

I haven't seen any mention of the interface language "Heitml" anywhere on
the lists. It is not very widely known as far as I can tell. We use it very
heavily in the web-based billing system used by customers and staff at the
ISP I work for, interfacing to a PostgreSQL database which usually has
around a million transactions and about 20,000 users info sitting on it at
any time. It is very similar in principle to PHP, being a server-side
scripting language CGI on a UNIX box, with the code embedded into HTML
pages, only it is more XML like and therefore a bit more "friendly" to web
designers. It has full programming language capabilities including objects,
and you can communicate to the shell with it as well. There is a one-off
license fee per server which is a slight disadvantage when talking costs.

We have had no problems with reliability or speed in the 3 and a half years
of use. Development is lightning quick.

Check out www.radpage.com for more info...radpage is the visual design tool
for the language.

Just thought it might be another option out there...

regards,
Jason Davis
Database Admin/Programmer
Tas Access
www.tassie.net.au