Wicket, whatever happened to separation of concerns?


Written on November 21, 2006 – 12:00 am | by mpayne

Webwork/Struts 2.0 has still has a nice pojo feel to it. Actions don’t look specific to running in a webapp. The Java code is concerned with a buisness process, not a bunch of code to entertain the UI

Stripes has no separation of view destinations. e.g

actions end with....

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

Wicket has even less separation.

public class HelloWorldPage extends WebPage {
public HelloWorldPage() {
new Label(this, ?message?, ?Hello, World!?) {
@Override
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag); #1
tag.put("style", "color:red"); #2
}
}
}
}

A concept drilled into many frameworks was a need for a separation of concerns.
Java code didn’t print out style attributes. #if/EL logic was used to style odd/even row colors. Rails says stop compiling code & quick reloadablity = productiving. Yet Wicket says html/java source are dependent on each other. Who’s right?

However, if I decide I want to eat their food. Wicket doesn’t seem that complex to learn. Its certainly has a lot less files that need to be edited than Tapestry( hopefully tapesty 5.x will fix that).
Just, I am sure I want(or should) to skin the cat like that. Maybe I’ll have to write a demo app with it.

Post a Comment

You need to enable GD extension in order to use Simple CAPTCHA.