Home » Tag Archives: RESTful Web Services (page 5)

Tag Archives: RESTful Web Services

Spring Boot and Spring Data REST – exposing repositories over REST

spring-interview-questions-answers

Exposing Spring Data repositories over REST is pretty easy with Spring Boot and Spring Data REST. With minimal code one can create REST representations of JPA entities that follow the HATEOAS principle. I decided to re-use Spring PetClinic’s JPA entities (business layer) as the foundation for this article.       Application foundation The PetClinic’s model is relatively simple, but ...

Read More »

Easy REST endpoints with Apache Camel 2.14

apache-camel-logo

Apache Camel has a new release recently, and some of the new features were blogged about by my colleague Claus Ibsen. You really should check out his blog entry and dig into more detail, but one of the features I was looking forward to trying was the new REST DSL. So what is this new DSL? Actually, it’s an extension ...

Read More »

Chained Access Delegation Pattern

software-development-2-logo

Suppose a medium-scale enterprise that sells bottled water has a RESTful API (Water API) that can be used to update the amount of water consumed by a registered user. Any registered user can access the API via any client application. It could be an Android app, an iOS app, or even a web application. The company only provides the API—anyone ...

Read More »

Embedded Jetty and Apache CXF: secure REST services with Spring Security

spring-interview-questions-answers

Recently I run into very interesting problem which I thought would take me just a couple of minutes to solve: protecting Apache CXF (current release 3.0.1)/ JAX-RS REST services with Spring Security (current stable version 3.2.5) in the application running inside embedded Jetty container (current release 9.2). At the end, it turns out to be very easy, once you understand ...

Read More »

RESTful API and a Web Site in the Same URL

software-development-2-logo

Look at Github RESTful API, for example. To get information about a repository you should make a GET request to api.github.com/repos/yegor256/rultor. In response, you will get a JSON document with all the details of the yegor256/rultor repository. Try it, the URL doesn’t require any authentication. To open the same repository in a nice HTML+CSS page, you should use a different ...

Read More »

REST API with JSON

json-logo

What is REST API? REST stands for Representational State Transfer. It relies on a stateless, client-server, cacheable communications. In most cases it is used with the HTTP protocol. RESTful applications use HTTP requests to POST (create), PUT (create and/or update), GET (e.g., make queries), and DELETE data. REST uses HTTP for all four CRUD (Create/Read/Update/Delete) operations.       What ...

Read More »

Behavior-Driven RESTful APIs

software-development-2-logo

In the RESTBucks example, the authors present a useful state diagram that describes the actions a client can perform against the service. Where does such an application state diagram come from? Well, it’s derived from the requirements, of course. Since I like to specify requirements using examples, let’s see how we can derive an application state diagram from BDD-style requirements. ...

Read More »

RESTBucks Evolved

software-development-2-logo

The book REST in Practice: Hypermedia and Systems Architecture uses an imaginary StarBucks-like company as its running example. I think this is a great example, since most people are familiar with the domain. The design is also simple enough to follow, yet complex enough to be interesting.   Problem Domain RESTbucks is about ordering and paying for coffee (or tea) ...

Read More »

Building a simple RESTful API with Spark

java-interview-questions-answers

Disclaimer: This post is about the Java micro web framework named Spark and not about the data processing engine Apache Spark. In this blog post we will see how Spark can be used to build a simple web service. As mentioned in the disclaimer, Spark is a micro web framework for Java inspired by the Ruby framework Sinatra. Spark aims ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.