Soren Pedersen wrote:
I have not tried Spring MVC. I dropped it when I looked at the XML
configuration file(s)...
Perhaps this has gotten better lately, I don't know.
SpringMVC has really improved in this area. Since version 2.5 (current
version is 3.0.X) you can basically do
Nikolaos Giannopoulos wrote:
Encapsulation in OO IMHO pertains to the class as a whole not the method
level. If you want to encapsulate at the method level then your going
to have a hard time not allowing someone to access and affect other
attributes of the class (e.g. other
Hi Tony
I agree IF Stripes would allow you to supply parameters for Action Methods,
like Spring MVC or JERSEY (REST), that would mean a good cleanup and better
encapsulation.
/Jeppe
It is difficult to get a man to understand something when his salary depends
upon him not understanding it.” -
Hi folks,
This has already been discussed on the mailing list (not so long ago).
The debate is open, and ultimately it's a personal preference : some prefer
method parameters a la Spring, others favor properties.
I think there is no answer here : both methods have their pros and cons, and
will
Again, I'm not attempting to prove that SpringMVC is better than Stripes,
the question of interest is whether Stripes encourages bad practice from an
OO point-of-view?
I suppose it depends on your definition of OO - I use subclassing in my
ActionBeans so that I can share common parameters and
Hi Tony,
Personally, I would code the action bean differently making it look almost
exactly like the Spring version.
// ANNOTATIONS, GETTERS AND SETTERS OMITTED FOR BREVITY
class MyActionBean extends BaseActionBean {
private User user;
Resolution deleteUser() {
Totally agree with Christian that the Stripes version can be redefined
as Christian points out.
Moreover, when doing CRUD operations we typically need to display the
entity that the user wants to delete and ask for user confirmation i.e.
we don't just ask the user if they wants to delete id
Hello,
I was about to write the same reply as Christian.
To go further, compare
// ANNOTATIONS OMITTED FOR BREVITY
class MyController {
@Autowired
private UserService userService;
public ModelAndView prepareUser(Integer userId) {
ModelAndView modelAndView=new
On Mar 3, 2011, at 1:52 AM, Tony Drago wrote:
// ANNOTATIONS OMITTED FOR BREVITY
class MyController {
public String deleteUser(Integer userId) {
userService.deleteUser(userId);
return redirect:/listUsers;
}
public ModelAndView addUser(User user) {