Also, here is a quick over view of Barracuda:
1) You make some xhtml fragments and save them as html files. That is, you
make your template pieces, but you put them in html files
<html>
<table id="menu">
<tr>
<td>home</td>
<td>sign in</td>
<td>events</td>
</tr>
</table>
</html>
You would then save this as "whatever.html". Do this for all your template
pieces.
Notice id="menu". This identifies the <table> tag element as "menu".
Barracuda will take everything from that tag element only, to its closing
tag element, and will see it as a piece of a dom tree and ignore the other
tags etc(ie it will ignore the <html> tag etc.).
<table id="menu">
<tr>
<td>home</td>
<td>sign in</td>
<td>events</td>
</tr>
</table>
It is only concerned with the pieces you gave id="" to. You then run "ant"
(a "make" tool in java for those who dont know) which compiles these
fragments into xml objects. Now you have a bunch of fragment objects
(template pieces), and you need to put them together on some kind of
"canvas" to make a complete document. In the classes provided by Barracuda,
you obtain a "root" element, which is like a new white canvass an artist
wuold use, and you append (like pin the tail on the donkey) each fragment on
the canvass in the order you want. When the class is called, it renders the
canvass object which renders each fragment on the canvass.
----- Original Message -----
From: "Ted Husted" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 15, 2001 9:34 AM
Subject: Re: Client/Server Side Validation for Struts 1.1
> I've gotten down to a 15,000 foot view of Barracuda, and it looks like
> they are doing some nice work. All things remaining equal, I believe it
> would be better if our approaches were compatible with Barracuda. For
> example, if someone did want to do more with event processing, using as
> much of Barracuda's as we can would be excellent, if nothing else is
> compromised.
>
> I would say that having distinct ActionForm's and databeans are a
> necessary evil, in order to keep Struts loosely coupled with the
> business layer. Though, techniques to generate both from a common
> defination would be a real leap forward.
>
> I'd also say that on a validation error, we should always return exactly
> what the user entered without any transformations. The user's data
> should be considered immutable, except by the user (at least until is
> fully validated and submitted to the business layer), or by some
> client-side helper that did the transformation then and there (which
> would also have to be done server-side since we can't rely on the
> clients!).
>
> David Winterfeldt wrote:
> >
> > I just wanted to put this out there to see what people
> > think since I took the time to look at how Barracuda
> > worked. I like the idea of not having two classes
> > (ActionForm and a data bean), but I guess there will
> > be a few different tools to autogenerate these as time
> > goes by. Do you autogenerate classes based on the xml
> > file? You have all the information in the xml file to
> > make this possible, right? I think most of the issues
> > you mention could be worked around, but you're Mapper
> > idea is much more flexible. Is any source for what
> > you've done available to look at or is it proprietary
> > (I do have the xml file you sent to the list)?
> >
> > David
>