A lot of great news has come out of the WebWork team. Having used WebWork on a lot of projects recently, I am a big fan, as it is simple and gets out of your damn way! :)
Some of the great news:
Continuations: RIFE and WebWork have partnered around continuations (at least). WebWork now contains an early version of RIFE/continuations, and provides experimental support for continuations. This is so we can get closer to SeaSide if we want. Take a look at an example action:
public class Guess extends ActionSupport {
int guess;
public String execute() throws Exception {
int answer = new Random().nextInt(100) + 1;
int tries = 5;
while (answer != guess && tries > 0) {
pause(SUCCESS);
if (guess > answer) {
addFieldError("guess", "Too high!");
} else if (guess < answer) {
addFieldError("guess", "Too low!");
}
tries--;
}
if (answer == guess) {
addActionMessage("You got it!");
} else {
addActionMessage("You ran out of tries, the answer was " + answer);
}
return SUCCESS;
}
public void setGuess(int guess) {
this.guess = guess;
}
}