Home » Author Archives: Peter Daum

Author Archives: Peter Daum

Peter is senior Java developer in the telecommunication industry. He works in the area of business and operations support systems and is always happy to share his knowledge and experience. He is interested in everything related to Java and software craftsmanship.

Dependency Injection – Field vs Constructor vs Method

java-logo

Hi, today I would like to discuss in short different ways of injecting dependencies into your classes. In general you have the following three options for injection directly into fields/attributes via explicit setter methods via explicit constructor parameters     Field injection This type of injection instruments some kind of reflection mechanism for injecting the required dependencies into the class. While this injection ...

Read More »

Strategies to migrate from an DAO library

software-development-2-logo

In this post I will discuss several strategies to handle the following situation: You’re working on a legacy project that uses a company library with DBOs and DAOs for accessing the database. But the generator for this library is broken and you have to make changes to the DBOs and/or DAOs. Basic cases You will face the following three basic cases, when the database changes: ...

Read More »

Creating beautiful release notes with git, gradle and markdown

git-logo

During the last days I asked myself how to generated releases notes from information that are available in commit  / tag messages from git. The decisions My first approach was to create the list of changes directly from the commit messages, but this approach has multiple drawbacks.         The commit messages must be written very disciplined An ...

Read More »

GIT & ZShell : Colorize your shell depending on your branch

git-logo

As announced in my last post I asked my colleague Tillman if I’m allowed to post his nice extension for the zshell (as you may have concluded he gives his OK! ). And here it is:               # Required to have the colour names autoload colors zsh/terminfo if [[ "$terminfo[colors]" -ge 8 ]]; then colors fi ...

Read More »

Tutorial: Writing your own CDI extension

java-logo

Today I will show you how to write a CDI extension. CDI provides a easy way for extending the functionality, like adding own scopes, enabling java core classes for extension, using the annotation meta data for augmentation or modification, and much more. In this tutorial we will implement an extension that will inject properties from a property file, as usual ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.