Book Image

Mastering Spring MVC 4

By : Geoffroy Warin
Book Image

Mastering Spring MVC 4

By: Geoffroy Warin

Overview of this book

<p>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.</p> <p>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.</p> <p>Mastering Spring MVC will take you on a journey from developing your own web application to uploading it on the cloud.</p> <p>You begin by generating your own Spring project using Spring Tool suite and Spring Boot.</p> <p>As you develop an advanced-level interactive application that can handle file uploads as well as complex URLs, you will dive into the inner workings of Spring MVC and the principles of modern web architectures.</p> <p>You will then test, secure, and optimize your Spring web application and design RESTful services that will be consumed on the frontend.</p> <p>Finally, when everything is ready, you will release your application on a cloud provider and invite everyone to see.</p>
Table of Contents (17 chapters)
Mastering Spring MVC 4
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Richardson's maturity model


Leonard Richardson is famous for having defined four levels, ranked from 0 to 3, that describe the level of "RESTfulness" of a web API. Each level requires additional work and investment in the API but also provides additional benefits.

Level 0 – HTTP

Level 0 is really easy to reach; you just have to make your resource available on a network through the HTTP protocol. You can use any data representation you find best suited for your use case (XML, JSON, and so on).

Level 1 – Resources

Most people think of resources when they hear the term REST. A resource is a unique identifier for an element of our model, a user or a tweet, for instance. With HTTP, a resource is obviously associated with a unified resource identifier URI, as shown in this example:

  • /users contains the list of all our users

  • /user/42 contains a specific user

  • /user/42/tweets contains the list of all the tweets associated to this particular user

Maybe your API could allow access to a particular tweet related...