concept validation in category java

This is an excerpt from Manning's book Spring Roo in Action.
Contrast this with your friends programming in dynamic language platforms, such as Ruby on Rails or Grails, who take about 15 minutes to get a basic application shell up and running. That shell usually includes a web application, database data and validation, and some basic business and navigation logic. Unlike a lot of Java application prototypes, theirs is usually the beginning of the final project, whereas Java developers have to try and throw away a fair number of APIs and platforms manually until they get to a point where they’re comfortable assigning a team to the project. The bottom line is that it just takes a long time to write a Java-based application.
Validation is a difficult topic for any application architecture. You may ask yourself a bevy of questions, such as these:
Where do I perform validation—at the web layer, in the middle tier, or in my database?

This is an excerpt from Manning's book Struts 2 in Action.
Being a text-based protocol, HTTP must represent its request parameters in a text encoding. When these parameters enter our application, they must be converted to the appropriate native data type. The Servlet API doesn’t do this for us. The parameters, as retrieved from the servlet request objects, are still represented as strings. Converting these strings to Java data types is easy enough but can be time-consuming and error-prone. Converting to simple types is tedious; converting to more complex types is both complex and tedious. And, of course, the data must also be validated before it can be allowed to enter the system. Note that there are two levels of validation. In the first case, the string must be a valid representation of the Java type to which you want to convert; for example, a ZIP code should not have any letters in it.
As with most aspects of Struts 2, the validation framework is well engineered. As we’ve indicated, Struts 2 is a second-generation web application framework. As with most of its components, validation has been a part of web application frameworks for a while, but Struts 2 takes it to a new level of refinement, modularity, and clean integration. Due to this, we can benefit greatly from a high-level study before kicking off into our code examples. We’ll take the first section of this chapter to examine the architecture of the validation framework as well as how it fits into the workflow of Struts 2 itself. First, we’ll look at the architecture.