3 Ways That You Can Operate Record Beyond DTO [Video]

Featured Imgs 23

The record feature has arrived in the latest LTS version, Java 17! Records allow the making of an immutable class without a boilerplate. That is awesome! The question is: how can we use it? In general, we saw a couple of samples with DTO, but we can do more than that. In this tutorial and video, we'll explore design capabilities with a record exceeding DTO.

DTO

We won't focus on it here, but it is worth mentioning that it is a good sample of record but not a unique case.

Ten Questions About Staff Plus Engineers When It Comes to Technical Career Development

Featured Imgs 23

What Is the Difference Between Contributor Individual, Staff Engineer, and Leadership Technical?

Individual Contributors, ICs, are professionals who work with a team or an organization but do not work in management. That is it; they influence a group and an organization; however, they do not have “official responsibility for this.

This contributor performs a great integration and cross-time communication activity and is not isolated, as the name suggests.

Archiving Composition Over the Heritage With CDI Decorator and Delegator

Featured Imgs 23

Composite over inheritance is an OOP design principle we've followed for several years. Like me, you might have seen it in the Effective Java book, and we have wanted to pursue it since then. 

The inheritance brings several pitfalls, such as maintainability and a clear code. Beyond the semantics, the sample that I love to use is the cake that needs Salt. It does not make sense for a Cake to extend a Sea only because it needs Salt. In this case, it is a much better composition as well. 

The CDI Event: How to Archive Success on the Open-close Principle

Featured Imgs 23

When we talk about a good design on Java and OOP, the first thing that might come to mind is the SOLID principle; it brings five easy steps or at least a sign if the code is going in the right direction. CDI for sure helps you to archive the code in the proper order. Today, we'll explain how to take advantage of CDI with CDI and get the Open close principle.

If you forget the SOLID principle, don't worry, we'll put it here to remember what does mean SOLID:

The Power of Enum: Make Your Code More Readable and Efficient [Video]

Featured Imgs 23

Like any other language, Java has the enum feature that allows us to enumerate items. It is helpful to list delimited items in your code, such as the seasons. Regarding the readability of code, it is better and cleaner than using constant codes such as int. It avoids mistakes, such as an invalid number or a value the system does not support. Once we're talking about any number type such as int, float, double, or long, enum can support any value. On the other hand, with an enum, the API only has valid values.  

The question is: Can we do more with enum? Where else can we use an enum?  In this article, discover tips that are excellent and effective in Java.