Thread: Best Practice for incremental development

Best Practice for incremental development

From
Phil Campaigne
Date:
I am developing a java/postgresql application using ant and junit.  I
want to deploy tested builds along with matching tables with test data
in them.

What is the best way to deploy the tables and data to postgresql to
match a war file?
thanks,
Phil


Re: Best Practice for incremental development

From
Kragen Sitaker
Date:
On Tue, Jan 13, 2004 at 11:22:57AM -0500, Phil Campaigne wrote:
> I am developing a java/postgresql application using ant and junit.  I
> want to deploy tested builds along with matching tables with test data
> in them.
>
> What is the best way to deploy the tables and data to postgresql to
> match a war file?

I don't know what a war file is, but you can deploy tables and data by
feeding the output of pg_dump to psql.

Re: Best Practice for incremental development

From
Mike Mascari
Date:
Kragen Sitaker wrote:

>On Tue, Jan 13, 2004 at 11:22:57AM -0500, Phil Campaigne wrote:
>
>
>>I am developing a java/postgresql application using ant and junit.  I
>>want to deploy tested builds along with matching tables with test data
>>in them.
>>
>>What is the best way to deploy the tables and data to postgresql to
>>match a war file?
>>
>>
>
>I don't know what a war file is, but you can deploy tables and data by
>feeding the output of pg_dump to psql.
>
>
A war file is a java web archive that's deployable using a servlet
container like Jakarta Tomcat. It's the Java equivalent of a tar archive
with a web.xml file describing how the web application should be
deployed and how to map URLs to servlet classes. A vendor should be able
to construct a distributable WAR file and sell it as a product, for
instance.

If you know the customer has both PostgreSQL installed and a servlet
container, then, optimally, you could develop a distributable WAR
archive that just drops into the servlet container, initializes the
database schema at the appropriate times, and is ready to run. I don't
know what the standard method of accomplishing that is, since presumable
JDBC connection properties have to be initialized appropriately,
appropriate database privileges must be established, etc. So it seems
like those that are deploying the WAR archive are going to have to
meddle with script outside the context of the servlet container anyway,
including possible editing of pg_hba.conf, as an example...

Mike Mascari



Re: Best Practice for incremental development

From
Eric Ridge
Date:
On Jan 13, 2004, at 11:22 AM, Phil Campaigne wrote:

> I am developing a java/postgresql application using ant and junit.  I
> want to deploy tested builds along with matching tables with test data
> in them.
>
> What is the best way to deploy the tables and data to postgresql to
> match a war file?
> thanks,

Evolutionary Database Design, by Martin Fowler:
http://www.martinfowler.com/articles/evodb.html

It's a good read and will probably give you some good ideas.

eric