Monthly Archives: March 2012

Recently I promoted to do TDD, instead of “Tests First” development. Some people asked me what the difference is between them. In both cases we write tests first right? So what is the difference? I believe the difference is this: Test First decribes your solution. TDD describes the problem The difference could probably be explained best when using the coderetreat I had organized at the beginning of this year. Within this session I had experienced a great example to tell the difference between Tests first and TDD. To clarify the difference in this blog, we… Read Article →

(I have recently encountered this with Spring 3.1) Want to validate your forms using Spring? Are you using the form tag and bind it with an object? Got the validator working? But still you just can’t seem to get these error messages showing up? Here is a gotcha that might help you out! Consider this controller: [sourcecode language=”java”] @Controller public class FormController { @RequestMapping("/form") public ModelAndView handleGet(@Valid TellAFriendForm backingForm, BindingResult bindingResult) { ModelAndView modelAndView = new ModelAndView("backingForm"); modelAndView.addObject("backingForm", backingForm); modelAndView.addObject("result", bindingResult); return modelAndView; } } [/sourcecode] With this jsp: [sourcecode language=”java”] <form:form method="POST" commandName="myForm" action="?">… Read Article →

Scroll To Top