Posts tagged REST (2)

What’s New in Jakarta REST 3.1 in Jakarta EE 10?

The Representational State Transfer or RESTful architecture is a stateless, HTTP based communication standard for modern applications. It was originally proposed by Dr. Roy Fielding in hisPhD thesis. It has, over the years, become the default, programming language-agnostic means of enabling machine-to-machine communication. An application written in the Django framework in Python can have REST resources that are consumed by another application written in Java with Jakarta EE. Similarly, a Jakarta EE application can create resources that can be consumed by a C# application.  

Did You Know? Asynchronous REST Requests and Responses with Java EE and MicroProfile

Java EE 8 fully supports asynchronous handling of REST requests and responses, on both client and server side. This is useful to optimize throughput of an application or even when adopting reactive principles. MicroProfile type-safe REST client API also supports this concept to allow you to call REST services asynchronously with a much more straightforward way with plain Java interfaces.

Payara Platform on Microsoft Azure: Accessing SQL Databases

Microsoft Azure provides fully managed Cloud SQL databases for use by your Azure hosted cloud services. Payara® Micro is built to be the best runtime for Cloud Native Java EE and MicroProfile applications. Here’s how to rapidly create a REST web service that retrieves data from an Azure SQL Database and returns it as JSON.

Consuming a REST Service

A REST Service in Java EE can be created using JAX-RS. The contents of such service can be consumed using ordinary HTTP requests to a URL. URLs are typically kept simple and have a logical pattern, so it's easy to type them manually in e.g. a browser. This is different from SOAP, which essentially uses HTTP as well, but is designed to be rather complex and therefor making it not so easy to quickly test something in a browser.

 

Securing a REST Service

If you're building a REST service, then that REST service will expose some kind of data or will allow some kind of interactions with a server. For instance, consider a Facebook REST service that allows you to retrieve your chat history. Naturally you don't want just anyone looking at that history, hence the need for security.