In the past few days, the veils obstructing a couple rules-of-thumb have slowly melted away:
1. Don't use model objects as form backing objects. Use simple value objects instead. This adds an extra layer, but eliminates complications. This is especially true in Spring WebFlow (2.0.7) which does not instrument the "open session in view" pattern, unlike Spring MVC which odes.
2. Make sure your value object fields are Strings as much as possible. If a field represents a number, you can convert it later. Doing this avoids the need to configure pretty binding error messages for the user, when, for example, the user enters characters into a form field which binds to an Integer field in the value object.
Added (2-19-2010): More generally, if you are discontinuing the use of a database column that has been in existence for a long time, do not delete the column, because removing all mentions of that column from all the code can prove to be quite hairy.
Showing posts with label spring webflow. Show all posts
Showing posts with label spring webflow. Show all posts
Wednesday, January 13, 2010
Tuesday, January 5, 2010
Is Spring WebFlow worth the trouble?
This post begs to be fleshed out, and I hope to return and do so. The question is: Is Spring WebFlow really worth all the trouble? It's a nice abstraction, but does it save time? I'm not so sure. For one, there's no OpenSessionInViewFilter pattern in WebFlow.
A work colleague pointed out that WebFlow saves you from writing a lot of controller code for transitioning from screen to screen. Also, it aims to solve the "back button" problem and related issues.
A work colleague pointed out that WebFlow saves you from writing a lot of controller code for transitioning from screen to screen. Also, it aims to solve the "back button" problem and related issues.
Thursday, December 24, 2009
A Spring WebFlow Gotcha
If your flow definition has a element and its "if" attribute contains two or more clauses joined by the AND logical connector, make sure to use & amp;& amp; (no spaces) instead of &&, because && breaks XML validation.
Subscribe to:
Posts (Atom)