Thread: platform independent set-up

platform independent set-up

From
jeroen.van.rest@philips.com
Date:
Hi,

We are working on a project that requires a platform-independent collection of modules. For example, we currently have
aprototype version of a front-end running, developed with QT. I've also got postgreSQL running using CygWin. There is
noneed for 
network-functionality, everything should run on one machine, but we want to be able to transfer it completely
(includingdatabase) from WinNT to Linux and back. 
We also need speed in this application. That's why we prefer to code in C(++).

The question now is how to communicate from my front-end to the database and back? I don't know much about this part of
systems,but I guess that ODBC and JDBC are the kind of stuff I need. But I am not sure if they have what I need. I
don'tthink ODBC 
can run on Linux, or that there is a JDBC driver for (postgres on CygWin).

Could anyone assist me here?


Re: platform independent set-up

From
"D. Duccini"
Date:
if you want the fastest and easiest ZERO recompile architecture, consider
using PERL instead of C++


On Thu, 13 Sep 2001 jeroen.van.rest@philips.com wrote:

> Hi,
>
> We are working on a project that requires a platform-independent collection of modules. For example, we currently
havea prototype version of a front-end running, developed with QT. I've also got postgreSQL running using CygWin. There
isno need for 
> network-functionality, everything should run on one machine, but we want to be able to transfer it completely
(includingdatabase) from WinNT to Linux and back. 
> We also need speed in this application. That's why we prefer to code in C(++).
>
> The question now is how to communicate from my front-end to the database and back? I don't know much about this part
ofsystems, but I guess that ODBC and JDBC are the kind of stuff I need. But I am not sure if they have what I need. I
don'tthink ODBC 
> can run on Linux, or that there is a JDBC driver for (postgres on CygWin).
>
> Could anyone assist me here?
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>


-----------------------------------------------------------------------------
david@backpack.com            BackPack Software, Inc.        www.backpack.com
+1 651.645.7550 voice       "Life is an Adventure.
+1 651.645.9798 fax            Don't forget your BackPack!"
-----------------------------------------------------------------------------


Re: platform independent set-up

From
Tomasz Zielonka
Date:
On Thu, Sep 13, 2001 at 03:36:13PM +0200, jeroen.van.rest@philips.com wrote:
> Hi,
>
> [...]
>
> The question now is how to communicate from my front-end to the database and
> back? I don't know much about this part of systems, but I guess that ODBC and
> JDBC are the kind of stuff I need. But I am not sure if they have what I
> need.

> I don't think ODBC can run on Linux, or that there is a JDBC driver for
> (postgres on CygWin).

ODBC works fine on Linux. See http://www.iodbc.org/ for libiodbc. PostgreSQL
specific ODBC driver is in the pgsql main source tree. I know an application
which is used in production environment, which uses Linux+ODBC+PostgreSQL.

tom

--
.signature: Too many levels of symbolic links

Re: platform independent set-up

From
Jason Tan
Date:
On Thu, 13 Sep 2001 jeroen.van.rest@philips.com wrote:

> Hi,
>
> We are working on a project that requires a platform-independent collection of modules. For example, we currently
havea prototype version of a front-end running, developed with QT. I've also got postgreSQL running using CygWin. There
isno need for 
> network-functionality, everything should run on one machine, but we want to be able to transfer it completely
(includingdatabase) from WinNT to Linux and back. 
> We also need speed in this application. That's why we prefer to code in C(++).
>
> The question now is how to communicate from my front-end to the database and back? I don't know much about this part
ofsystems, but I guess that ODBC and JDBC are the kind of stuff I need. But I am not sure if they have what I need. I
don'tthink ODBC 
> can run on Linux, or that there is a JDBC driver for (postgres on CygWin).

I am not sure baout how well teh win side of any psotgres stuff works<
I havent used it.

But if you are using c++ you can access postgres using c/c++ libraries
that are inlcuded with postegres(at elast they are under unix) and
referred to as libpq which also ahs I think a C++ bidning.

You coudl use odbc, which we use for ome projets at work here(thought i
have nto been invlovled with ODBC usage parts).

We also use JDBC to conenct to postgres.

And as alluded to above have also used C/C++ to access postgres via libpq.

All work fairly well, although I think there are some less comoanly parts
of he jdbc interfaces that are not implemtned under psotregs(or at least
there were last time I used it) - I have never suffffered because of this.

I suspect if you want speed then C/C++ is the best best over java, whether
that is directly via libpq or via odbc really depends on your app.

One thing we do with our apps is build our own library of routines for
accessing teh database fucntionality,.

We try to make it very genral and then only use it inteh applciations.
The idea here is if we ever want to move to a different Db, tehn we only
ahve to rewrite the implementationof the libarary as sopposed to re
wreitign large chunks of the app, which is what we woudl ahve to do if we
used libpq directly in the app code.

Anotehr appreoach with simialr benfirts thought nto as generally ueful is
to write a module that directly uses libpq but that does all of the
databse sutff.

Once again you only have to rewrite the module if you decide to change
dbs.

Jason


 >
> Could anyone assist me here?
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>

--
------------------------------------------------------------------------------
Jason Tan                                                jason@rebel.net.au
     "Democracy is two wolves and a lamb voting on what to have for lunch.
                 Liberty is a well-armed lamb contesting the vote."
                               ~Benjamin Franklin, 1759
------------------------------------------------------------------------------