The Composite design pattern has the intention to represent part-whole as your friends on social media or a tower, as in the picture below.

Tokyo skytree tower

Why this pattern?

Compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly [1].

Using a composite structure, we…


When do you need to connect things, one of the options is to build a bridge, and this pattern is an example of it in code time upfront of integrations.

Forth Railway Bridge, Scotland
  • For more about this bridge, click here.

Motivation

Excerpt from GOF book[1],

When an abstraction can have one of several possible…


Ready to not use your local environment? This is the idea behind the GitPod “Spin up fresh, automated dev environments, for each task, in the cloud, in seconds.

Pixabay

1. Why?

Don’t use your laptop/computer to code, instead use a browser to do it. Be Java, React, JavaScript etc.

2. Pricing

You can play into…


By default when I need to write a code to communicate with Repository I thought to use CrudRepository, but the JpaRepository also is an option, so should I review my bias?

A380 Cockpit — From Andrés Dallimonti

1. Acronym

  • CRUD — Create Retrieve Update Delete operation
  • JPA — Java Persistence Api
  • API — Application Program Interface
  • IDE —…


To prevent working with production resources in a local/dev environment the use of profiles is highly important, in this article let’s see how Quarkus helps us to achieve the environment configuration.

1. Definition

  • Profile → Provide a way to segregate parts of your application configuration and make it only available in certain…

Since Java 1.5 when the Generics was introduced, the Java developer life changed a lot, and changed in a good way.
In this article will handle Covariance(? extends T) and Contravariance(? super T) and will be splitted into definition, example, and conclusion.

1. Definition

1.1. Covariance

Using the covariance is allowed to…


A long time ago in a city far, far away…. 👾 well in fact was in Araraquara, Brazil 🇧🇷. …


Working with a dev environment is kind of different from prod, and managing the changes should be too. To achieve the changes Liquibase is an option rather than Hibernate create-drop strategy.

Database tables

Why

To maintain all DB schema changes into one place, Liquibase has these reasons.

  1. Version-controlled database schema changes
  2. Automatically orders…


Write code is great, but sometimes is better generate code than type them. For this article I’ll present some options, such as Lombok and MapStruct.

Time is money

Why?

As I said before, sometimes writing a repeated piece of code is not a good idea, since this is a DRY (Don’t Repeat Yourself).

Back…


Working with Lists is a common task in Java, but this task should be done carefully whether the unmodifiable or immutable is required.

Change

1. Why?

This article covers the change inside the elements of the List in order to avoid problems, for instance: Where is the element nth? …

Luiz Gustavo De O. Costa

Hi there 👋 , I’m Luiz Gustavo I’m a Brazilian and don’t play soccer very well, then I became a software developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store