Abstraction is one of the key concept of object-oriented programming (OOP) languages. Read examples to better handle complexity.
Java Logging Frameworks: log4j vs logback vs log4j2
Log4j, Logback, and log4j2 are all broadly used logging frameworks. Let’s compare these Java logging frameworks to help you choose.
OOP Concept for Beginners: What is Encapsulation
As an OOPs concept for beginners, what is encapsulation? Let’s discover encapsulation in object-oriented programming.
OOP Concepts for Beginners: What is Polymorphism
Polymorphism describes the concept that you can access objects of different types through the same interface.
What is Cloud-Native? Is It Hype or The Future of Software Development?
For quite a while now, cloud-native has been one of the hottest topics in software development.
How to Find Hibernate Performance Issues in Development and Production
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 …
SOLID Design Principles Explained: The Single Responsibility Principle
SOLID is an acronym for the 5 design principles of object-oriented programming. This article focuses on the Single responsibility principle.
11 Simple Java Performance Tuning Tips
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
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 Patterns Explained – Dependency Injection with Code Examples
Dependency injection is a programming technique that makes a class independent of its dependencies. Let’s find out more in this post.
Design Patterns Explained – Service Locator Pattern with Code Examples
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 Patterns Explained – Adapter Pattern with Code Examples
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. …
SOLID Design Principles Explained: Dependency Inversion Principle with Code Examples
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 Principles Explained: Interface Segregation with Code Examples
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 Design Principles Explained: The Liskov Substitution Principle with Code Examples
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 Design Principles Explained: The Open/Closed Principle with Code Examples
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, …
The State of Java in 2018
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 Concepts for Beginners: What is Composition?
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 …
OOP Concept for Beginners: What is Inheritance?
Inheritance is one of the core concepts of object-oriented programming (OOP) languages. It is a mechanism where you can to derive a class from another class for a hierarchy of classes that share a set of attributes and methods. You can use it to declare different kinds of exceptions, add custom logic to existing frameworks, and even map your domain …
Why, When and How to Implement Custom Exceptions in Java
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. …
- Page 1 of 2
- 1
- 2