Hopefully by now, you know how to write your first Rest DSL Camel Route using Spring Boot. If not, check this post first. Now that you have your route written, it’s time to write a unit test for it. Many people find Apache Camel unit testing a big struggle to figure out. Luckily, when using Spring Boot with the Apache Camel Rest DSL testing, a Rest Route isn’t too difficult.
Continue reading “Unit Testing for Camel Rest DSL and Spring Boot”
This post is the third in a series on the Introduction to Eclipse Vert.x. So, let’s have a quick look back at the content of the previous posts. In the first post, we developed a very simple Eclipse Vert.x application and saw how this application can be tested, packaged, and executed. In the second post, we saw how this application became configurable and how we can use a random port in a test.
Well, nothing fancy… Let’s go a bit further this time and develop a CRUD-ish / REST-ish application. So an application exposing an HTML page interacting with the backend using a REST API. The level of RESTfulness of the API is not the topic of this post; I leave it you to decide as it’s a very slippery topic.
So, in other words, we are going to see:
- Vert.x Web – a framework to let you create web applications easily using Vert.x.
- How to expose static resources.
- How to develop a REST API.
Continue reading “Some REST with Vert.x (Part 3 of Introduction to Vert.x)”
Rest services are becoming more and more popular for communication between systems. Now that Red Hat supports the use of Red Hat JBoss Fuse with Apache Camel Spring Boot, learn how you can get started with the Rest DSL and Spring Boot. These directions will use the camel-servlet component, although various components can be used.
Continue reading “Writing Your First Camel Spring Boot Project With the Rest DSL”
Prerequisite: Hands on Knowledge of REST API Development using JAX-RS.
REST Services has been an integral part of complex enterprise applications for several years. Developers generally prefer two APIs listed below for building REST API in their enterprise applications.
- JAX-RS – Part of JEE Specification with different implementations like RestEasy, Jersey, Restlet etc.
- Spring Boot – An OpenSource Spring Community Project best suited for Microservices-based applications.
In this Article, we will learn how to handle Exceptions gracefully in Rest APIs which are built using JAX-RS.
Continue reading “Handling Exception Scenarios in REST API developed using JAX-RS”
Most of the time, I see developers are bit confused about the term REST. For some enterprise application developers, the meaning of REST is JSON i.e. if they are using JSON in their application, which means they working on REST API, which is not true to some extent. Let’s take a look what exactly a REST API is.
Continue reading “Know how RESTful your API is: An Overview of the Richardson Maturity Model”
Note: This is an updated version of a post I wrote for my private blog years ago.
While working on the REST API of RHQ a long time ago, I had started writing some integration tests against it. Doing this via pure HTTP calls is very tedious and brittle. So, I was looking for a testing framework to help me and found one that I used for some time. I tried to enhance it a bit to better suit my needs but didn’t really get it to work.
I started searching again and this time found REST Assured, which is almost perfect as it provides a high-level fluent Java API to write tests. REST Assured can be used with the classic test runners like JUnit or TestNG.
Continue reading “Testing REST APIs with REST Assured”
Recently, one of the most advocated means of creating services has been through the use of RESTful services. Before we continue, we would like to explain exactly what REST means and what criteria must be met before a service is indeed RESTful.
Continue reading “RESTful Services”
Apache Camel is a piece of JBoss Fuse. It is an open source integration framework with a variety of components to fit your integration needs. Camel is a Java-based implementation of the Enterprise Integration Patterns based on a book by Gregor Hohpe and Bobby Woolf. Camel includes components for HTTP, Files, FTP, JMS, JDBC, AWS, and much more. While Camel can be used for many different purposes, this post will focus on the REST DSL specifically.
Continue reading “The Camel Rest DSL”
Continuing on with my series about microservices implementations (see “Why Microservices Should Be Event Driven”, “Three things to make your microservices more resilient”, “Carving the Java EE Monolith: Prefer Verticals, not Layers” for background) we’re going to explore probably the hardest problem when creating and developing microservices. Your data. Using Spring Boot/Dropwizard/Docker doesn’t mean you’re doing microservices. Taking a hard look at your domain and your data will help you get to microservices.
Continue reading The Hardest Part About Microservices: Your Data
A few days ago I had a rant about the misuse and misunderstanding of REST (typically HTTP) for microservices.
To summarize, a few people/groups have been suggesting that you cannot do asynchronous interactions with HTTP, and that as a result of using HTTP you cannot break down a monolithic application into more agile microservices. The fact that most people refer to REST when they really mean HTTP is also a source of personal frustration, because by this stage experienced people in our industry really should know the difference. If you’re unsure of the difference then check out the restcookbook or even Roy’s PhD thesis (it’s quite a good read!)
However, I digress, so back to the rant: My goal is to point people in the right direction and make some recommendations, hence this followup post.
Continue reading “REST and microservices – breaking down the monolith step by asynchronous step”