Chapter 6. Writing Java Web Applications

IN THIS CHAPTER

  • The Model-View-Controller pattern

  • The Spring Framework

  • Writing a simple Web application

Even the most dynamic Flex user interface needs live data to make it more valuable than just a static page. Web applications typically get their data from an application server that handles requests from the user interface and then returns the requested data for the user interface to display. Java is well-suited to meet this need. Java application servers and Web application frameworks have been around for a number of years now and provide a stable back-end base upon which to build your dynamic Web applications.

In this chapter, you build a simple Web application to receive the request from the Flex client. The Web applications you build throughout this book use a popular open-source Java application framework called Spring. This chapter starts with a look at the Model-View-Controller pattern, followed by an introduction to the Spring Framework. After that, you write a simple Web application using Spring and then compile and deploy it to a server by using an Ant build script.

The Model-View-Controller Pattern

In software development, an architectural pattern refers to a proven, repeatable way to describe the structure of an application. Java Web applications are typically written by using the Model-View-Controller (MVC) architectural pattern. The objective of using the MVC pattern is to separate the user interface from the data and business logic ...

Get Java® and Flex® Integration Bible 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.