Thursday, August 29, 2002

I've been looking at Sun's Java WebServices stuff. Its really neat and its free.
The samples were interesting. The build files seemed to be very broken.
Like maybe somebody changed directory structures completely.
The tutorial examples seem a little messed up as well.
So far, I've been focusing on JAXM.

I wrote two simple clients and a simple server.
One client is a Servlet, and the other client is a Java application.
The examples run under Resin fine.
I've been using the Resin plugin for eclipse, which is very sweet.

Tuesday, August 20, 2002

Updated swing course. Swing is fun. I wonder what SWT is like.
Peter sent me the updates to the example code for CMP/CMR and EJB QL.
The tutorial now works with JBoss.

Friday, August 16, 2002

I am going to become TogetherControl Center Certified. Sounds like fun....
I installed the Resin plugin for Eclipse. I will use that when writing the Resin Official guide. So far it has worked out well. It does not seem to do to much, but what it does it does well. I coverted a few of the Tomcat examples for the Resin book. I am going to go with the Employee listing example for most of the book. I am teaching a course on Java GUIs this week. In a few weeks, I will teach a course on swing. I am also going to be working on the course generator.

Saturday, August 10, 2002

I use to hate XSL and XSLT. But now I am starting to like it. It is so easy to use.
I created two style sheets:
One creates fo for a course workbook
The second one creates fo for a slide set
I created a lesson xml file.
I run the lesson.xml file through xalan using the above two style sheets to generate fo files.
Then I use Apache fop to turn the fo files into PDFs.
The slide set looks just like I did it in power point.
The workbook looks nice too.

Friday, August 09, 2002

Looks like a good project. I wish I had the time. This would be a project I
would like to get involved in. Right now I am knee deep in XSL and FOP (I
worked on this till 5:00AM last night tweaking my FOP files until the
generated PDF looked just like my powerpoint slides). I just finished
working on two chapters for the Tomcat book. And, now I am working on a new
book until December/January (the official Resin guide). After that... I
think I want to update the Java Tools for Extreme Programming to the next
edition (hopefully Nick will want to as well)..... Then after that I want to
work on JYSP:

(from my blog)
I want to create JYSP.... Jython Server Pages. I have been thinking about it
a lot.
It would consist of two things:
1) An Ant task that takes *.jysp files and converts them into Jython based
2) A Servlet that has *.jysp files associated with it. The Servlet (the JYSP
engine), would check to see if the jysp file has already been generated, if
not it would generate the file and then compile it with jythonc.

This will be my next pet project after I finish the others if someone does
not do it first.

Is there a WYSWIG FOP editor?

I was just in Chicago teaching a tutorial at XP Universe.

I added 20+ slides on XDoclet to my Java Tools For Extreme Programming
Presentation/Tutorial for XP Universe. BTW Everyone that attended the tutorial was really interested in XDoclet. I asked for a show of hands for how many people
thought they would use XDoclet, and almost everyone raised their hand.
XDoclet Rocks!

I am going to post the slides on my website with additional links to the
source code. I am going to beef up the XDoclet presentation for the TJug meeting next month.

I have some Custom Tag XDoclet examples, Servlet XDoclet example, and a
detailed CMP/CMR/EJB QL XDoclet example, and a Struts XDoclet example. The Struts and CMP/CMR examples both come complete with an Ant build script that builds the database tables.

The CMP/CMR example has examples of a stateless session bean; 4 entity
beans; with one to one, one to many and many to many relationships; and
plenty o' select & finder methods. It is a fairly complete example.

Look for the source at the bottom of this page (I wrote a 4 part CMP/CMR
tutorial the last two example sources use XDoclet)

The new Tomcat book from Wiley covers XDoclet for Custom Tags, Servlets and
Struts. I wrote the chapter on Ant and Struts. The Ant chapter has the
XDoclet examples. The book is Mastering Tomcat Development by Peter Harrison
et al by Wiley.

The source code for the Struts/XDoclet, Servlet/XDoclet and the Custom Tag
XDoclet can be found here:

The examples are complete in the sense you can run them when you are done.
The Servlet example configures a JDBC resource amongst other useful things.

I'd like to have the examples ship with the distribution if possible. I
think they would help the averagely motivated to get started with XDoclet.

It was neat meeting Kent Beck, and others in person. (Chet H. says he has a copy of our book Java Tools for Extreme Programming and that he uses it as a reference.)

Sunday, August 04, 2002

Response To Erik Hatcher for the Blog notes that I posted on the Tucson JUG on what floats my boat lately.
> Right on! I'm doing the same stuff in my apps.
> Out of curiosity - what Tomcat book?

I wrote two chapters for a Wiley Tomcat book.

Mastering Tomcat Development
Peter Harrison
ISBN: 0-471-23764-7
464 Pages
September 2002

My buddy Tim Ryan asked me to do it.
It was a lot of fun.

I am also coauthoring a new book. I was hoping I could get some technical
feedback on the new book from this group.

> Here is where I draw the line with XDoclet. Its awesome - but where
> metadata should reside really needs to be though through.

Good point.

> mappings in Struts are the "glue" between view/controller essentially
> and I do not feel they belong in the source code.

Makes sense to me. I agree with you.

I reuse forms in
> different action mappings and that should be independent from the source.

You can still reuse forms in various action mappings. The action mapping is
defined in the action class not the form. It was useful for this simple
example app, and I think it would be useful for a lot of the Struts I've
done in the past, but I agree that it would sometimes just not make sense.
(You could always use Ant filters and XDoclets to configure the config file
on a per application level.) I think the same is true with a lot of XDoclet
not just Struts XDoclet support for example CMP/CMR if the RDBMS tables are
different how do you map to both. I think it is the 80/20 rule.

> But.... you can generate action mappings with XDoclet. I don't recall
> the specifics of what you do to configure it with @tags or on what types
> of classes it processes to get them, but it is done and I've complained
> on the XDoclet e-mails lists that this is an abuse of metadata in the
> Java source code.

I think I would use it for most Forms and Actions except a few.

> The next phase of XDoclet is going to evolve it into using Velocity
> templating.

I heard/read this somewhere, but then I wondered when I saw the vDoclet
stuff I thought maybe this was related. Hmmm... sounds like vDoclet is a
branch, and I should probably just stick with the next version of XDoclet
that supports Velocity... unless I really need to create templates soon,
which I don't. I love code generation as you know. :o)

But custom templates are pretty easy in XDoclet with their
> very well done documentation handy.

you are probably right... it failed my fifteen minute test. If I can't
figure it out in fifteen minutes, I put it on my ever increasing TODO list
towards the bottom. :o) It is my triage system. Does your book have some
explanations of XDoclet templates?
I can 't wait to get a copy of your book.

Also, I highly recommend the CVS
> version over the latest release at the moment - its much faster and does
> much better dependency checking. I'm using in production as we speak.

I have a bad habit of waiting for the binary release. This is a corollary to
my fifteen minute rule. Bad Rick!

> > Speaking of Velocity templates, has anyone tried DVSL?
> I've no personal experience with it... but an Ant contributor added some
> slick DVSL stuff to the proposal/xdocs stuff I did to generate Ant
> documentation with XDoclet to turn it into snazzy HTML files and it
> works nicely... so nicely that I haven't looked under the covers of it
> yet. Have a look there for samples if you like.

Sounds cool. I don't like XSLT very much.

> > Oh yeah, I now use Eclipse instead of Netbean thanks to Nick from eBlox
> > who gave me a 1/2 hour lesson on using it. I really dig it. It is so
> > productive. I wish it had JSP support, but it probably does... I just
> > have not found it yet. I can't switch back to NetBeans.
> Oh, and IDEA supports JSP pages too! :))

I downloaded IDEA, but never installed it. It was highly reccommend by a few
people including you.

Eclipse is so snappy, and I hear there are plugins for Tomcat, Resin and
I think I will use it for a while then try IDEA. It took me so long to let
go of NetBeans. When I find something I like, I hate to switch.

Have you tried Eclipse?

Another thing that floats my boat is ObJectRelationalBridge (OJB) by Jakarta. OJB is an Object/Relational mapping tool that allows transparent persistence for Java Objects against relational databases. It does not quite support JDO complety but it looks promising.

I am really into XDoclet. I had a lot of success with the EJB CMP/CMR and XDoclet. Erik Hatcher's enthusiam for XDoclet finally caught on... I hate it when he is happens so often though. :o)

When I was asked to write an Ant chapter for a Tomcat book, I decided to use XDoclet to generate the web application deployment descriptor. Since XDoclet has a webdoclet ant task and the book was covering Tomcat and already covered web applications, XDoclet seemed like a perfect fit. It was so easy to use with Servlets that I decided to write a section on using XDoclet with Custom tags. This was also flawless and easy. Then I was asked to write an intro to Struts for the same Tomcat book. Again I used XDoclet it did not quite work. It did not generate the attribute for the ActionMapping, but it did generate everything else. Not perfect, but not bad. I used the last production release of XDoclet not the CVS head... I know what a coward.

I have used XDoclet, but I have not defined my own custom templates with XDoclet yet. I looked at some of the templates and they look scary complicated.... I know what a coward. I saw Vdoclet, which is similar to XDoclet but uses Velocity templates, which looks less convoluted than the XDoclet templates to me (opinion not based on fact just gut feeling). Has anyone tried VDoclets? (Warner enthusiam for Velocity is finally catching on....)

Speaking of Velocity templates, has anyone tried DVSL? DVSL is an XSLT replacement that uses Velocity templates instead of XSL based XML for XML transformations. I did not like Velocity as a replacement for JSP, but XML transformation and code generation seem like a good fit for it (opinion based on my fondness for JSP and custom tags just a gut feeling). I know XSLT, but I am not a fan if you know what I mean. Like XDoclet templates, XSLT seems a little convoluted and DVSL seems like a better fit.

Another thing that floats my boat is ObJectRelationalBridge (OJB) by Jakarta. OJB is an Object/Relational mapping tool that allows transparent persistence for Java Objects against relational databases. It does not quite support JDO complety but it looks promising. I've studied and played with JDO a lot lately, I am not 100% sold, I still really like CMP/CMR and EJB QL.

Oh yeah, I now use Eclipse instead of Netbean thanks to Nick from eBlox who gave me a 1/2 hour lesson on using it. I really dig it. It is so productive. I wish it had JSP support, but it probably does... I just have not found it yet. I can't switch back to NetBeans.

I tried the new Java Fundamentals test at BrainBench, and got the highest score in the USA (first try).
I want to take the new EJB 2.0 test.
I've been working a few chapters in the new Tomcat book.
After using Tomcat more fully, I really appreciate Resin!
Read the IBM tutorial on JDO. JDO is cool.
Why is IPlanet installation so hard?