DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Enterprise AI Trend Report: Gain insights on ethical AI, MLOps, generative AI, large language models, and much more.

2024 Cloud survey: Share your insights on microservices, containers, K8s, CI/CD, and DevOps (+ enter a $750 raffle!) for our Trend Reports.

PostgreSQL: Learn about the open-source RDBMS' advanced capabilities, core components, common commands and functions, and general DBA tasks.

AI Automation Essentials. Check out the latest Refcard on all things AI automation, including model training, data security, and more.

Core Badge
Avatar

Otavio Santana

DZone Core CORE

Award-winning Software Engineer and Architect at OS Expert

Leiria, PT

Joined Oct 2015

https://otaviojava.com/

About

Otavio, a passionate cloud and Java expert, empowers software engineers with open-source best practices for highly scalable, efficient software. He's a renowned contributor to the Java and open-source ecosystems, receiving numerous awards and accolades. Otavio's interests include history, economy, travel, and fluency in multiple languages, all seasoned with a sense of humor.

Stats

Reputation: 6974
Pageviews: 2.0M
Articles: 132
Comments: 41

Expertise

Databases Expertise Icon

Databases

Team Management Expertise Icon

Team Management

  • Articles
  • Comments

Articles

article thumbnail
Understanding Polyglot Persistence: A Necessity for Modern Software Engineers and Architects
Expand your toolkit beyond a single technology to effectively address varied problems and enhance application performance.
March 29, 2024
· 646 Views · 1 Like
article thumbnail
Unlocking the Power of Oracle NoSQL With Quarkus: Seamless Integration for Cloud-Age Applications
Learn how to integrate Oracle NoSQL with Quarkus using JNoSQL for seamless cloud-native application development. Check out the source code for hands-on exploration.
February 26, 2024
· 5,054 Views · 1 Like
article thumbnail
Building a REST Application With Oracle NoSQL Using Helidon
Dive into effortlessly creating a RESTful API with Java using Helidon and Oracle NoSQL in a straightforward manner, perfect for beginners.
February 19, 2024
· 2,940 Views · 3 Likes
article thumbnail
The Power of Refactoring: Extracting Interfaces for Flexible Code
Refactoring prioritizes adaptability over preemptive complexity, simplifying code to be flexible for inevitable change.
February 15, 2024
· 2,598 Views · 1 Like
article thumbnail
Achieving Inheritance in NoSQL Databases With Java Using Eclipse JNoSQL
Explore Eclipse JNoSQL and MongoDB to streamline NoSQL database interactions in Java applications, making it easier to manage and manipulate diverse data sets.
February 12, 2024
· 3,864 Views · 2 Likes
article thumbnail
Exploring the New Eclipse JNoSQL Version 1.1.0: A Dive Into Oracle NoSQL
Eclipse JNoSQL 1.1.0 simplifies Java's NoSQL database integration with Jakarta Data annotations and custom repositories for easier and more business-centric code.
February 6, 2024
· 2,895 Views · 4 Likes
article thumbnail
A Five-Step Methodology for Maximizing Efficiency in Software Engineering Meetings
Efficient software engineering meetings that are vital for saving time and improving collaboration, are facilitated by a five-step methodology emphasizing documentation and clear communication.
January 7, 2024
· 4,720 Views · 3 Likes
article thumbnail
Simplifying Database Operations With HarperDB SDK for Java
In this hands-on session, explore how HarperDB SDK for Java streamlines NoSQL integration, abstracts HTTP complexities, and enables efficient CRUD operations.
December 15, 2023
· 6,336 Views · 4 Likes
article thumbnail
Getting Started With Boot Spring 3.2.0: Building a Hello World REST API With NoSQL Integration
In this tutorial, learn how to build a "Hello World" REST API integrated with HarperDB using Spring Boot 3.2.0.
December 14, 2023
· 3,963 Views · 7 Likes
article thumbnail
Architecting Excellence: Guided Insights for Elevated Code Design
In this post, explore how to elevate your code design today with insights from essential reads, guiding you to excellence in software architecture.
December 11, 2023
· 5,330 Views · 4 Likes
article thumbnail
The Pitfalls of Using Boolean Parameters in Methods: A Java Tutorial
Ditch boolean parameters for clearer, more maintainable code, reducing ambiguity in method calls and enhancing overall readability.
December 8, 2023
· 6,586 Views · 1 Like
article thumbnail
Navigating NoSQL: A Pragmatic Approach for Java Developers
Eclipse JNoSQL 1.0.3 empowers Java devs with ArangoDB. Simplify NoSQL integration and persist data effortlessly. Explore hands-on code sessions!
December 4, 2023
· 4,423 Views · 3 Likes
article thumbnail
Navigating Software Leadership in a Dynamic Era
Explore why leading in software isn't a static ride. Learn the risks of past success reliance, the dangers of detachment, and the importance of continual learning. Adapt, shatter illusions, and understand the evolution, including emerging roles like the Staff Engineer, bridging coding and strategy in the dynamic realm of software development.
December 2, 2023
· 4,390 Views · 2 Likes
article thumbnail
Java 11 to 21: A Visual Guide for Seamless Migration
Upgrade Java 11 to 21 for enhanced security, framework support, new features, and performance. Follow a step-by-step guide for a smooth transition.
December 1, 2023
· 16,758 Views · 16 Likes
article thumbnail
The Power of Data-Driven Testing: A Deep Dive into Jakarta Persistence Specifications and NoSQL
Transforming legacy code with Jakarta Persistence: Data-driven testing, modern libraries, and tools enhance quality and efficiency.
December 1, 2023
· 2,585 Views · 2 Likes
article thumbnail
Simplify Java: Reducing Unnecessary Layers and Interfaces [Video]
Simplify Java code by reducing unnecessary layers and interfaces. Unlock the power of simplicity to enhance maintainability without sacrificing functionality.
November 30, 2023
· 4,323 Views · 3 Likes
article thumbnail
Mastering Java Persistence: Best Practices for Cloud-Native Applications and Modernization
From polyglot databases to paradigm integration, success in Java Persistence hinges on smart choices, seamless integration, and adaptability to evolving needs.
November 13, 2023
· 6,950 Views · 8 Likes
article thumbnail
Harness the Power of Quarkus and HarperDB for Efficient Data Management
In this tutorial, learn how to build a Quarkus-based microservice API integrated with HarperDB, a robust, high-performance database.
November 1, 2023
· 6,835 Views · 3 Likes
article thumbnail
Powering Enterprise Applications: Unleashing the Java-MongoDB Synergy
Learn how Quarkus, Spring Data MongoDB, Morphia, Jakarta EE, and Eclipse JNoSQL streamline integration for high-performance solutions.
October 29, 2023
· 5,976 Views · 2 Likes
article thumbnail
Unlocking Performance: Exploring Java 21 Virtual Threads [Video]
Java 21 introduces efficient virtual threads alongside traditional platform threads, offering performance benefits and flexibility.
October 19, 2023
· 8,202 Views · 5 Likes
article thumbnail
Java 21 Record and Pattern Matching: Master Data-Oriented Programming[Video]
Java 21's JEP 440 introduces record patterns for data navigation, while JEP 441 brings pattern matching to switch statements, streamlining data-oriented programming.
October 15, 2023
· 7,530 Views · 2 Likes
article thumbnail
Getting Started With HarperDB and Java: Your First "Hello, World" Integration
In this article, learn how HarperDB integrates with Java as a choice for building real-time and data-intensive applications.
October 9, 2023
· 5,288 Views · 4 Likes
article thumbnail
Java 21 SequenceCollection: Unleash the Power of Ordered Collections
Java 21 introduces SequenceCollection, enabling precise control over ordered collections with methods like addFirst, addLast, and reversed.
October 5, 2023
· 9,107 Views · 13 Likes
article thumbnail
Eclipse JNoSQL 1.0.2: Empowering Java With NoSQL Database Flexibility
Explore Java-NoSQL integration with Eclipse JNoSQL and Quarkus, and learn how to make the most of NoSQL databases within Java-based projects.
October 3, 2023
· 3,445 Views · 2 Likes
article thumbnail
The Power of NoSQL Databases: Exploring Polyglot Persistence [Video]
Embark on an exciting journey into NoSQL databases, unlocking their potential and understanding how they coexist with traditional relational databases.
October 2, 2023
· 1,802 Views · 1 Like
article thumbnail
Unraveling Lombok's Code Design Pitfalls: Exploring Encapsulation Issues
Lombok simplifies Java coding but can breach encapsulation. Java 8's Objects.requireNonNull and IDE support are alternatives. Choose wisely.
September 16, 2023
· 7,265 Views · 8 Likes
article thumbnail
Mastering Persistence: Why the Persistence Layer Is Crucial for Modern Java Applications
Ignoring the persistence layer in software can cause data problems, slow performance, maintenance issues, and limited adaptability. It's vital for secure, efficient, and flexible applications.
September 15, 2023
· 5,843 Views · 1 Like
article thumbnail
Exploring Seamless Integration: Jakarta Data and Jakarta Persistence in Jakarta EE 11 With Open Liberty
Dive into Jakarta Data and Jakarta Persistence integration, streamlining SQL database handling in Jakarta EE 11 with Open Liberty and PostgreSQL.
August 16, 2023
· 4,926 Views · 4 Likes
article thumbnail
Comparing ModelMapper and MapStruct in Java: The Power of Automatic Mappers
Learn how to choose between automatic mappers ModelMapper and MapStruct to improve productivity and maintainability, as well as reduce errors in data mapping.
August 2, 2023
· 12,530 Views · 4 Likes
article thumbnail
Comparing MongoDB and Couchbase in Java Enterprise Architecture
Explore key differences, comparisons, and trade-offs between MongoDB and Couchbase used with Java in real-world enterprise architectures.
July 27, 2023
· 7,385 Views · 5 Likes

Comments

A Five-Step Methodology for Maximizing Efficiency in Software Engineering Meetings

Jan 10, 2024 · Otavio Santana

Thank you, and I am glad that you enjoyed it.

Architecting Excellence: Guided Insights for Elevated Code Design

Dec 20, 2023 · Otavio Santana

Thank you for your opinion.

Indeed, simplicity is hard to trust, mainly because we have a complexity bias. We start to realize it with time and experience.


It is expected to feel more confident with a thousand layers and interfaces because you might need them in the future instead of doing what you need and then refactore the code.


If I can use a picture, I would use this:



Use when it makes sense; don't try to put several layers because it is cool, and focus on simplicity.

Architecting Excellence: Guided Insights for Elevated Code Design

Dec 20, 2023 · Otavio Santana

> But how a new implementation of a service might be provided, given that the service doesn't have an interface and, hence , it isn't even a service ?


The simple answer: is refactoring. With the code provided, a good test, and documentation, you can extract the interface. Modern IDE can help you to do it as well.


> I would be curious to understand how do you think to use the template one, without interfaces ?

The interfaces are a requirement. But please, don't use all the patterns all the time. My point is: to use it when it is needed.


> how do you deal with functional interfaces?

It makes to use, thus, use it.


Yes, you can use interfaces and explore patterns without overengineering



Architecting Excellence: Guided Insights for Elevated Code Design

Dec 20, 2023 · Otavio Santana

What is easier:
See the future or refactor the code and put interfaces when needed?


I am not against interfaces, but I don't believe that all applications need SPI, thousands of interfaces, and several layers; just because Netflix or other companies do, it does not make sense either.


My point is the balance, and yes, I spent more time putting into tests and documentation instead of creating an interface because you might need it in the future.

Java 11 to 21: A Visual Guide for Seamless Migration

Dec 07, 2023 · Otavio Santana

Thank you, I will fix it, ASAP.

Java 11 to 21: A Visual Guide for Seamless Migration

Dec 07, 2023 · Otavio Santana

That is the code designer dream!

Java 11 to 21: A Visual Guide for Seamless Migration

Dec 07, 2023 · Otavio Santana

I am glad that you enjoyed it.
For now, I used this formula to migrate 45 microservices.
So far, so good.


Simplify Java: Reducing Unnecessary Layers and Interfaces [Video]

Dec 04, 2023 · Otavio Santana

You are right!
Thank you for bringing this up!

Indeed, the balance is crucial.

Eclipse JNoSQL 1.0.2: Empowering Java With NoSQL Database Flexibility

Oct 07, 2023 · Otavio Santana

Thank you, Ronaldo; I am glad that you enjoyed it.


Unraveling Lombok's Code Design Pitfalls: Exploring Encapsulation Issues

Sep 20, 2023 · Otavio Santana

Thank you for your valuable feedback; I genuinely appreciate it. Your mention of several annotations in the Lombok framework brings up some critical points.


As I mentioned, working with any framework involves trade-offs, and Lombok is no exception. Every design and architectural decision comes with its set of advantages and disadvantages.


One significant concern I have pertains to using the Data annotation in Lombok. This annotation, while convenient, has the potential to break the principles of encapsulation that are fundamental to Object-Oriented Programming (OOP). In traditional OOP, we emphasize the concept of hiding data and exposing behavior, encapsulating data within classes to maintain data integrity and control access. The Data annotation, however, tends to encourage an anemic model, where data and behavior are separated. It can lead to data inconsistency issues because it blurs the boundaries between data and behavior.


It's important to note that frameworks like Lombok can sometimes misguide developers by providing convenient shortcuts that may not align with best practices. I recommend using IDE templates or other tools that promote a more explicit and maintainable code structure in cases like these.


Again, thank you for the feedback.

Unraveling Lombok's Code Design Pitfalls: Exploring Encapsulation Issues

Sep 20, 2023 · Otavio Santana

Hey, thank you for your feedback.

I hope to get better in the following video.


The emphasis on modern API design has undeniably shifted towards declarative APIs. This approach is rooted in the idea that APIs should prioritize safety and actively prevent developer errors. As software engineers, we must grasp the trade-offs inherent in the frameworks we use. Problems stemming from inadequate encapsulation can potentially lead to security vulnerabilities, and it's worth remembering that in the realm of security, we adhere to the CIA triad, where 'C' stands for consistency.


I strongly encourage you to delve deeper into object-oriented programming (OOP) principles and explore classic literature like "Clean Code." These timeless resources champion the primary objective of concealing intricate details while exposing desired behaviors.



It's essential to recognize that if an API guides a developer toward a mistake, we should seriously question whether it makes sense to include such a feature. Sometimes, these seemingly helpful additions can inadvertently act as auto-destruct buttons, leading to unexpected consequences. Thus, carefully evaluating an API's design and its potential impact on developer actions is paramount to ensure its effectiveness and safety.

Again, super thank you for the feedback.

Avoiding Pitfalls With Java Optional: Common Mistakes and How To Fix Them [Video]

Jun 09, 2023 · Otavio Santana

Optional in Java it still WIP, since Java 11, it has made several progress.


Avoiding Pitfalls With Java Optional: Common Mistakes and How To Fix Them [Video]

Jun 09, 2023 · Otavio Santana

Optional is a good tool, but there is no silver bullet.

In the end, we are talking about trade-offs.

What Is Essentialism, and How Does It Make Software More Efficient?

Jan 17, 2023 · Otavio Santana

Hey Jasper.

Thank you, I included this book on my list. This one will be my next.

Ultra-Fast Microservices: When MicroStream Meets Helidon

Dec 13, 2022 · Otavio Santana

That is my pleasure, always.

Data Software Design Pitfalls on Java: Should We Have a Constructor on JPA?

Aug 04, 2022 · Otavio Santana

Those are great points; thank you for sharing.

ORMs: Heroes or Villains Inside the Architecture?

Jul 19, 2022 · Otavio Santana

Good point, thank you.
I'll request an update.

Java’s Encapsulation - When the Getter and Setter Became Your Enemy

Jul 01, 2022 · Otavio Santana

Hey, Robert. Thank you for your comments.


I don't follow your "security". Could you explain better?

But if you look at the CIA triad and the ISO/IEC 27001, you'll see integrity and consistency.


Does encapsulation help with consistency?

Does encapsulation help avoid leaks in the application?


If you look at clean code by uncle bob, you'll see the expression "OOP hide data to expose behavior" and guarantee that you don't have an inconsistency in your application, such as a null item in a list is a sample of it.


The point is, you're right. A good encapsulation helps with knowledge, abstraction, and expressiveness. Furthermore, it helps with consistency and data integrity on some occasions. Those are not exclusive but inclusive.





Intro to Spring Data MongoDB Reactive and How to Move It to the Cloud

Jan 26, 2022 · Otavio Santana

I'm glad that you enjoyed it.

It has been updated, please check it now.


Thank you.

Fluent-API: Creating Easier, More Intuitive Code With a Fluent API

Sep 13, 2021 · Otavio Santana

Hey Nicolas.
Thank you for sharing.

It is a good one.

Introduction to Reflectionless: Discover the New Trend in the Java World

May 11, 2021 · Otavio Santana

You're welcome.

Introduction to Reflectionless: Discover the New Trend in the Java World

Apr 03, 2021 · Otavio Santana

Thank you, I'm glad to hear it.

Java 2021: What Frameworks and Trends for This New Year?

Mar 13, 2021 · Otavio Santana

Thank you.

Java 2021: What Frameworks and Trends for This New Year?

Feb 16, 2021 · Otavio Santana

Thank you.

Introduction to Reflectionless: Discover the New Trend in the Java World

Feb 06, 2021 · Otavio Santana

Yeap, this is one solution to move away from the reflection, with the same API, so with annotations.

We've changed the issue to compilation time from the runtime.

DTO: Hipster or Deprecated?

Oct 09, 2020 · Otavio Santana

You're welcome.

Micronaut in the Cloud: PostgreSQL with JPA

Sep 14, 2020 · Otavio Santana

Thank you :)

Java: It’s Time to Move Your Application to Java 11

Mar 29, 2020 · Otavio Santana

Yes, I know, and I have this feeling. Migration to Java 11 from Java 8 is a colossal pain, mainly because of the modules.

The good news is several Java EE/Jakarta EE vendors have support in Java 11. Furthermore, the next version in July will release with Java 8/11 as a minimum requirement.

What I did to migrate as keep in the maven as Java 8 while I compiled with Java 11. And I did step by step to relocate; I did not move in a huge step.

Get to Know JSF: An Easy and Straightforward a Jakarta Framework

Mar 23, 2020 · Otavio Santana

Now, JSF still alive.

There is a group around that you can join if you wish:

https://jakarta.ee/specifications/faces/


Furthermore, there are several libraries such as primefaces that has released the latest version this month:


https://mvnrepository.com/artifact/org.primefaces/primefaces

Scale Your Application With Spring and RabbitMQ

Dec 09, 2019 · Otavio Santana

Please check with the dependencies that I sent to you.

I checked from the documentation:


https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/jms/support/converter/MappingJackson2MessageConverter.html#setTargetType-org.springframework.jms.support.converter.MessageType-

Scale Your Application With Spring and RabbitMQ

Dec 09, 2019 · Otavio Santana

Hey, I'm glad that you liked it.

Yes, I have it in a repository:


https://github.com/platformsh/java-quick-start/tree/master/spring/spring-jms


Please, let me know if there is any further question. I'll have all the pleasure of answering it.

Designing Bulletproof Code

Jun 18, 2019 · Otavio Santana

Thank you, fixed.

Data Integrity in NoSQL and Java Applications Using Bean Validation

May 07, 2019 · Otavio Santana

Nice write-up! Btw. @Hibernate Validator supports the validation of monetary amounts and Currency out of the box; just add the Money JSR API:
https://docs.jboss.org/hibernate/stable/validator/reference/en-US/html_single/#section-builtin-constraints

Ref: https://twitter.com/gunnarmorling/status/1125709428945301504

Designing Bulletproof Code

Apr 29, 2019 · Otavio Santana

Yes, that is an issue when we have a class with several fields.

I know that there are several frameworks whose can help us with this builder. Such as IntelliJ IDE with several plugins and templates. And these frameworks:

http://immutables.github.io/

https://projectlombok.org/


Designing Bulletproof Code

Apr 29, 2019 · Otavio Santana

Hey, thank you. I glad that you liked it.

Yes, I could do a fluent API on the builder to make even more natural the constructor.

The point is the scope, and I would like to create both the builder pattern and a rich model to get data integrity.

There is an excellent article whose covers more this detail:

https://www.code-held.com/2019/04/29/robust-builder-pattern/


I avoided a final field because on the ORM frameworks such as Hibernate it uses reflections on the field; therefore, when you use this kind of tools usually don't use final fields, unfortunately.

Designing Bulletproof Code

Apr 26, 2019 · Otavio Santana

Hey Robert, thank you for the comments.

Yes, you're right.

That still missing some points to make the model rich, that why I talked in conclusion about the next steps, otherwise, this post would be so huge.

Java Reflection, but Faster

Nov 06, 2018 · Geoffrey De Smet

Did you try the same test with the setter method? What was the result?

How to Use Couchbase With Java

May 04, 2018 · Otavio Santana

Hey, that is a Java EE project, so what we can do is run this command:

  • mvn clean package tomee:exec -DskipTests


Eclipse JNoSQL: A Quick Overview of Redis, Cassandra, Couchbase, and Neo4j

Mar 15, 2018 · Otavio Santana

The source code: https://github.com/soujava/polyglot-persistence

Writing Tests With JUnit 5 and CDI 2.0

Feb 19, 2018 · Otavio Santana

Thank you, Denis.

Making Graph Databases Fun Again With Java

Dec 28, 2017 · Otavio Santana

Thank you, I'm delighted that you enjoyed it.

User has been successfully modified

Failed to modify user

ABOUT US

  • About DZone
  • Send feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: