Ol�

Eu fiz alguns questionamentos sobre o desenvolvimento de aplicacoes
cliente/servidor (2-tier) em Java nesta lista, mas acho que fui mal
interpretado, pois foi dito que eu nao sabia Java, ou que estava s�
"querendo fazer barulho", enfim que eu "nao aceitava novas tecnologias"
(ou algo assim) - parece at� que eu tinha blasfemado contra o Java!
Mas nenhuma resposta objetiva de como implementar esse tipo de aplicacoes.

Bem, fiz a mesma pergunta na Usenet (segue abaixo toda a thread - at� agora),
e al�m de n�o ter sido atacado pessoalmente, o pessoal me deu dicas interessantes.

Ou eu sei me expressar melhor em ingles do que em portugues, ou o pessoal da
Usenet tem mais boa-vontade.

Luis Cabral

=== INICIO DA THREAD =====

De:Luis Cabral ([EMAIL PROTECTED])
Assunto:2-tier application
Newsgroups:comp.lang.java.databases
View this article only
Data:2002-02-12 07:44:02 PST

Hi

I want to make a "traditional" 2-tier application, i.e., a client program
that access a database and allows users to query, insert, modify and save
data in relational tables.

In Java, I know I have Swing to build the interface and JDBC to access the
data. But I don't know how to make these two work together... In the examples
I saw you must "manually" take the values of each field and build
the SQL commands (insert, update). I was wondering if there was some API
or something that I could "link" the field on the screen to the database
column, and it automatically would generate on-the-fly the necessary
SQL commands, depending on the user actions. Is there such product (free,
if possible) or I must build my own framework to do that?

Another question: if I was to build such application, but using a more
"modern" technology, what I should use? I was thinking about J2EE, but I
found it too complicated for such a simple application.

Thanks!
Luis Cabral

Message 2 in thread
De:Marc Prud'hommeaux ([EMAIL PROTECTED])
Assunto:Re: 2-tier application
Newsgroups:comp.lang.java.databases
View this article only
Data:2002-02-12 08:19:59 PST


Luis Cabral <[EMAIL PROTECTED]> wrote:
> I want to make a "traditional" 2-tier application, i.e., a client program
> that access a database and allows users to query, insert, modify and save
> data in relational tables.
> In Java, I know I have Swing to build the interface and JDBC to access the
> data. But I don't know how to make these two work together... In the examples
> I saw you must "manually" take the values of each field and build
> the SQL commands (insert, update). I was wondering if there was some API
> or something that I could "link" the field on the screen to the database
> column, and it automatically would generate on-the-fly the necessary
> SQL commands, depending on the user actions. Is there such product (free,
> if possible) or I must build my own framework to do that?

It sounds like you want something like PowerBuild for the Java world. I
don't think there are (yet) any Java tools as sophisticated as
PowerBuilder, but many "enterprise" editions of Java IDEs (like Forte,
Visual Age, JBuilder) include SWING components that can be configured to
be data-bound in the manner you describe.

> Another question: if I was to build such application, but using a more
> "modern" technology, what I should use? I was thinking about J2EE, but I
> found it too complicated for such a simple application.

If you want something more abstract and simple than JDBC, yet not as
heavy as J2EE, you should look into JDO, which is Sun's new
specification for making database access object-oriented and
transparent.

You can download an evaluation of our JDO implementation
at http://www.solarmetric.com: it could save you a lot of time.

--
Marc Prud'hommeaux      [EMAIL PROTECTED]
SolarMetric Inc.        http://www.solarmetric.com
Kodo Java Data Objects  Full featured JDO: eliminate the SQL from your code
Post a follow-up to this message
Message 3 in thread
De:Fredy Fischer ([EMAIL PROTECTED])
Assunto:Re: 2-tier application
Newsgroups:comp.lang.java.databases
View this article only
Data:2002-02-12 13:03:35 PST


>

Just step by at http://www.trash.net/~ffischer/admin
There you find a simple and easy way to do it. It as well generates the code for
you.

Regards

Fredy
Post a follow-up to this message
Message 4 in thread
De:Terry ([EMAIL PROTECTED])
Assunto:Re: 2-tier application
Newsgroups:comp.lang.java.databases
View this article only
Data:2002-02-12 21:16:25 PST


[EMAIL PROTECTED] (Luis Cabral) wrote in message
news:<[EMAIL PROTECTED]>...
> Hi
>
> I want to make a "traditional" 2-tier application, i.e., a client program
> that access a database and allows users to query, insert, modify and save
> data in relational tables.

  I am assuming you are using SQL.
>
> In Java, I know I have Swing to build the interface and JDBC to access the
> data. But I don't know how to make these two work together... In the examples
> I saw you must "manually" take the values of each field and build
> the SQL commands (insert, update). I was wondering if there was some API
> or something that I could "link" the field on the screen to the database
> column, and it automatically would generate on-the-fly the necessary
> SQL commands, depending on the user actions. Is there such product (free,
> if possible) or I must build my own framework to do that?
>

    There are some very interesting frameworks available. Many do
    data binding, which I do not like, since it is static.  But they
    do work.  I like purely dynamic stuff, sinch it is easier to maintain.

    I will give you a free copy of a framework that is client-server,
    and you just enter your data model into the tables, and it builds
    everything on the FLY.  It has Users, Groups, Tables, Fields,
    Searches, Record Locking (both time expiring and self healing) and
    lookups.  It uses a model that a table is an object.

    This version does not have XML wrappers, which will be in a future
    release.  But you should not need them with client server.

    It builds all the SQL on the fly, has ad-hoc reporting, and
    edit screens that will lookup/goto related data.

    You will be able to build a WORLD CLASS application
    without business rules (if this happens then dim that)
    in about 3 hours. I am assuming about 20 tables.

    Ad-hoc reporting is built in, but you are going to have
    to handle custom reports.  Sun does have a nice
    basic setup for this, which is easy to run.  I mostly
    do Rich Text.

    If you are interested, give me a buzz.

    The Footprint is about 500k, and does not grow much.
    The program was written in Java 1.3.1

    The important question is WHAT DATABASE ARE YOU ON.
    NO, they are not all the same.

    Oh, it is purely META data driven.

    [EMAIL PROTECTED]

> Another question: if I was to build such application, but using a more
> "modern" technology, what I should use? I was thinking about J2EE, but I
> found it too complicated for such a simple application.
>
> Thanks!
> Luis Cabral
Post a follow-up to this




------------------------------ LISTA SOUJAVA ---------------------------- 
http://www.soujava.org.br  -  Sociedade de Usu�rios Java da Sucesu-SP 
d�vidas mais comuns: http://www.soujava.org.br/faq.htm
regras da lista: http://www.soujava.org.br/regras.htm
historico: http://www.mail-archive.com/java-list%40soujava.org.br
para sair da lista: envie email para [EMAIL PROTECTED] 
-------------------------------------------------------------------------

Responder a