Hi Preston,

Like somebody else said, you have to get rid of your JSP/servlet/Struts
mindset.  I also came from a JSP/servlet/Struts background (also WebWork2)
and I learned that you need to throw away pretty much what you have learned.
I am also a Tapestry newbie and it was frustrating at first.  The book,
Tapestry in Action, is a good start but it was just too much information for
a beginner - kind of overwhelming.  However, I stumbled upon an e-book by
Kent Tong that didn't try to explain everything but show "just enough" to
help you understand Tapestry.  He also explains stuff in layman terms which
really helps.  Check out his first 4 free chapters.  In the first chapter,
he shows you how to set up Tapestry with Tomcat so you don't have to restart
you server when you change a Tapestry page.

I totally agree with others Tapestry has a high learning curve.  I
considered myself an intermediate developer and have architected and written
many web applications.  I still haven't figured out what exactly make
Tapestry such a hard framework to learn.  I think part of it is that you are
exposed to and have to understand a lot of interfaces and design patterns
(e.g. IAsset, IRequestCycle, Delegate, IPropertySelectionModel).  It becomes
kind of overwhelming along with having to understand OGNL and trying to
figure out all the pieces and how they fit together (.page, .html, .jwc,
etc).  I also think there just aren't enough good tutorials or books out
there on Tapestry.  Hopefully, this will change soon.

Anyway, I didn't give up and struggled through.  Now I am actually somewhat
productive now.  Hope it gets better...

Ben

> -----Original Message-----
> From: Preston CRAWFORD [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 19, 2005 10:54 PM
> To: [email protected]
> Subject: Re: Tapestry starting to look too steep
> 
> To answer your questions.
> 
> #1 - I have tried starting tomcat in that fashion and I still get the
> same error. As I explained earlier, I followed the directions here
> (http://blog.shadowbox.com/index.php?p=40 ) to try to get this going.
> I couldn't get it to work for some reason.
> 
> #2 - As far as what I'm trying to accomplish? I'm trying to get
> productive in Tapestry as quickly as possible. And in part that means
> that in my development environment I can work in a more rapid fashion.
> With JSP/Struts, etc. if I make changes to the JSP files I simply have
> to create an Ant target that copies the JSP files into the proper
> deployment directory and a refresh of the page does the rest. Here I
> can't seem to get that working. I want to be able to change templates
> and spec files and then be able to see my changes quickly, without
> rebuilding the war, throwing it over the wall to the app server, and
> restarting.
> 
> #3 - Regarding includes. We have the need to have items like a dynamic
> side menu, a dynamic top menu. Items that will be reused over and over
> again. And this could just be a lack of understanding of the Tapestry
> mindset, but we just haven't been able to figure out how to accomplish
> this. I hate to use the JSP paradigm, but in this case you start from
> what you know. And what I know is an include. I'm trying to figure out
> how to accomplish the same functionality in Tapestry. Basically an HTML
> template that can be dropped into any other HTML template, but get
> pre-processed the same way as the HTML template it's been included into.
> A server side include, for lack of a better term.
> 
> I'll take a look at your example in depth later. But this is what I'm
> trying to acheive. And this isn't me saying that Tapestry isn't a good
> framework. I'm not making a judgement call. I like the look of Tapestry.
> But I'm not sure how long it will take to get as productive in it as I
> already am in Struts/JSP, etc.
> 
> Preston
> 
> 
> >>> [EMAIL PROTECTED] 7/19/2005 6:31 PM >>>
> 
> Preston CRAWFORD wrote:
> > I agree that the community is great and that the idea of Tapestry is
> > great. But often times you just need to get stuff done. And right now
> we
> > can't figure out how to get an include into a page (like you'd do
> with a
> > SSI in JSP) where any code gets pre-processed just like the rest of
> the
> > page. And we can't figure out how to restart the Tapestry engine in
> > order to see changes to the spec and template files quickly.
> 
> Q: Have you tried starting tomcat, or your tomcat-plugin, or jetty, or
> resin, or whatever other servlet container you use with the
> -Dorg.apache.tapestry.disable-caching=true option? If what you want is
> to be able to see template/spec changes immediately, this will do the
> trick.
> 
> Regarding preprocessing: as Kevin pointed out... what is it,
> specifically, that you are trying to accomplish? In what manner should
> the stuff be "processed"? And does the "included" file need to be
> chosen
> dynamically? Generally speaking, in tapestry, rather than having a
> single page and including content, you write a border component, which
> is included on the content pages. But, if what you want is to
> dynamically include blocks of html which are processed by tapestry,
> then
> you really need to look at block/renderblock.
> 
> As an example, suppose you had a page with an area for "properties".
> The
> "properties" page/content to be used depends on what type of object is
> being edited by the page. You need the properties portion to be
> fully-functional "tapestry" stuff, but the properties of the various
> objects are so different as to render making a single component to
> handle all of them difficult, messy, etc.  So, you might do something
> like define a "getPropertiesPageName" method in each of the
> object-types
> to edit. This returns the name of a page to edit. Additionally, you
> could define a "getPropertiesBlockName" method, which gets the name of
> the block to edit. Then, in the java class of the page to edit, you
> can
> do something like:
> public IComponent getBlock() {
>    IPage page =
> getRequestCycle().getPage(getObject().getPropertiesPageName());
>    return page.getComponent(getObject().getPropertiesBlockName());
> }
> And in the html file, you could then do:
> 
> <div jwcid="@RenderBlock" block="ognl:block"/>
> 
> voila... you've just included arbitrary content.
> There is a caveat to this approach. Since "activate"
> is never called on the page with the block, methods like
> "pageBeginRender", "pageValidate", etc. are /not/ called by tapestry.
> So, you'll have to exercise a bit of care in how/where you initialize
> things.  But, it does work. :)
> 
> Robert
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to