Spring MVC: Beginner's Guide - Second Edition
eBook - ePub

Spring MVC: Beginner's Guide - Second Edition

Amuthan Ganeshan

Share book
  1. 350 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Spring MVC: Beginner's Guide - Second Edition

Amuthan Ganeshan

Book details
Book preview
Table of contents
Citations

About This Book

Unleash the power of the latest Spring MVC 4.x to develop a complete application

About This Book

  • Work through carefully crafted exercises with detailed explanations for each step will help you understand the concepts with ease
  • You will gain a clear understanding of the end-to-end request/response life cycle, and each logical component's responsibility
  • This book is packed with tips and tricks that demonstrate industry best practices on developing a Spring-MVC-based application

Who This Book Is For

The book is for Java developers who want to exploit Spring MVC and its features to build web applications. Some familiarity with basic servlet programming concepts would be a plus, but is not a prerequisite.

What You Will Learn

  • Familiarize yourself with the anatomy of the Spring 4.X development environment
  • Understand web application architecture and the Spring MVC request flow
  • Integrate bean validation and custom validation
  • Use error handling and exception resolving
  • Get to grips with REST-based web service development and Ajax
  • Test your web application

In Detail

Spring MVC helps you build flexible and loosely coupled web applications. The Spring MVC Framework is architected and designed in such a way that every piece of logic and functionality is highly configurable. Also, Spring can integrate effortlessly with other popular web frameworks such as Struts, WebWork, Java Server Faces, and Tapestry.

The book progressively teaches you to configure the Spring development environment, architecture, controllers, libraries, and more before moving on to developing a full web application. It begins with an introduction to the Spring development environment and architecture so you're familiar with the know-hows. From here, we move on to controllers, views, validations, Spring Tag libraries, and more. Finally, we integrate it all together to develop a web application. You'll also get to grips with testing applications for reliability.

Style and approach

This book takes a pragmatic step-by-step approach to web application development using Spring MVC, with informative screenshots and concise explanation.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Spring MVC: Beginner's Guide - Second Edition an online PDF/ePUB?
Yes, you can access Spring MVC: Beginner's Guide - Second Edition by Amuthan Ganeshan in PDF and/or ePUB format, as well as other popular books in Computer Science & Web Programming. We have over one million books available in our catalogue for you to explore.

Information

Year
2016
ISBN
9781785880636
Edition
2

Spring MVC Beginner's Guide - Second Edition


Spring MVC Beginner's Guide - Second Edition

Copyright Š 2016 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: June 2014
Second edition: July 2016
Production reference: 1220716
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78588-063-6
www.packtpub.com

Credits

Author
Amuthan Ganeshan
Copy Editor
Ameesha Smith-Green
Reviewer
Rafał Borowiec
Project Coordinator
Ulhas Kambali
Commiss ioning Editor
Nadeem Bagban
Proofreader
Safis Editing
Acq uisition Editor
Vinay Argekar
Indexer
Rekha Nair
Content Development Editor
Prashanth G Rao
Production Coordinator
Melwyn Dsa
Technical Editor
Murtaza Tinwala
Cover Work
Melwyn Dsa

About the Author

Amuthan Ganeshan is a software engineer with more than nine years of experience specializing in building distributed applications. He currently works as a senior software engineer at Uptake. He is a big data enthusiast and loves sharing knowledge about software development and practices through his blog at www.codeculture.guru. He can be contacted at [email protected].
I would like to gratefully and sincerely thank Mr.Vincent Kok for his guidance, understanding, patience, and, most importantly, his friendship during my first job at Educator Inc. His mentorship has helped me to become a well-rounded professional. He encouraged me to not only grow as a developer, but also as an independent thinker.
I want to take a moment and express my gratitude to the entire team at Packt Publishing especially Murtaza Tinwala, Anish Dhurat, and Vinay Argekar, for their patience and cooperation. When I signed up for this book, I really had no idea how things would turn out. I couldn't have pulled this off without their guidance.
I would like to express my gratitude to all my friends and family for providing me with unending encouragement and support. I owe every challenge and accomplishment to all my lovely colleagues who taught me a lot over the years.
A special thanks to Divya and Arun for their encouragement, friendship, and support. They were a strong shoulder to lean on in the most difficult times during the writing of this book.
Finally, and most importantly, I would like to thank my wife Manju, who believes in me more than I do myself. Her support, encouragement, quiet patience, and unwavering love were undeniably the bedrock upon which my life has been built.

About the Reviewer

Rafał Borowiec is an IT specialist, specializing in software development, software testing and quality assurance, project management, and team leadership. He currently holds the position of a development manager at Goyello (goyello.com), where he is mainly responsible for building and managing teams of professional developers and testers.
He believes in agile project management and is a big fan of technology, especially technology that is Java-related (but not limited to this). Rafał likes sharing knowledge about software development and practices through his blog, blog.codeleak.pl , and Twitter (@kolorobot).

www.PacktPub.com

eBooks, discount offers, and more

Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
eBooks, discount offers, and more
https://www2.packtpub.com/books/subscription/packtlib
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books.

Why subscribe?

  • Fully searchable across every book published by Packt
  • Copy and paste, print, and bookmark content
  • On demand and accessible via a web browser

Preface

This book has a very clear aim; to introduce you to the incredible simplicity and power of Spring MVC. I still remember first learning about the Spring framework back in 2009. The best way to test whether or not you really understand a concept is to try to teach it to someone else. In my case, I have taught Spring MVC to MVC; are you confused? I mean that back in 2009, I taught it to my wife Manju Viswambaran Chandrika (MVC). During that course, I was able to understand the kind of doubts that arise in a beginner's mind. I have gathered all my teaching knowledge and put it in this book in an elegant way so that it can be understood without confusion.
It has been more than two years since the first edition of this book presented readers with a beginner-friendly way of explaining the concepts of Spring MVC. The popular reception of the book and the rapid development of the Spring MVC framework naturally demands a new edition.
In the two years since the first edition of this book was published I have received all kinds of suggestions from readers how it could be improved. With the aid of all this information I have completely revised the book. The most obvious changes in this second edition are usage of the latest and greatest versions of Spring and other libraries.
The examples in this book are completely rewritten using Spring 4.3.0.RELEASE version with Java-based configuration. Also in this edition we incorporated the popular in-memory database (HSQL DB) as our backend data-store for the example project. Though this edition includes many changes, my main audience remains the beginners.
I hope you will find this second edition more useful for learning Spring MVC thoroughly from a beginner's perspective.

What this book covers

Chapter 1, Configuring a Spring Development Environment, will give you a quick overview of Spring MVC and guide you with detailed notes of step-by-step instructions to set up your development environment. After installing the required prerequisites, you will try out a quick example of how to develop an application with Spring MVC. Although the chapter doesn’t explain all the code in detail, you’ll pick up a few things intuitively.
Chapter 2, Spring MVC Architecture – Architecting Your Web Store, lays down the ground work for the sample application that we are going to build along the way, chapter by chapter. This chapter will introduce you to concepts such as Request mapping, the web application context, Spring MVC request flow, and the layered architecture of a typical web application. You will also learn about how to set up the in-memory database for our sample application.
Chapt...

Table of contents