Conversion and Validation

Bauke Scholtz, Arjan Tijms · Apress eBooks · 2018

At its core, JSF (JavaServer Faces) as an HTML form-based MVC (Model-View-Controller) framework basically needs to convert between Java objects (entities, beans, value objects, data transfer objects, and what not) and character sequences (strings) all the time. The HTTP request is basically broken down into plain vanilla strings representing headers and parameters, not as Java objects. The HTTP response is basically written as one big sequence of characters representing HTML or XML, not as some sort of serialized form of a Java object. However, the average Java model behind a JSF page doesn’t necessarily contain String properties over all place. That would defeat the strong typed nature of Java. This is where Converters come into the picture: converting between objects in model and strings in view.

Read the paper · More papers on PaperTik