Sit Back And ReST
Using Restlet for self-documenting web services
Senior Software Engineer
Sungard Availability Services
Organizer: Java Users Group of Greater Louisville (JUGGL)
Representational State Transfer (ReST) is a software architecture style consisting of guidelines and best practices for creating scalable web services. ReST is a coordinated set of constraints applied to the design of components in a distributed hypermedia system that can lead to a more performant and maintainable architecture.
In computing, microservices are a software architecture style in which complex applications are composed of small, independent processes communicating with each other using language-agnostic APIs.
Typically single-purpose and dedicated to a limited set of functionality!!
Dependency injection allows a program design to follow the dependency inversion principle where modules are loosely coupled. With dependency injection, the client which uses a module or service doesn't need to know all its details, and typically the module can be replaced by another one of similar characteristics without altering the client.
Putting it all together, we get a microservices-style API application which is modular, easily refactored, scalable, and robust.
With the tools I will demonstrate, you can have an API service up and running in MINUTES!
- Java 8 - Lambdas and Parallelism
- Maven - Project Build/Deployment
- Restlet Framework - Simplified ReST Implementation
- Apache DeltaSpike - Dependency Injection
- Hibernate/JPA - For Database Access/Abstraction
- Project Lombok - Reduced Boilerplate
- RAML - Documentation
- MeanBean - Unit Testing
- JUnit - Unit Testing
- Mockito - Mocking for Unit Tests
- Install Java 8
- Install Maven 3.3.1
- Generate project from archetype
Let's dig in an try to understand what is going on in this application.
Remember, I am only showing a small subset of the features which Restlet provides, but it also gives you a great deal more!
Sit Back And ReST
By Deven Phillips