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

Project libraries and dependencies


Configure pom.xml to add the major Spring Framework 4.x libraries (JAR files) for the PWP project. These dependency modules are the following:

  • spring-core (Spring core module): This contains the core components of the framework which includes the Inverse of Control principle and Dependency Injection (DI).

  • spring-beans (Spring bean module): This contains the bean generation using BeanFactory and fetches injected beans using the method getBean().

  • spring-context (Spring context module): Built by the core and bean modules that provide the interfaces of ApplicationContext with some features like resource bundling, internationalization, and scheduling.

  • spring-context-support (Spring context support module): This module contains the classes needed for integrating third-party applications to a Spring Application Context.

  • spring-web: This contains the web features of the Spring Framework which includes the initialization of the IoC container using servlet listeners and a web-oriented application context.

  • spring-webmvc (Spring MVC module): This is the module that has the MVC implementations and features.

  • spring-tx (Spring Transaction module): This contains transaction management on Bean object declarations with some special interfaces for all the POJO objects.

Aside from the other non-framework libraries, the following are auxiliary JAR files that support the Spring Framework 4.x core libraries:

  • servlet-api: This contains all the classes and interfaces that describe the interaction between a servlet class and the runtime environment provided for the instance of a class within the bound of the servlet container.

  • jsp-api: This contains all the classes that implement the JspPage interface.

  • jstl: This contains all the classes and interfaces for Taglib support for all JSP pages.

  • javax-mail: This provides a platform-independent and protocol-independent framework to build mail and messaging applications.

  • javax.validation: This provides JSR-303 annotations for Java Bean validation.

All of these dependencies must be added to the pom.xml of the Maven project.