5.1. Basic Bootstrapping

BlazeDS is a Java Servlet–based web application, so it will integrate and work with the Spring framework facility that addresses the web layer. Spring framework includes an MVC framework for creating web applications. The MVC framework in Spring is often simply referred to as the Spring MVC. Spring MVC, like every other part of the Spring framework, leverages dependency injection and Aspect-Oriented Programming.

Spring MVC, like most MVC frameworks, provides a separation of concerns along the three important sets of entities, namely models, views, and controllers. Models represent data and state, views provide the interface for user interaction and display, and controllers act as the intermediary between the models and the views. Controllers facilitate model updates based on user input. Spring MVC implements a number of well-known design patterns, including the famous Front Controller pattern.

The Front Controller pattern is based on a central controller intercepting all requests and delegating these requests to appropriate handlers. The DispatcherServlet class serves the purpose of a front controller in Spring MVC. It delegates requests to other controllers. Views are created from responses, and they are served back to the client.

DispatcherServlet extends the HttpServlet. As with any HttpServlet, you can map all requests that match a particular URL pattern to be handled by the DispatcherServlet. Using standard Java EE semantics, you can declare the Servlet ...

Get Professional BlazeDS: Creating Rich Internet Applications with Flex® and Java® 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.