How to Find Hibernate Performance Issues in Development and Production

How to Find Hibernate Performance Issues in Development and Production

Thorben Janssen Developer Tips, Tricks & Resources

The Java Persistence API (JPA) is used in most Java applications to interact with a relational database. One of its most popular implementations is the Hibernate ORM, because it uses object-relational mapping to abstract database interactions and makes implementing simple CRUD operations very simple. But this abstraction also has its downsides. Hibernate uses a lot of internal optimizations and hides …

Performance tuning tips for Java

11 Simple Java Performance Tuning Tips

Thorben Janssen Developer Tips, Tricks & Resources

It’s one thing to write code that works. But what about clean, readable, concise code? That’s another thing entirely. To create an app that solves one problem? Not that hard. What about one that not only solves the problem, but it’s also easy and pleasurable to use? Now we’re talking. You could apply the same reasoning for many software properties, …

Java Logs: 4 Types of Logs You Need to Know

Thorben Janssen Developer Tips, Tricks & Resources

Logging is an important topic in software development, especially if you need to analyze bugs and other unexpected events in your production environment. Implementing your logging often seems easy. But as you probably experienced yourself, logging is far more complex than it might seem. That’s why you can find lots of articles about it here on the blog. As an …

design principle_ service locator

Design Patterns Explained – Service Locator Pattern with Code Examples

Thorben Janssen Developer Tips, Tricks & Resources

The service locator pattern is a relatively old pattern that was very popular with Java EE. Martin Fowler described it in 2004 on his blog. The goal of this pattern is to improve the modularity of your application by removing the dependency between the client and the implementation of an interface. Interfaces are one of the most flexible and powerful …

Design Principles

Design Patterns Explained – Adapter Pattern with Code Examples

Thorben Janssen Developer Tips, Tricks & Resources

Design patterns provide a reliable and easy way to follow proven design principles and to write well-structured and maintainable code. One of the popular and often used patterns in object-oriented software development is the adapter pattern. It follows Robert C. Martin’s Dependency Inversion Principle and enables you to reuse an existing class even so it doesn’t implement an expected interface. …

Dependency Inversion Principle

SOLID Design Principles Explained: Dependency Inversion Principle with Code Examples

Thorben Janssen Developer Tips, Tricks & Resources

The SOLID design principles were promoted by Robert C. Martin and are some of the best-known design principles in object-oriented software development. SOLID is a mnemonic acronym for the following five principles: Single Responsibility Principle Open/Closed Principle Liskov Substitution Principle Interface Segregation Principle Dependency Inversion Principle Each of these principles can stand on its own and has the goal to …

SOLID Design- Interface Segregation Principle (1)

SOLID Design Principles Explained: Interface Segregation with Code Examples

Thorben Janssen Developer Tips, Tricks & Resources

The Interface Segregation Principle is one of Robert C. Martin’s SOLID design principles. Even though these principles are several years old, they are still as important as they were when he published them for the first time. You might even argue that the microservices architectural style increased their importance because you can apply these principles also to microservices. Robert C. …

SOLID Principles- Liskov Substitution (1) - 2 dogs graphic

SOLID Design Principles Explained: The Liskov Substitution Principle with Code Examples

Thorben Janssen Developer Tips, Tricks & Resources

The Open/Closed Principle, which I explained in a previous article, is one of the key concepts in OOP that enables you to write robust, maintainable and reusable software components. But following the rules of that principle alone is not enough to ensure that you can change one part of your system without breaking other parts. Your classes and interfaces also …

SOLID Principles- Open Closed principle - door graphic

SOLID Design Principles Explained: The Open/Closed Principle with Code Examples

Thorben Janssen Developer Tips, Tricks & Resources

The Open/Closed Principle is one of five design principles for object-oriented software development described by Robert C. Martin. They are best known as the SOLID principles: Single Responsibility Principle Open/Closed Principle Liskov Substitution Principle Interface Segregation Principle Dependency Inversion All 5 of these design principles are broadly used, and all experienced software developers should be familiar with them. But don’t worry, …

Java Graphic

The State of Java in 2018

Thorben Janssen Developer Tips, Tricks & Resources

2017 has been a turbulent year in the Java world. The long-awaited release of Java 9 brought a lot of changes and interesting new features, and Oracle announced a new release schedule for the JDK. And that was just the beginning. In the past, developers often complained that Java wasn’t developing fast enough. I don’t think you will hear these …

OOP Concept Composition Definition and Examples

OOP Concepts for Beginners: What is Composition?

Thorben Janssen Developer Tips, Tricks & Resources

Composition is one of the fundamental concepts in object-oriented programming. It describes a class that references one or more objects of other classes in instance variables. This allows you to model a has-a association between objects. You can find such relationships quite regularly in the real world. A car, for example, has an engine and modern coffee machines often have …

Java custom exceptions

Why, When and How to Implement Custom Exceptions in Java

Thorben Janssen Developer Tips, Tricks & Resources

We already talked a lot about exception handling on this blog and described the differences between checked and unchecked exceptions, best practices and common mistakes. If you’ve read these posts, you probably recognized a pattern. You should provide detailed information about the situation that caused the exception, and you should not remove anything that might be useful to the caller. …