Building the request handling layer

The web request handling layer for Ext JS 4 clients is a JSON-generating proxy to the service layer interfaces. The domain entities are converted into JSON representations within this layer; so our first step is to create some helper code to make this task easier.

There are several excellent open source JSON generation projects that can assist in this task including Jackson (http://jackson.codehaus.org) and Google Gson (http://code.google.com/p/google-gson/). Such libraries parse POJOs into an appropriate JSON representation via their declared fields. With the release of Java EE 7, we no longer have a need for third-party libraries. The Java API for JSON Processing (JSR-353) is available in all Java EE 7-compliant ...

Get Enterprise Application Development with Ext JS and Spring now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.