SOLID Principles in Java - Swiss Knife Minimalistic Design

SOLID Design Principles Explained – The Single Responsibility Principle

Thorben Janssen Developer Tips, Tricks & Resources

SOLID is one of the most popular sets of design principles in object-oriented software development. It’s a mnemonic acronym for the following five design principles: Single Responsibility Principle Open/Closed Principle Liskov Substitution Principle Interface Segregation Principle Dependency Inversion All of them are broadly used and worth knowing. But in this first post of my series about the SOLID principles, I …

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 …

Generics and type erasure

Generics and Type Erasure on the JVM

Nicolas Frankel Developer Tips, Tricks & Resources

Introduction In UML, it’s possible to parameterize types in a class. Those types can then be used in different locations: attribute types, parameter types and return types. This is called a template class. Here’s an example of such a class in UML: This Foo class should be read as the following: The bar attribute is of type T The baz() …

The power of Optional

Is Java Optional Only Smoke and Mirrors?

Nicolas Frankel Developer Tips, Tricks & Resources

There are a lot of misconceptions in the software development world. Today we are going to address this one: “Java 8, for example, introduced the Optional class. It’s a container that may hold a value of some type, or nothing. In other words, it’s a special case of a Monad, known in Haskell as the Maybe Monad. You can now …

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 Application Performance

How to Improve the Performance of a Java Application

Eugen Paraschiv Developer Tips, Tricks & Resources, Insights for Dev Managers

1. Introduction In this article, we’ll discuss a number of approaches that can be helpful for improving the performance of a Java application. We’ll start with how to define measurable performance goals and then look at different tools to measure, monitor application performance and identify bottlenecks. We’ll also look at some of the common Java code level optimizations as well …

What is Polymorphism

OOP Concepts for Beginners: What is Polymorphism

Thorben Janssen Developer Tips, Tricks & Resources

The word polymorphism is used in various contexts and describes situations in which something occurs in several different forms. In computer science, it describes the concept that objects of different types can be accessed through the same interface. Each type can provide its own, independent implementation of this interface. It is one of the core concepts of object-oriented programming (OOP). …

OOP Concept for Beginners: What is Inheritance?

Thorben Janssen Developer Tips, Tricks & Resources

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 …

A Practical Guide to Java Remote Debugging

Eugen Paraschiv Developer Tips, Tricks & Resources

Introduction to Debugging Troubleshooting a problem on a remote server, especially in production, is not an easy task. Sometimes it involves debugging the application code directly on the server. But the production servers are usually run in a strict environment, where not all convenient developer tools are available. In this article, you’ll discover how to configure a running web server …

java developers are in high demand

5 Reasons You Won’t Starve as a Java Developer

Elena Ruchko Developer Career Development

Despite being over 20 years old, Java is still one of the most widely-used programming languages. Just look at the stats: according to the 2017 Stack Overflow Developer Survey, Java is the third most popular technology in the world. The TIOBE index, which is a ranking based on the number of skilled engineers worldwide, courses, and third-party vendors, shows an …

Java OOP Concepts

OOP Concept for Beginners: What is Encapsulation

Thorben Janssen Developer Tips, Tricks & Resources

Encapsulation is one of the fundamental concepts in object-oriented programming (OOP). It describes the idea of bundling data and methods that work on that data within one unit, e.g., a class in Java. This concept is also often used to hide the internal representation, or state, of an object from the outside. This is called information hiding. The general idea …

OOP Concept for Beginners: What is Abstraction?

Thorben Janssen Developer Tips, Tricks & Resources

Abstraction is one of the key concepts of object-oriented programming (OOP) languages. Its main goal is to handle complexity by hiding unnecessary details from the user. That enables the user to implement more complex logic on top of the provided abstraction without understanding or even thinking about all the hidden complexity. That’s a very generic concept that’s not limited to …

Hit the Ground Running with the Spring Security Java Configuration

Eugen Paraschiv Developer Tips, Tricks & Resources

Introduction to Spring Security In this article, you’ll learn how to quickly and easily configure and set up a Spring Security based web application using the Java configuration. Security is, not surprisingly, an evergrowing concern and certainly a core focus of any developer working on applications today. Project Setup The fastest way to get on track with Spring Security is …

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. …

Features of Spring Web MVC

How Spring Web MVC Really Works

Eugen Paraschiv Developer Tips, Tricks & Resources

Introduction This is an in-depth look at the powerful features and internal workings of Spring Web MVC, which is a part of the Spring Framework. The source code for this article is available over on GitHub. Project Setup Throughout this article, we’ll use the latest and greatest Spring Framework 5. We’re focusing here on the Spring’s classic web stack, which …

Performance tuning tips for Java

11 Simple Java Performance Tuning Tips

Thorben Janssen Developer Tips, Tricks & Resources

Most developers expect that performance optimization is a complicated topic that requires a lot of experience and knowledge. Okay, that’s not entirely wrong. Optimizing an application to get the best performance possible isn’t an easy task. But that doesn’t mean that you can’t do anything if you haven’t acquired that knowledge. There are several easy to follow recommendations and best …

Java application monitoring metrics

How To Track and Monitor Critical Java Application Metrics

Eugen Paraschiv Developer Tips, Tricks & Resources, Stackify Product & Company Updates

Overview of Java application metrics Monitoring a running application is crucial for visibility and making sure the system is functioning as expected, as well as to identify any potential issues, tweak and optimize the running conditions, and resolve any errors that may occur. This is where Application Performance Monitoring (APM) tools can make your life a whole lot easier by …

Java Virtual Machine (JVM)

Java Virtual Machine: Critical Metrics You Need to Track

Eugen Paraschiv Developer Tips, Tricks & Resources, Popular

Overview of JVM Metrics In this article, we’ll cover how you can monitor an application that runs on the Java Virtual Machine by going over some of the critical metrics you need to track. And, as a monitoring tool, we’ll use Stackify Retrace, a full APM solution. The application we’ll monitor to exemplify these metrics is a real-world Java web …

Multiple Media Types in Java Microservices with RESTEasy

Lyndsey Padget Developer Tips, Tricks & Resources

Today we’ll be talking about microservices in Java. While it’s true that Java EE has a robust platform for writing, deploying, and managing enterprise-level microservices, in this article I will create a RESTful microservice that is as slim as possible. Don’t worry – we won’t be reinventing the wheel by marshaling our own data or anything. We’ll be using JBoss’ …