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 …

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 …

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

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 …

How Log4J2 Works: 10 Ways to Get the Most Out Of It

Eugen Paraschiv Developer Tips, Tricks & Resources

Log4j2 is the updated version of the popular and influential log4j library, used extensively throughout the Java ecosystem for so many years. Version 2.x keeps all the logging features of its predecessor and builds on that foundation with some significant improvements, especially in the area of performance. And of course, given how instrumental logging is for any application, both for …

Java Logging Sins

9 Logging Sins in Your Java Applications

Eugen Paraschiv Developer Tips, Tricks & Resources

Logging runtime information in your Java application is critically useful for understanding the behavior of any app, especially in cases when you encounter unexpected scenarios, errors or just need track certain application events. In a real-world production environment, you usually don’t have the luxury of debugging. And so, logging files can be the only thing you have to go off …

Develop your application with Spring Boot

How Spring Boot Can Level Up your Spring Application

Eugen Paraschiv Developer Tips, Tricks & Resources

The Spring Ecosystem There are a two stable, mature stacks for building web applications in the Java ecosystem, and considering the popularity and strong adoption, the Spring Framework is certainly the primary solution. Spring offers a quite powerful way to build a web app, with support for dependency injection, transaction management, polyglot persistence, application security, first-hand REST API support, an MVC framework …