Software Architecture


Posted by Steven

Like other applications, my main project runs through several quality gates before being deployed on the production stage. For example, there is a developer stage, which simply is the locally running version on every developer machine, and a test stage. This test stage is similar to the production setup and can be used to test features before they are merged into the main branch of your version control system. Many projects use an additional quality stage which runs the latest stable build so the customer can test, too. The deployed system behaves differently for every stage.

Posted by Steven

Yesterday, I changed all of our field-injected Spring-dependencies to constructor-injected. This

How I use DTOs

07 Jun 2016
Posted by Steven

Because I recently read about this pattern, here are some words about how I use DTOs, Data Transition Objects. DTOs are used to transport data, for example from server to client and vice versa. Let's have a look at the case where you want to load data from a server to represent it in a client.

Posted by Steven

Some of the problems in everyday software development are luxury problems. Like when you work in a greenfield project and are able to choose how you implement equals() and hashCode(). However, this decision will have a major effect for the project down the road. So here are the options I found out and my decision making process.

Posted by Steven

Microservices are one of the hype topics I didn’t manage to have a look at. So this week I was lucky finding that the cover story of the Java Magazin (issue 5.16) is “Microservices – the hype in the reality check”.

Posted by Steven

This week, I practiced my first architectural kata (alternative link) with my mentor Jens Schauder and my co-mentee Thomas. These katas are meant to practice the process of designing an IT system from scratch, given a specific task. Jens picked one of the tasks for me which was to design a digital UN conference system for students. This system should serve as the technical infrastructure for hosting UN gatherings via video chat as well as one-to-one-video chats between the users. News events should be created by admins and shown to the users, which are students from all over the world who aren't meant to buy new hardware to use the system. In this article, I want to describe my thoughts about the task, the process of getting to an architecture and of course my failures in this solution.

Posted by Steven

A couple of days ago, I saw an interesting way to prohibit the use of a method from a superclass. A coworker of mine wrote a subclass of a JTextField that should display a date in a specific fashion. Before you comment the obvious: Yes, there where reasons not to use JFormattedTextField. ;)

Here's how he wrote the new class:

  1. public class CustomDateField extends JTextField {
  2.  
  3. public void setDate(Date date) {
  4. c.setTime(date);
  5. // the real method was a bit more complicated, but for the example that is sufficient
  6. super.setText(String.valueOf(c.get(Calendar.YEAR)));
  7. }
  8.  
  9. /**
  10. * @deprecated Use setDate(Date date) instead
  11. */
  12. @Deprecated
  13. @Override
  14. public void setText(String arg0) {
  15. throw new RuntimeException(
  16. "This method is not supported. Use setDate(Date date) instead.");
  17. }
  18. }

Global Setup Strategy

01 Dec 2012
Posted by Steven

Recently, I began reading Clean Code by Uncle Bob (again). In chapter 11 ("Systems"), he writes about a "Global Setup Strategy" of an application. As I understood it, it is the master plan for instantiation of objects and the references between them. Following such a strategy should separate the construction of a system from its usage.

Posted by Steven

One topic of discussion I encountered in every project so far is the “right” usage of Springs Dependency Injection (DI). In this article, I want to describe how this controversial feature is used in my current project.

Extending Java Enums

21 Oct 2012
Posted by Steven

I often stumble over ideas that are cool in some way and that I would never have thought about it. One of those ideas is extending Java Enums. Often frameworks and toolkits bring some kind of enumeration with them. For most of the tasks at hand, the elements in those Enums are sufficient. For the other cases, they can be extended to include more status. Of cause the library cannot handle the added elements in the Enum, so the methods working with it may have to be overridden. In this article I want to show how Java Enums can be extended.

First, let's have a look at the Enum:

Pages