You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by James Carroll <ji...@microbrightfield.com> on 2003/09/18 18:49:16 UTC
Newbie looking for advice...
Hi, I've been following Tapestry for a while,
and it's time to try it out. I would like to
generate two or three pages which are different
views of a single SQL table.
I find myself spending all day just looking at
all the options on how to do stuff...
I've read most of the tutorials, and looked at
the petshop example. It's got me thinking back
to how easy this was in .php when I did a similar
project in about four hours. But I want to learn
Tapestry because I might port a very large project
that's currently done with .jsp pages.
I want to avoid the complexity and learning curve
of EJBs and J2EE... but I do want to pool my
database connections. I'm happy writing my own
DAO database objects too. I would like to
use MySQL, Jetty along with Tapestry (I think.)
What's the best example / tutorial for me to work
from to get up to speed quickly?
-Jim
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Newbie looking for advice...
Posted by Vince Marco <vm...@mac.com>.
I've done about 4 pretty good size apps now, so I'm pretty new too, but
I think I've carved out a pretty good working base for Tapestry. I
haven't done much in PHP, but that is largely because I haven't found a
single PHP app or example that I find organized or maintainable. Could
be just me, but I doubt it. :-)
>I find myself spending all day just looking at
>all the options on how to do stuff...
>I've read most of the tutorials, and looked at
>the petshop example. It's got me thinking back
>to how easy this was in .php when I did a similar
>project in about four hours. But I want to learn
>Tapestry because I might port a very large project
>that's currently done with .jsp pages.
>
>
My strategy is to deal with webapp basics. This means pages and links
first. I'm porting apps so I save off the HTML from existing pages
first and convert to XHTML. For a new app these could be whipped up in
your favorite web editor (I use Dreamweaver). Next I factor out
components to avoid duplicating HTML between pages (ie. menubars, banner
sections, etc). These components are easy because there is usually no
Java class...just an XML spec and HTML template. Next I configure all
the links: add link components to .page and .jwc files and hook them via
jwcid's in the HTML templates. Then I identify forms, code the action
methods (queries here), and hook up submits. Next I replace captured
text with Insert components to get dynamic content. Lastly I polish off
any details and run down any exceptions.
This process can be done across the board or page-by-page. Usually I
get all the tabbed pages stubbed out then drill into each one. This
gets the site up fast and enables effective iteration.
>I want to avoid the complexity and learning curve
>of EJBs and J2EE... but I do want to pool my
>database connections. I'm happy writing my own
>DAO database objects too. I would like to
>use MySQL, Jetty along with Tapestry (I think.)
>
>
Well, to each his own....but I'd suggest Hibernate or EJBs to handle
data access. Custom DAO classes seem like they are quick but are
generally a sinkhole for debugging. Hibernate is awesome in this
regard. Together Hibernate, SLSB, JavaBean business objects, and
Tapestry stack up to be quite an excellent rapid dev platform.
I know I'm not using all of Tapestry, but that will come over time. It
is making quick, organized work of the immediate tasks....and that is
what I currently need.
Vince
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Newbie looking for advice...
Posted by Harish Krishnaswamy <hk...@comcast.net>.
I don't have a complete tutorial for your situation, but here's what I
would do in your situation.
1. Take a look at any tutorial and build a simple Tapestry page without
the database part first.
2. Then build your DAOs and hook them to your page (No connection
pooling yet). You would use the Global to store your database parameters
and get a connection.
3. Then use a connection pool like DBCP and still use the Global to
store the DataSource and get connections.
Not sure if this is what you were looking for, but hope it helps.
-Harish
James Carroll wrote:
>Hi, I've been following Tapestry for a while,
>and it's time to try it out. I would like to
>generate two or three pages which are different
>views of a single SQL table.
>
>I find myself spending all day just looking at
>all the options on how to do stuff...
>I've read most of the tutorials, and looked at
>the petshop example. It's got me thinking back
>to how easy this was in .php when I did a similar
>project in about four hours. But I want to learn
>Tapestry because I might port a very large project
>that's currently done with .jsp pages.
>
>I want to avoid the complexity and learning curve
>of EJBs and J2EE... but I do want to pool my
>database connections. I'm happy writing my own
>DAO database objects too. I would like to
>use MySQL, Jetty along with Tapestry (I think.)
>
>What's the best example / tutorial for me to work
>from to get up to speed quickly?
>
>-Jim
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Newbie looking for advice...
Posted by Marilen Corciovei <le...@nemesisit.rdsnet.ro>.
You can try my old and simple example here:
http://nemesisit.rdsnet.ro/opendocs/tapehibe2/tapehibe2.html. It is a
simple Tapestry application using Hibernate for database access.
Len
On Thu, 2003-09-18 at 19:49, James Carroll wrote:
> Hi, I've been following Tapestry for a while,
> and it's time to try it out. I would like to
> generate two or three pages which are different
> views of a single SQL table.
>
> I find myself spending all day just looking at
> all the options on how to do stuff...
> I've read most of the tutorials, and looked at
> the petshop example. It's got me thinking back
> to how easy this was in .php when I did a similar
> project in about four hours. But I want to learn
> Tapestry because I might port a very large project
> that's currently done with .jsp pages.
>
> I want to avoid the complexity and learning curve
> of EJBs and J2EE... but I do want to pool my
> database connections. I'm happy writing my own
> DAO database objects too. I would like to
> use MySQL, Jetty along with Tapestry (I think.)
>
> What's the best example / tutorial for me to work
> from to get up to speed quickly?
>
> -Jim
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
Re: Newbie looking for advice...
Posted by "Beton, Richard" <ri...@roke.co.uk>.
Adam Greene wrote:
>Well, as to DAO / Data Access. Many people using Tapestry have done work
>with Hibernate, I personally use Torque, but have been looking at OJB
>lately. Both Torque and OJB are Apache projects (http://db.apache.org).
>I'm not sure where to get Hibernate.
>
>
I haven't used any of Hibernate/Torque/OJB yet but I've been reading up.
This is my summary comparison - please would others comment on whether
I've understood things rightly.
* Hibernate: Java-centric i.e. you write Java data model classes
(JavaBeans) and make them persistent using Hibernate. How the SQL works
under the hood need be of no concern. Not JDO compliant (see below) but
similar in approach. Very good documentation. Very well respected. LGPL.
http://www.hibernate.org/
* Torque: Database-centric: i.e. you write your schema and both the SQL
and the JavaBeans Java source code flow from it. Unlike Hibernate, the
whole schema is in a single file (XML). You don't need to know SQL in
depth but it might help if you have rudimentary knowledge. Good
documentation. Very well respected. Apache Licence.
http://db.apache.org/torque/
* OJB: JDO compliant approach (per http://java.sun.com/products/jdo/),
i.e. broadly similar to Hibernate. Seems to be less popular than
Hibernate (perhaps because Hibernate has been around longer). Apache
Licence.
http://db.apache.org/ojb/
Rick
--
Registered Office: Roke Manor Research Ltd, Siemens House, Oldbury, Bracknell,
Berkshire. RG12 8FZ
The information contained in this e-mail and any attachments is confidential to
Roke Manor Research Ltd and must not be passed to any third party without
permission. This communication is for information only and shall not create or
change any contractual relationship.
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: Newbie looking for advice...
Posted by Adam Greene <ag...@romulin.com>.
Well, as to DAO / Data Access. Many people using Tapestry have done work
with Hibernate, I personally use Torque, but have been looking at OJB
lately. Both Torque and OJB are Apache projects (http://db.apache.org).
I'm not sure where to get Hibernate.
The trick with Tapestry is that you can use anything that conforms to the
JavaBeans standard (as all of these choices do). Using a simple ForEach
component and a Collection of DAO objects, you can easily create a simple
HTML table or if you want to get really snazzy you can use the Table
component (but that takes more work, but provides more functionality).
-----Original Message-----
From: James Carroll [mailto:jim@microbrightfield.com]
Sent: Thursday, September 18, 2003 1:49 PM
To: tapestry-user@jakarta.apache.org
Subject: Newbie looking for advice...
Hi, I've been following Tapestry for a while,
and it's time to try it out. I would like to
generate two or three pages which are different
views of a single SQL table.
I find myself spending all day just looking at
all the options on how to do stuff...
I've read most of the tutorials, and looked at
the petshop example. It's got me thinking back
to how easy this was in .php when I did a similar
project in about four hours. But I want to learn
Tapestry because I might port a very large project
that's currently done with .jsp pages.
I want to avoid the complexity and learning curve
of EJBs and J2EE... but I do want to pool my
database connections. I'm happy writing my own
DAO database objects too. I would like to
use MySQL, Jetty along with Tapestry (I think.)
What's the best example / tutorial for me to work
from to get up to speed quickly?
-Jim
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org