Tapestry 5 getting a little better.


Written on October 18, 2006 – 12:00 am | by mpayne

http://howardlewisship.com/screencasts/tap5-classreload-oct2006/tap5-classreload-oct2006.html

It gets the simple
web.xml (with just the listener. Aka webwork 2.2),  dynamic class reloading (aka workwork 2.2), and templates closer
to velocity.  Good stuff, just a year behind many other frameworks.

Can Stripes do this?


Written on September 14, 2006 – 12:00 am | by mpayne

This is a continuation of the previous blog entry in response to Tims blog about the lack of value in having a layer between actions and their results.

Without writing more java code, have a generic action that can be re-used all over the place?

http://sutternow.com/space/Can+Stripes+do+this%3F

In this case, NamedQueryPagingAction can provide generic paging for various "lists" for things throughout the webapp.

Also, Webork’s  xml supports multiple inheritance, so if I want to recast the all same (n number) of actions under /secureStuff and /demo

I can just have a fairly emtpy package statement.

<package name="demo" extends="secureStuff"
namespace="/demo">maybe just mention a different default interceptor
stack that doesn’t include security checking</package>

If 30 actions were mentioned in /secureStuff, I don’t need 30 new classes or 30 action statements

Not sold on Stripes.


Written on September 13, 2006 – 12:00 am | by mpayne

The actions look pretty much like webwork which is good. However, it appears like a step backwords. On the surface you may be able to get your feet wet a little quicker. However, without the configuration in place actions are tied to their view output. 1:1 mapping!!

In stripes, Action methods return exactly where to go.
ex:

 return new ForwardResolution("/productDetail.jsp");

(btw: Tapestry also suffers from this problem)
I don’t know about you, but I’ve frequently had apps where same action was exposed under directly urls and views and sometimes with a different interceptor stack(e.g. security turned off under /demo).  If you have to create another action just to expose it somewhere else, that is more work than just having a config file.

I’ll take a little extra config for a world more of flexibility. Though I don’t have to though the process of learning WW, since I already know it.

Java blogs searching


Written on July 28, 2006 – 12:00 am | by mpayne

I think its time for a "Java blogs" update. There is a lot of useful information hidden within. However, without being able to perform more advanced searching much of that information remains hidden. At the very least, I wish you could have the option of ordering search results by date.

Use DisplayTag or NOT


Written on July 8, 2005 – 12:00 am | by mpayne

I am debating the use of displaytag in one of our apps. It has paging, sorting and exporting of data in (excel, pdf, xml). e.g. a lot of nice functionality you get for free. However it has one major gottcha.
It wants all you data. I doesn’t play nicely with paging large resultssets. There are times when you want to only retrieve a subset of data from the database instead of loading it all up into the application servers memory. I don’t mind taking care of this through a mysql limit clause (or using a subselect with rownum in oracle).

However, displaytag has no built-in functionality to work this way. There have been many votes, complaints, and patches submitted. Jira issue logged here .

Its fustraiting waiting so long for such an critial fix.  Even more annoying when multiple patches have already been submitted.

There are other solutions such as http://valuelist.sourceforge.net/
However, other solutions often mean lossing other features such as data export which might be helpful in certain cases.

err. what to do?  wait… use a mixed bag?  roll your own… vs rollout a cool looking feature and let the users complain when their data gets big.

Personalblog with Webwork, Hibernate3, Sitemesh, and Velocity


Written on April 24, 2005 – 12:00 am | by mpayne

For those interested in comparing Struts vs Webwork, I converted the Struts version of PersonalBlog to Webwork.

I didn’t pull out the whole bag of tricks. If I did the whole application from scratch, there would of been a few things done differently.  Anyway this should provide a pretty good comparison of the same application in Struts and Webwork.

It can be downloaded here.

Why do JSF tools suck so bad?


Written on April 20, 2005 – 12:00 am | by mpayne

I tasked myself with a simple project:

Namely create a form with a checkbox and textField.
When someone clicks on the checkbox, set the textField.text to "Please enter some text".
(A fairly simple process to do with javascript directly).

I first tried .NET. Within 5-10 minutes, I had a working solution. Keep in mind, I am not a .NET developer.

Next
I tried Sun’s Java Studio Creator. After working with it for about an
hour, I could not get the event assigned to the onclick event of the
checkbox, though I had it working for a form submit. Is this the best Sun could
do for a product that came after its competition? Also note its 3 times
slower than eclipse. However according to this article, "When it comes to Java Tools Sun Java Studio Creator beats them all!" ?

I looked around for other tools myeclipse
ide
claims they have jsf support. However, their is no form designer.
There are a couple of wizards and some dtd code completion. Gee thanks,
I can get dtd code completion from xmlbuddy. myeclipse ide doesn’t have
jsf support, they have a bunch of marketing checkboxes.

I tried
Oracle JDeveloper, it was a much snappier ide. Overall its not a bad
ide, but for jsf development it doesn’t offer much more thans Sun’s.

Next I wanted to see, what else does "Java" have to offer outside of JSF.

I tried Echo Studio by nextapp. Echo Studio, is pretty much an eclipse
plugin. Its an ide for the Echo framework. The jar for the plugin is
about ~500k. Within 20minutes I had a working solution. I had to make
by components global with their respective class in order to make them visible to other components during within events, something the ide generated components don’t do by default.
Overall it was pretty easy. Very similiar to swing programming. Here is a snippet of the check event.

    private void doCheck(ActionEvent e) {        if (checkBox1.isSelected()) {            textField1.setEnabled(true);            textField1.setText("Please enter some text");        } else {            textField1.setEnabled(false);            textField1.setText("");        }    }

Is the end, I have to ask. How does a 500k eclipse plugin beat out the best thing sun/jsf has to offer?

"Sun"— I don’t need anymore wizards that bring back rowsets etc. Just finish the gui designer, I’ll take care of the backend.

Proxying spring prototype strangeness


Written on April 6, 2005 – 12:00 am | by mpayne

Given this applicalation context and the following test code, buisnessService acts like a prototype and
buisnessService2 acts like a singleton(ignoring the singleton=false
attribute setting).

Both services have singleton set to "false".
The difference between the two setups is that bean "buisnessService" has no target properpty set, target is mentioned as last interceptor instead.

In my tests reuse of buisnessService2 is stateful. It has the values
from the previously execution. "buisnessService" is clean everytime I
use it(as it should be).

This makes consise / abstract definitions less useful on prototypes,
since you have to respecify the interceptorNames for eash definition.

Anyone have any clue where this is working as designed?

Proxying spring prototype strangeness.


Written on March 30, 2005 – 12:00 am | by mpayne

Given the code below, buisnessService acts like a prototype and
buisnessService2 acts like singleton(ignoring the singleton=false
attribute setting).

In my tests reuse of buisnessService2 is stateful. It has the values
from the previously execution. "buisnessService" is clean everytime I
use it(as it should be).

The autocreater stuff works fine, but
this makes consise / abstract definitions less useful on prototypes,
since you have to respecify the interceptorNames for eash definition.

Is this a bug, or is it working as designed?

Wow month links work


Written on January 22, 2005 – 12:00 am | by mpayne

Yes they do…!