So, consider this the first salvo in marketing Howard Lewis Ship; more is coming, building on some good notices. You want to build good Tapestry applications ... and I want to help.
The inside scoop on what's happening with Tapestry ... from the creator of the Apache Tapestry framework. Plus all the normal, random thoughts on coding and technology.
Monday, December 22, 2003
Presenting ... my card
Spindle / Tapestry Sweatshirt
Friday, December 19, 2003
Freedom!
Thursday, December 18, 2003
Large scale Tapestry approaches
Their problem, which is not too uncommon, is that they are adding additional lines of business to their existing app. They already have about 100 pages, most of which are CRUD (Create Read Update Delete) for their existing object model.
Now they are adding new lines of business that extend their object model with new subclasses. In many cases, the high level looks very similar, and they are only seeing differences fairly low in the navigation tree. That is, a Work Order looks much like a Purchase Order (with a couple of fields swapped out), and the real differences don't crop up until you drill down to the line item level or below.
So, I came up with some solutions off the top of my head ...
Smart Components
Use the same pages, but have smart components that are responsible for editting the details of the object. These smart components, built around Block and RenderBlock, can mix-and-match a user interface on the fly, drawing appropiate components from Blocks on secondary pages.This kind of approach means that WYSIWYG preview goes out the window, the page becomes a kind of shell whose job is to just set the stage: what object is being editted and how. At multiple layers below, the smart components are complex conditionals to provide the right UI for the particular type of object being editted.
For IW, there might be an EditAnyOrder page used for editting both Work Orders and Purchase Orders. Again, within this single page, and even within components within other components within the page, there will be dynamic logic to choose the right UI (both static and components).
This is a very powerful approach that leverages the dynamic nature of Tapestry. I'm concerned, however, that finding and fixing bugs will be too complex ... that there will be too much detective work to find where a particular text field comes from ... and too many unwanted side-effects of changes because components and code are being shared in an obscure way.
Dynamic Page Assembly
Tapestry has a bunch of hooks that allow a careful developer to extend or even replace the way Tapestry locates page and components specifications and templates. In theory (and I haven't tried this yet), you could magically "brew up" an EditPurchaseOrder page on the fly. The framework would not care that the specifications and even templates were constructed on the fly, rather than read from static files.There could be a bit of magic involved in this ... parsing the page name ("EditPurchaseOrder") to figure out how to create the necessary page (some kind of template for "Edit", plus the PurchaseOrder type, plus specific extensions for editting Purchase Orders). What this kind of mapping would look like is more than I can come up with on my feet.
Template Driven Development
The question is: do you need to really assemble it all on the fly? If you know you are going to need an Edit page for Work Orders and Purchase Orders, can you use a templating system to do it. I've been using XDoclet at work lately, and it seems reasonable to use XDoclet to create page and component specifications from Java classes ... if you can figure out XDoclet and come up with the necessary rules, you could have a single Java class (public abstract class EditAnyOrder ....) and from that, generate more Java classes and page specifications (EditWorkOrder, EditPurchaseOrder).Perhaps Velocity, in the guise of VPP (Velocity Pre-Processor) is more appropriate for generating page and component templates.
I tend to like this solution, because it moves the difficult decision making into the build phase. There are still lots of unknowns.
Other ideas
Long time Tapestry user Jiri Lundak has built a framework on top of Tapestry to address these issues: MetaworkX. I haven't looked at the code or design (yet -- so much to do!) but he's been at this for a while and probably has something clever up his sleeve.Tuesday, December 16, 2003
My visit to Intelligent Works
This wasn't a social trip (though it could have been as Geoff is a cool guy) ... it was a chance to meet with another team of people who are aggresively using Tapestry, and who may be needing Tapestry training in the future (or, potentially, involved in training yet more folks). There's a lot of opportunities brewing north of the border for Tapestry, for myself, and for Intelligent Works, Geoff's company.
There were several people in attendance, here's a writeup from Chris about my talk:
From: Geoff Longman <glongman <at> intelligentworks.com>
Subject: Fw: Howard's talk...
Newsgroups: gmane.comp.java.tapestry.user
Date: Tue, 16 Dec 2003 11:36:12 +0000
We were lucky enough to have Howard pop up to visit Intelligent Works here in Ottawa last weekend and give us a very informative (~4 hour) session focused on Tapestry and Hivemind. I asked Chris Justus, a consultant working with Tapestry here, to jot down his thoughts.. Geoff Geoffrey Longman Intelligent Works Inc. P.S. I agree totally, bit I must add that the Hivemind portion of the session was equally as informative! ----- Original Message ----- From: "Chris Justus" <cjustus <at> alceatech.com> To: <glongman <at> intelligentworks.com> Sent: Tuesday, December 16, 2003 11:26 AM Subject: Howard's talk... > I've been working with Tapestry for 6 months, and we have been building > an application that currently consists of about 100 tapestry pages and 50 tapestry > components... Howard's talk was good in terms of explaining some ideas > and concepts behind Tapestry. Having worked with other frameworks in > the past, I consider the idea of using the jwcid attribute a real > solution to a very real problem of having designers and developers work > together on an application... > > In addition: We are also now at the cusp of some major work in which I > was considering using a body of 30 pages, 30 templates, and 30 class > files as a base for 2 other areas of the application - this would result > in the creation of 200 additional files within the project. I spent 3 > minutes explaining our application to Howard, the internal object model, > and the layout of our tapestry pages... In just a minute or two, Howard > had suggested several alternatives to the plan that was going to be > implemented, which will save us tens of hours up front, and likely > hundreds of hours in maintenance down the road... This provides a very > quantifiable savings on the order of tens of thousands of dollars in > development and maintenance. > > Overall Howard's visit was very beneficial... Anyone doing serious > Tapestry work would be wise to meet with Howard and get feedback on how > they are implementing various aspects of their application... > > Chris >
As usual, I enjoy talking about Tapestry (and HiveMind), especially to an audience that really gets it. I also enjoy hearing about user's business models and making suggestions about how to best use Tapestry. In fact, thinking on my feet there, I came up with some very nifty approaches that I'll summarize soon.
Sunday, December 14, 2003
Tapestry in Action -- First MEAP chapter available
Monday, December 08, 2003
Love to see that support!
Jason Cox, a familiar name on the Tapestry mailing lists, has offered a particularily nice description of the advantages of Tapestry, joining some similar notes by Erik Hatcher and MindBridge. Always nice to see new evangalists come on board!
Friday, December 05, 2003
The Art of Java Web Development
This book covers a number of important open-source frameworks, including Struts, WebWork (1.0) and Tapestry (2.2).
I reviewed the Tapestry chapters over the summer; I was dissapointed that he used such an old release of Tapestry though it probably wasn't reasonable for him to write a book about 3.0 while it is still changing.
I think he hit the major points, but sometimes the focus was off; his examples spent too much code fretting about setting up Log4J (that's what log4.properties is for) which undermines the "hey, where did my code go?" aspect of Tapestry development. If I remember correctly, there was also too much duplicated code concerning database connection pools in the example page classes (that could easily have been moved to the engine or visit -- or in 3.0, to the global object).
I'll need to get a copy of this book to see what's changed since I reviewed it. I'm also hoping he followed my suggestion to reference the substantial improvements in Tapestry 3.0 over Tapestry 2.2.
Still, it's nice that Tapestry is treated to the same level of coverage as Struts, WebWork, Velocity and so forth. And it's great to see anything Tapestry in print.
NHL.com - Powered by Sun, Tapestry and Cayenne
Resting on my laurels (more from my visit to Darden)
Thursday, December 04, 2003
The name: Tapestry
Wednesday, December 03, 2003
Typesetting is happening ... HiveMind still in transition
How odd, I just looked at the Tapestry in Action page, and the picture has changed ...
Nobody told me! Looks like they're matching the color scheme of this blog :-) I don't know, I've worked pretty hard on this book, I think I deserve a better cover illustration ... maybe a charging Samurai warrior with a bloody sword. So far, we've gotten a chick with a goatee (ok, just a bit of background detail near her chin, but that's what it looks like) and now some kind of prancing skirt-wearing type.
Also, just talked to Prashant, my buddy at WebCT: the HiveMind IP transfer (a matter of getting WebCT to sign over the rights to the HiveMind code over to the ASF) is still going on, they've just had office moves, code freezes, and user conferences get in the way -- it's not a high priority item for them. It may take some time (frustrating!) but still sounds like things are happening.
I've been feeling a bit isolated at my day job (temporarily here at NLG). Seems like the other employees here kind of consider the work their day job, they just don't share my (extreme) passion for finding the right solution, for really getting into the meat of things. I haven't found anyone to replace Prashant at WebCT (or Greg Burd at Primix, or Kenny Anderson at Stratus) ... people who really live and breath this stuff, people who enjoy thinking beyond the next line of code.