Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
RESTful Java Web Services

You're reading from   RESTful Java Web Services A pragmatic guide to designing and building RESTful APIs using Java

Arrow left icon
Product type Paperback
Published in Nov 2017
Publisher
ISBN-13 9781788294041
Length 420 pages
Edition 3rd Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Balachandar Bogunuva Mohanram Balachandar Bogunuva Mohanram
Author Profile Icon Balachandar Bogunuva Mohanram
Balachandar Bogunuva Mohanram
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Introducing the REST Architectural Style FREE CHAPTER 2. Java APIs for JSON Processing 3. Introducing the JAX-RS API 4. Advanced Features in the JAX-RS APIs 5. Introducing JAX-RS Implementation Framework Extensions 6. Securing RESTful Web Services 7. Description and Discovery of RESTful Web Services 8. RESTful API Design Guidelines 9. The Role of RESTful APIs in Emerging Technologies 10. Useful Features and Techniques

The evolution of RESTful web services

Before getting into the details of REST-enabled web services, let's take a step back and define what a web service is. Then, we will see what makes a web service RESTful.

A web service is one of the most popular methods of communication between the client and server applications over the internet. In simple words, web services are web application components that can be published, found, and used over the web. Typically, a web service has an interface describing the web service APIs, which is known as Web Services Description Language (WSDL). A WSDL file can be easily processed by machines, which blows out the integration complexities that you may see with large systems. Other systems interact with the web service by using Simple Object Access Protocol (SOAP) messages. The contract for communication is driven by the WSDL exposed by the web service. Typically, communication happens over HTTP with XML in conjunction with other web-related standards.

What kind of problems do the web services solve? There are two main areas where web services are used:

  • Many of the companies specializing in internet-related services and products have opened their doors to developers using publicly available APIs. For instance, companies such as Google, Yahoo, Amazon, and Facebook are using web services to offer new products that rely on their massive hardware infrastructures. Google and Yahoo offer their search services, Amazon offers its on-demand hosting storage infrastructure, and Facebook offers its platform for targeted marketing and advertising campaigns. With the help of web services, these companies have opened the door to the creation of products that did not exist some years ago.
  • Web services are being used within enterprises to connect previously disjointed departments such as marketing and manufacturing. Each department or Line Of Business (LOB) can expose its business processes as a web service, which can be consumed by the other departments.
  • By connecting more than one department to share information by using web services, we begin to enter the territory of Service-Oriented Architecture (SOA). SOA is essentially a collection of services, each talking to one another in a well-defined manner, in order to complete relatively large and logically complete business processes.

All these points lead to the fact that web services have evolved as a powerful and effective channel of communication between client and server over a period of time. The good news is that we can integrate RESTful systems into a web service-oriented computing environment without much effort. Although you may have a fair idea of RESTful web services by now, let's see the formal definition before proceeding further.

What is a RESTful web service?

Web services that adhere to the REST architectural constraints are characterized as RESTful web services. Refer to the section, The REST architectural style, at the beginning of this chapter if you need a quick brush up of the architectural constraints for a RESTful system.

Remember that REST is not the system's architecture in itself, but it is a set of constraints that when applied to the system's design leads to a RESTful architecture. As our definition of a web service does not dictate the implementation details of a computing unit, we can easily incorporate RESTful web services to solve large-scale problems. We can even fully use RESTful web services in the larger umbrella of the SOA, given that it inherently meets the basic values of SOA, as depicted in the following image:

With this larger view of SOA, we begin to see how REST has the potential to impact the new computing models being developed.

The RESTful web API or REST API is an API implemented using HTTP and the REST architectural constraints. Technically speaking, this is just another term for a RESTful web service. In this book, we will use these terms interchangeably.
You have been reading a chapter from
RESTful Java Web Services - Third Edition
Published in: Nov 2017
Publisher:
ISBN-13: 9781788294041
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image