Book Image

Spring MVC Blueprints

By : Sherwin John C. Tragura
Book Image

Spring MVC Blueprints

By: Sherwin John C. Tragura

Overview of this book

Spring MVC is the ideal tool to build modern web applications on the server side. With the arrival of Spring Boot, developers can really focus on the code and deliver great value, leveraging the rich Spring ecosystem with minimal configuration. Spring makes it simple to create RESTful applications, interact with social services, communicate with modern databases, secure your system, and make your code modular and easy to test. It is also easy to deploy the result on different cloud providers. This book starts all the necessary topics in starting a Spring MVC-based application. Moving ahead it explains how to design model objects to handle file objects. save files into a data store and how Spring MVC behaves when an application deals with uploading and downloading files. Further it highlights form transactions and the user of Validation Framework as the tool in validating data input. It shows how to create a customer feedback system which does not require a username or password to log in. It will show you the soft side of Spring MVC where layout and presentation are given importance. Later it will discuss how to use Spring Web Flow on top of Spring MVC to create better web applications. Moving ahead, it will teach you how create an Invoice Module that receives and transport data using Web Services By the end of the book you will be able to create efficient and flexible real-time web applications using all the frameworks in Spring MVC.
Table of Contents (16 chapters)
Spring MVC Blueprints
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface

AJAX and Spring integration


The Spring framework only has one stateless scope, called prototype, and the rest of its features are stateless in nature, since it purely uses the HTTP protocol for its request-response transactions. Applications like BTS will be accessed by many users who want to check bus availability, travel perks and other discounts open for a season. To help Spring in responding to several user transactions with one button submission, or to select event, the AJAX model has been adapted to this project.

AJAX uses JavaScript frameworks to simulate multiple request-response transactions at the side of the main HTTP request response. This model utilizes XML or JSON as request and response data. The client generates a data model to be processed by AJAX which will transform that model to an AJAX or XML request parameter. Once the parameter reaches the server, an XML or JSON response will be sent back to the original webpage for rendition. The following figure shows the whole picture...