Java for REST Web Services Apps

Java for REST Web Services Apps

Web services based on the REST architecture is the modern way of designing server services. In this course you will learn how to implement both REST client-side as well as server-side applications.
This is what you will learn
  • Design your own REST-WS API
  • Use REST-WS command-line clients
  • Implement Java clients invoking REST web services
  • Implement XML, JSON, CSV and other forms of paylaod encoding
  • Design and implement REST-WS server applications
  • Design server applications using the SparkJava framework
  • Design REST-WS applications using JAX-RS annotated code and Jersey
  • Generate technical REST-WS documentation using Swagger
  • Implement authentication using JWT
Course Contents

HTTP

  • Understand the HTTP protocol
  • HTTP request operations
  • HTTP response codes
  • MIME types
  • Understand the HTTPS hand-shake

REST

  • Understand the REST web services design idea
  • REST resource URIs
  • REST operations
  • Sub-resource URIs
  • REST anti-patterns to avoid

SOAP

  • What is SOAP
  • Whats is WSDL
  • Sample SOAP request and response
  • Understand why SOAP is not used any more

Payload Encoding

  • Open-source libraries for XML
  • Open-source libraries for JSON
  • Overview of Simple XML
  • Parsing XML
  • Generating XML
  • Overview of GSON
  • Parsing JSON
  • Generating JSON
  • Using CSV as the payload encoding
  • Using Java Properties format as the payload encoding

Web Services CLI Tools

  • Why use CLI tools
  • cURL - standard HTTP tool
  • HTTPie - smart REST-WS tool
  • jq - smart JSON processing
  • json-server - quick back-end server
  • JSON PlaceHolder - fake back-end server

Java HTTP Client Invocations

  • Class URL
  • Class URLConnection
  • Class HttpURLConnection
  • Fetching data via HTTP GET
  • Pushing data via HTTP POST
  • Using HTTP PUT/PATCH/DELETE

Java REST Client Tools

  • Using David-Webb
  • Using RESTy

Setting up a Spark-Java Server

  • Overview of Spark-Java
  • Installation
  • Setting up routes
  • Handling JSON payload in the response
  • Handling JSON payload in the request
  • Designing CRUD REST operations
  • Dealing with exceptions
  • Best pratices

Groovy, Grails & Spock

  • Quick intro & motivation why using Groovy tools might be a good idea
  • Groovy - a super-set of Java (as in Java++)
  • Grails - a framework built on Spring & Hibernate, to create web-apps quickly
  • Spock - a versatile testing framework
  • Groovy REST-WS client

AJAX

  • What is AJAX
  • What is asynchronous processing in JavaScript
  • Understanding XMLHttpRequest
  • Brief about jQuery

CORS

  • What is CORS
  • Request & response CORS headers
  • Understanding CORS pre-fligth operations
  • CORS client-server interaction

Annotations Based REST-WS with JAX-RS

  • What is JAX-RS
  • Resource annotations
  • HTTP method operations
  • URI paramters
  • Method parameter annotations
  • JAX-RS implementations
  • Using Jersy
  • Jersey payload encoding alternatives for JSON & XML
  • Using JSON-P
  • Using Moxy
  • Using a Grizzly embedded HTTP server for a Jersy app
  • CRUD operations in JAX-RS @ Jersy

Generated RES-WS Documentation with Swagger

  • What is Swagger
  • The Swagger architecture
  • Swagger JSON specification file
  • Swagger Editor
  • Swagger UI web-app
  • API annotations
  • How to create a REST-WS Jersey web-app with automatic and interactive documentation by Swagger

Authentication using JWT

  • What is a web token
  • How does JWT authentication work
  • Installation of jjwt
  • Using Java JWT
  • Typical use cases
  • Augmenting spark with an JWT authentication filter
  • Authentication online services

Authentication using OATH and a 3rd party

  • What is OAUTH
  • How can a user logon to my site by authenticating somewhere else
  • Installing of the SocialAuth Java library
  • Using Google as the provider
  • Setting up Spark-Java for 3rd party authentication
Facts
NameJava for REST Web Services Apps
Duration2 Days
LevelIntermediate
AudienceJava programmers
PrerequisitesPractical knowledge in Java programming
Tools
  • Java JDK, version 10+
  • JetBrains IntelliJ IDEA
Price 15 000 kr + moms 15000
Course Dates
DatePlace
Loading course dates...
Same-Company Discout

We offer a 20% discount for additional participants from the same company and at the same course date. Read more here.

On-Site Course

If you order an On-Site course, we will come to you and hold the course in your office. The price is determined by our price model and is based on the number of course days, number of participants and any travel and lodging.

Read more about out price modell and term of sales here.

Related Courses
CourseDays Level
Java Basics5BeginnerShow
Java Intermediate3IntermediateShow
Java Threads and Concurrent Programming2 AdvancedShow