You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ted Husted <hu...@apache.org> on 2007/10/03 16:53:46 UTC

Re: [OT] Ajax recommendations for use with Struts1.1

On 9/20/07, Frank W. Zammetti <fz...@omnytex.com> wrote:
> I think that *can* be true if you aren't careful.  The thing that I've
> found people tend to mess up when doing RIA development is that they think
> they need to do things differently than they would if it was a plain
> webapp.  We put in place some relatively simple standards early on and
> they helped immensely.  Things like commenting in the same style as Java,
> always doing everything in an object-oriented way, i.e., create Javascript
> classes for everything and no global-scoped Javascript except where truly
> necessary, develop in Firefox and test in IE (and we gave our developers a
> couple of Firefox tools, Firebug chief among them, to use), and so on.  We
> wound up with, overall, decent code.  Not perfect, but not nearly as bad
> as some other heavily client-based webapps I've seen, and not nearly as
> bad as it could have been given the complexity of the app and the relative
> inexperience in the new technologies of the team.


Just to chime in late ... an Ajax library that does well the sort of
things Frank is describing is the Yahoo User Interface (YUI) Library.
Reading the source for the YUI library is an absolute pleasure!

Earlier this year, my team shipped a .NET application using the JSON
RPC architecture that Frank describes, except that we use Jayrock and
Spring. We used JSON to call from the YUI Ajax pages to "plain old
objects" on the server, that in turn called out to our business logic
and data access layer (classic business facade). Very elegant, very
effective. Though, we did have to reinvent a wheel or two.

What I like about YUI is that I can actually understand (and patch)
the source. I have trouble following the "bouncing ball" in some other
Ajax libraries.

Right now, Struts 2.0 uses Dojo behind the scenes to Ajaxify some of
the tags. But all that has been reduced to a plugin for Struts 2.1,
which opens the door for alternate plugins that use other libraries.
There is already a YUI plugin in the repository, but it only supports
a couple of tags so far.

-Ted.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [OT] Ajax recommendations for use with Struts1.1

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
I plan on using extjs for the last chapter of the book I'm currently
writing as it impressed me quite a bit as well... I won't be using the
AJAX functionality, but as far as widgets go, looks very promising.

To Ted's point though, I haven't checked out the source code... YUI
absolutely has some of the most well-written Javascript you'll find
anywhere... I consider myself quite competent in client-side coding, but
there are some libraries out there that I've had to hack that give me a
headache trying to follow, but YUI doesn't suffer from that in the least. 
Clean, well-documented, as Ted said, a pleasure to deal with whether you
have to modify it or not (I do wish the widgets were more full-featured
and, frankly, cooler-looking, but there's something to be said for
simplicity too).

Frank

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: fzammetti@hotmail.com
Author of "Practical Ajax Projects With Java Technology"
 (2006, Apress, ISBN 1-59059-695-1)
and "JavaScript, DOM Scripting and Ajax Projects"
 (2007, Apress, ISBN 1-59059-816-4)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

On Wed, October 3, 2007 11:35 am, Rick Reumann wrote:
> On 10/3/07, Ted Husted <hu...@apache.org> wrote:
>
>> Just to chime in late ... an Ajax library that does well the sort of
>> things Frank is describing is the Yahoo User Interface (YUI) Library.
>> Reading the source for the YUI library is an absolute pleasure!
>
> Thanks Ted, I'll have to check that out. Right now, I was thinking of
> going with extjs for some things. http://extjs.com/  Pretty neat
> stuff.
>
> Going to check out YUI now.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [OT] Ajax recommendations for use with Struts1.1

Posted by Ted Husted <hu...@apache.org>.
I actually did a lot of work with the DataTable. Again, what I liked
best is that I could follow the source, and extend it. For example, we
created a composite Find/List/Edit/View widget that let us set a list
of fields, field-types, labels, and validators in the JavaScript, and
get a complete CRUD widget in return. There's an early version here:

 * http://yazaar.org/examples/dataform/tutorial-tabview.html

There's no hard-coding of HTML forms here at all, just some settings
in the JavaScript

 * http://yazaar.org/examples/dataform/tutorial-data.js

The example includes static data, but, of course, in production, we
get it from the database. Same difference though. We just pass back a
list via JSON in the same format.

My team is on hiatus now, but when we get back, I'd like to update the
example with the final version.

-Ted.

On 10/3/07, Rick Reumann <ri...@gmail.com> wrote:
> On 10/3/07, Rick Reumann <ri...@gmail.com> wrote:
> >
> >
> > Going to check out YUI now.
>
> So far I haven't been too impressed with their data table models (they
> seem pretty basic, not bad but I don't scrollable tables, movable
> columns, etc, but maybe I'm missing it):
> http://developer.yahoo.com/yui/examples/datatable/index.html
>
> Compared to what you get with extjs. For example, I really like this grid
>
> http://extjs.com/deploy/ext/examples/grid/paging.html
>
> You can see more of the examples here
> http://extjs.com/deploy/ext/docs/index.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
HTH, Ted <http://www.husted.com/ted/blog/>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [OT] Ajax recommendations for use with Struts1.1

Posted by Rick Reumann <ri...@gmail.com>.
On 10/3/07, Rick Reumann <ri...@gmail.com> wrote:
>
>
> Going to check out YUI now.

So far I haven't been too impressed with their data table models (they
seem pretty basic, not bad but I don't scrollable tables, movable
columns, etc, but maybe I'm missing it):
http://developer.yahoo.com/yui/examples/datatable/index.html

Compared to what you get with extjs. For example, I really like this grid

http://extjs.com/deploy/ext/examples/grid/paging.html

You can see more of the examples here
http://extjs.com/deploy/ext/docs/index.html

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [OT] Ajax recommendations for use with Struts1.1

Posted by Rick Reumann <ri...@gmail.com>.
On 10/3/07, Ted Husted <hu...@apache.org> wrote:

> Just to chime in late ... an Ajax library that does well the sort of
> things Frank is describing is the Yahoo User Interface (YUI) Library.
> Reading the source for the YUI library is an absolute pleasure!

Thanks Ted, I'll have to check that out. Right now, I was thinking of
going with extjs for some things. http://extjs.com/  Pretty neat
stuff.

Going to check out YUI now.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org