Home » Archives for Alex Theedom

Author Archives: Alex Theedom

Alex Theedom is a Senior Java Developer and has recently played a pivotal role in the architectural design and development of a microservice based, custom built lottery and instant win game platform. Alex has experience of Java web application development in a diverse range of fields including finance, e-learning, lottery and software development. He is the co-author of Professional Java EE Design Patterns and many articles.

Constrast DataWeave and Java mapping operations

Main points: DataWeave 2.0 provides mapping capabilitiesJava and DataWeave can achieve the same mappingsDataWeave mapping operator is less verbose than Java DataWeave map operator The DataWeave 2.0 (Mule 4) map operator shares similarities with the map() method from Java’s Stream class. Mapping is a transformative operation The idea of mapping is to transform each element of an array and output ...

Read More »

What are Design Patterns?

Design patterns are solutions to known problems. The pattern represents an abstracted solution to a commonly experienced problem. As the solution is abstracted it is language agnostic. A non-programmatic analogy is to think about how to solve the problem of getting wet when it rains. A common problem in rainy countries like the UK. There are several solutions: wear a ...

Read More »

Version control your RAML specifications

java-interview-questions-answers

Version controlling your RAML RESTful API specifications allows you to continue maintaining previous version of your APIs. The API designer from MuleSoft has a build in version control feature that supports simple branching from the master. RAML API Branching Workflow Version the API specification and select the down arrow from the master branch and enter a version number. Click the ...

Read More »

Inline array definition in Java

There are occasion when it is more convenient to create an array inline. Here are several way to declare and initialise primitive arrays and java.util.Lists type arrays. Declare a primitive array Primitive data types are the following: byte, short, int, long, float, double, boolean and char. Arrays of any of these types can be easily declared and initialised. 1 int[] ...

Read More »

How to Hide CloudHub Properties?

Main points: property values can be hidden in Runtime Managerproperty names must be listed in the mule-artifact.xml fileproperty values can be edited manually and will remain maskedvalues remain masked even if removed from mule-artifact.xml file CloudHub Properties CloudHub supports the hiding of application properties in Anypoint Runtime Manager. The property name is displayed but the value is masked with asterisks, ...

Read More »

How to write clean code variables

We know how the code we write works, we understand it, we don’t need comments, it’s obvious, of course, we wrote it. This is what we all think and its true – well today its true, but tomorrow, next week, next year – it’s not likely to be so true. And do others understand the way you code? Is the ...

Read More »

Richardson Maturity Model and Pizzas

java-interview-questions-answers

The model, developed by Leonard Richardson, attempts to classify an API according to its adherence to the constraints imposed by REST. The more compliant your implementation, the better it fares. There are four levels. The bottom is level 0, which designates the less compliant implementation, and the top is level 3, which is the most compliant and therefore the most ...

Read More »

RAML: Four ways to define examples

java-interview-questions-answers

Defining an example body payload and response for a RESTful API endpoint is an essential aspect of designing a modern API. These examples ensure that it is clear what the API contract expects to receive from the client and to respond with to the client. In this post, I will highlight four ways to specify the expected incoming and outgoing ...

Read More »

Rebuild a Maven repository in 3 steps

In this blog post, I will show a way to very quickly rebuild a Maven repository without having to set up a project. Step 1: Delete all artifacts Cleanse your Maven repository by deleting the contents of the /.m2/repository directory. Ensure to delete the settings.xml file if so required. Step 2: Create a dummy POM file Create the simplest POM ...

Read More »