Spring MVC Beginner's Guide
eBook - ePub

Spring MVC Beginner's Guide

Amuthan G

Compartir libro
  1. 304 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

Spring MVC Beginner's Guide

Amuthan G

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

In Detail

The MVC architecture for developing web applications continues to be a powerful concept and the most popular design pattern known by developers. Spring MVC is a model-view-controller framework for Java web applications to simplify the writing and testing of Java web applications, which fully integrates with the Spring dependency injection framework. With the power of annotation-based configuration, Spring MVC makes web application development easy for developers.

This book is a great companion for beginners who want to learn Spring MVC. With the help of real-world examples, you will learn how to create a completely functional web application. You will also get a complete overview of the Spring web development environment and all its key components.

Approach

A step-by-step pragmatic approach to web application development using Spring MVC, with relevant screenshots and concise explanations.

Who this book is for

This book is aimed at helping Java developers who want to teach themselves Spring MVC, even if they have no previous experience with Spring MVC. It would be helpful to have a bit of familiarity with basic servlet programming concepts, but no prior experience is required.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Spring MVC Beginner's Guide un PDF/ePUB en línea?
Sí, puedes acceder a Spring MVC Beginner's Guide de Amuthan G en formato PDF o ePUB, así como a otros libros populares de Computer Science y Web Programming. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2014
ISBN
9781783284870
Edición
1
Categoría
Web Programming

Spring MVC Beginner's Guide


Table of Contents

Spring MVC Beginner's Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Time for action – heading
What just happened?
Pop quiz – heading
Have a go hero – heading
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Configuring a Spring Development Environment
Setting up Java
Time for action – installing JDK
Time for action – setting up environment variables
Configuring a build tool
Time for action – installing the Maven build tool
Installing a web server
Time for action – installing the Tomcat web server
Configuring a development environment
Time for action – installing Spring Tool Suite
Time for action – configuring Tomcat on STS
What just happened?
Time for action – configuring Maven on STS
Creating our first Spring MVC project
Time for action – creating a Spring MVC project in STS
What just happened?
Spring MVC dependencies
Time for action – adding Spring jars to the project
What just happened?
Time for action – adding Java version properties in pom.xml
A jump-start to MVC
Time for action – adding a welcome page
What just happened?
The dispatcher servlet
Time for action – configuring the dispatcher servlet
What just happened?
Deploying our project
Time for action – running the project
Summary
2. Spring MVC Architecture – Architecting Your Web Store
The dispatcher servlet
Time for action – examining request mapping
What just happened?
Pop quiz – request mapping
The web application context
Time for action – understanding the web application context
What just happened?
Pop quiz – the web application context
The web application context configuration
Pop quiz – web application context configuration
View resolvers
Time for action – understanding InternalResourceViewResolver
What just happened?
Model View Controller
An overview of the Spring MVC request flow
The web application architecture
The domain layer
Time for action – creating a domain object
What just happened?
The persistence layer
Time for action – creating a repository object
What just happened?
The service layer
Time for action – creating a service object
What just happened?
Have a go hero – accessing the product domain object via a service
An overview of the web application architecture
Have a go hero – listing all our customers
Summary
3. Control Your Store with Controllers
Defining a controller
Time for action – adding class-level request mapping
What just happened?
Pop quiz – class-level request mapping
The role of a controller in Spring MVC
Handler mapping
Using URI template patterns
Time for action – showing products based on category
What just happened?
Pop quiz – request path variable
Using matrix variables
Time for action – showing the products based on filter
What just happened?
Understanding request parameters
Time for action – adding the product details page
What just happened?
Pop quiz – the request parameter
Time for action – implementing a master detail view
What just happened?
Have a go hero – adding multiple filters to list products
Summary
4. Working with Spring Tag Libraries
Serving and processing forms
Time for action – serving and processing forms
What just happened?
Customizing data binding
Time for action – whitelisting form fields
What just happened?
Externalizing text messages
Time for action – externalizing messages
What just happened?
Using Spring Security tags
Time for action – adding a login page
What just happened?
Summary
5. Working with View Resolver
Resolving views
The redirect view
Time for action – examining RedirectView
What just happened?
Pop quiz – redirect view
Serving static resources
Time for action – serving static resources
What just happened?
Pop quiz – static view
Time for action – adding images to the product detail page
What just happened?
The multipart request in action
Time for action – adding images to the product page
What just happened?
Have a go hero – uploading product user manuals to the server
Using ContentNegotiatingViewResolver
Time for action – configuring ContentNegotiatingViewResolver
What just happened?
Working with the handler exception resolver
Time for action – adding the response status exception
What just happened?
Time for action – adding an exception handler
What just happened?
Summary
6. Intercept Your Store with Interceptor
Working with interceptors
Time for action – configuring an interceptor
What just happened?
Pop quiz – interceptor
Internationalization (i18n)
Time for action – adding internationalization
What just happened?
Have a go hero – fully internationalize the product detail page
Audit logging
Time for action – adding the data audit interceptor
What just happened?
Conditional redirecting
Time for action – intercepting offer page requests
What just happened?
Summary
7. Validate Your Products with a Validator
Bean validation
Time for action – adding bean validation support
What just happened?
Have a go hero – adding more validation in the add products page
Custom validation with JSR-303 / bean validation
Time for action – adding custom validation support
What just happened?
Have a go hero – adding custom validation to a category
Spring validation
Time for action – adding Spring validation
What just happened?
Time for action – combining Spring and bean validations
What just happened?
Have a go hero – adding Spring validation to the product image
Summary
8. Give REST to Your Application with Ajax
Introducing REST
Time for action – implementing RESTful web services
What just happened?
Time for action – consuming REST web services
What just happened?
Handling a web service in Ajax
Time for action – consuming REST web services via Ajax
What just happened?
Summary
9. Apache Tiles and Spring Web Flow in Action
Working with Spring Web Flow
Time for action – implementing the order-processing service
What just happened?
Time for action – implementing the checkout flow
What just happened?
Understanding the flow definition
Understanding the checkout flow
Pop quiz – web flow
Time for action – creating views for every view state
What just happened?
Have a go hero – adding a decision state
Enhancing reusability through Apache Tiles
Time for action – creating views for every view state
What just happened?
Pop quiz – Apache Tiles
Summary
10. Testing Your Application
Unit testing
Time for action – unit-testing domain objects
What just happened?
H...

Índice