Java Microservices

Communication Between Microservices: How to Avoid Common Problems

Thorben Janssen Developer Tips, Tricks & Resources

In one of the previous posts, I showed you how to build a microservice with Java EE and JBoss Forge. But building one microservice is obviously not enough. The overall idea of this architectural style is to implement an application as a system of services. In the beginning, that seems like an easy task. As long as each service solves only …

Spring 5 Reactive Programming

Doing Reactive Programming with Spring 5

Eugen Paraschiv Developer Tips, Tricks & Resources

The upcoming Spring 5 Framework has a strong focus on Reactive Programming, allowing us to write both servers and clients using this paradigm. The Spring 5 implementation uses the popular Project Reactor as a base. This article will be an introduction to writing both Reactive Clients and Servers using the new tools available in version 5 of the framework. What Is …

Java 8 Optional

Understanding, Accepting and Leveraging Optional in Java

Eugen Paraschiv Developer Tips, Tricks & Resources

Overview One of the most interesting features that Java 8 introduces to the language is the new Optional class. The main issue this class is intended to tackle is the infamous NullPointerException that every Java programmer knows only too well. Essentially, this is a wrapper class that contains an optional value, meaning it can either contain an object or it can …

Java Stack vs. Heap

Java Heap Space vs. Stack Memory: How Java Applications Allocate Memory

Angela Stringfellow Developer Tips, Tricks & Resources

Java applications need a certain amount of RAM on a computer to run. Each time an object or variable is declared, it needs more RAM. Simply designating enough memory to hold every value declared and run each method would lead to a bloated application. To keep application memory requirements lean, it is partitioned in ways that require less memory and …

Common Mistake to Avoid with Java Exception Handling

7 Common Mistakes You Should Avoid When Handling Java Exceptions

Thorben Janssen Developer Tips, Tricks & Resources

Handling an exception is one of the most common but not necessarily one of the easiest tasks. It is still one of the frequently discussed topics in experienced teams, and there are several best practices and common mistakes you should be aware of. Here are a few things you should avoid when handling exceptions in your application. Mistake 1: Specify …

Use Jackson XML module to support for both JSON and XML data

Solving the XML Problem with Jackson

Eugen Paraschiv Developer Tips, Tricks & Resources

Introduction Jackson is a popular library for handling JSON in Java applications, quickly becoming the de-facto standard in the ecosystem. Starting with version 2, it has also introduced a mature XML implementation alongside its established JSON support. Adding Jackson XML to the Project Adding the Jackson XML module to the project only needs a single dependency – the Jackson XML …

How To Handle Java Exceptions

9 Best Practices to Handle Exceptions in Java

Thorben Janssen Developer Tips, Tricks & Resources

Exception handling in Java isn’t an easy topic. Beginners find it hard to understand and even experienced developers can spend hours discussing how and which Java exceptions should be thrown or handled. That’s why most development teams have their own set of rules on how to use them. And if you’re new to a team, you might be surprised how …

Understand Java Memory Leaks

How Memory Leaks Happen in a Java Application

Eugen Paraschiv Developer Tips, Tricks & Resources

Introduction to Memory Leaks In Java Apps One of the core benefits of Java is the JVM, which is an out-of-the-box memory management. Essentially, we can create objects and the Java Garbage Collector will take care of allocating and freeing up memory for us. Nevertheless, memory leaks can still occur in Java applications. In this article, we’re going to describe the …

Solving Logback problems

Solving Your Logging Problems with Logback

Eugen Paraschiv Developer Tips, Tricks & Resources

Logback is a logging framework for Java applications, created as a successor to the popular log4j project. In fact, both of these frameworks were created by the same developer. Given that logging is a crucial part of any application for both debugging and audit purposes, choosing an adequate logging library is a foundational decision for any project. There are several …

Java Memory Leaks - How To Fix Them

What to Do About Java Memory Leaks: Tools, Fixes, and More

Stackify Developer Tips, Tricks & Resources

Memory management is Java’s strongest suit, and one of the many reasons why developers choose Java over other platforms and programming languages. On paper, you create objects and Java would deploy its Garbage Collector to allocate and free up memory. But that’s not to say  Java is flawless; in real life, memory leaks do happen, and it happens a lot …

Java Strings dos and don't

The Do’s and Don’ts of Java Strings

Lyndsey Padget Developer Tips, Tricks & Resources

Today we’re going to be talking about Strings in Java.  If you write Java often, you know that a String is considered a first class object, even though it is not one of the eight primitive types.  What you may not know is how to best handle Strings in production applications. To do this, you’ll need to understand how to …

Java EE

How To Build Microservices With Java EE And JBossForge

Thorben Janssen Developer Tips, Tricks & Resources

Microservices have become one of the most popular architectural styles in the recent years. Previously, most development teams created huge monoliths which implemented all customer requirements. The downside of this approach is that the application often becomes a huge, unstructured combination of components, classes, and interfaces. That makes it hard to understand the overall system and to predict the side-effects …

How to Handle Exceptions in Java

How to Specify and Handle Exceptions in Java

Thorben Janssen Developer Tips, Tricks & Resources

Errors happen all the time in the software world. It might be an invalid user input or an external system that is not responding, or it’s a simple programming error. In all these situations, the errors occur at runtime and the application needs to handle them. Otherwise, it crashes and can’t process further requests. Java provides a powerful mechanism which …

Top Java Tools

Top Java Tools: 63 Tools to Power Every Phase of Java Development

Stackify Developer Tips, Tricks & Resources

Many know Java as one of the simplest, but most powerful (not to mention sought-after) programming languages used by web developers. There are others who see it in the opposite light, saying that Java is a hard and more complex programming language. In order to execute your Java coding more effectively, there are a handful of Java tools that web …

Java Web Services Tutorial: Improve App Communication And Flexibility

Eugen Paraschiv Developer Tips, Tricks & Resources

Web services have taken the development world by storm, especially in recent years as they’ve become more and more widely adopted. There are naturally many reasons for this, but first, let’s understand what exactly a web service is. The World Wide Web Consortium (W3C) defines “web of services” as “message-based design frequently found on the Web and in enterprise software”. …

Java Interview Questions

20 Java Pros and Dev Leaders Share Their Favorite Java Interview Questions (and How You Should Prepare to Answer Them)

Stackify Developer Career Development

Java remains a popular programming language, and it’s still the most sought-after programming language among employers. That means if you’re looking for a programming job, prospective employers will likely be asking questions designed to gauge your knowledge of this long-established programming language. (If you’re interviewing for new developer positions, you should probably brush up on your DevOps interview questions, too.) …

JUnit 5 Code Example

A Look at JUnit 5’s Core Features & New Testing Functionality

Eugen Paraschiv Developer Tips, Tricks & Resources

JUnit 5 is the updated version of the highly popular testing library for Java applications, JUnit, scheduled to be released in Q3 2017. The new version enables a lot more testing options and finally adds support for Java 8 features. In fact, JUnit 5 requires Java 8 to work. The library is composed of several modules, organized in 3 main sub-projects: JUnit …

Gradle vs. Maven

Gradle vs. Maven: Performance, Compatibility, Builds, & More

Stackify Developer Tips, Tricks & Resources

Gradle is one of several Java development tools featured in Stackify’s Comprehensive Java Developer’s Guide, but it’s not the only build automation tool to consider. Maven is an older and commonly used alternative, but which build system is best for your project? With other tools, such as Spring, allowing developers to choose between the two systems, coupled with an increasing …

Find and fix issues in Hibernate with Retrace

How to Find Hibernate Performance Issues in Development and Production

Thorben Janssen Developer Tips, Tricks & Resources

The Java Persistence API (JPA), and Hibernate ORM as its most popular implementation are used in most Java applications to interact with a relational database. The main reason for their popularity is that they use object-relational mapping to abstract the database interactions and make it very easy to implement simple CRUD operations. But this abstraction also has its downsides. Hibernate …