In the first part of this practical introduction to Ports and adapters architecture (Hexagonal) we went through a simple example of one entity class — BankingAccount and creation port which saves and deletes this entity. This time we will go beyond simple example and start digging into details. If you want you can watch the whole explanation on my youtube channel here:

When I think of applications in general, first I see business logic. Business logic mainly translates requirements provided by customers into the code. …


This is a practical introduction to Port and adapters architecture. I will go through one business example and explain all the major parts of this architecture. As an example, I would use a banking system that has an account and balance features.

Let’s start first from the Account entity:

It’s very simple, it has

  • account number,
  • currency code
  • user unique identifier

This entity is one of the fundamentals of our system. In most cases, it will be also a table in the database but it’s not required at this point. Once we have this entity the next step is…


How is it to create a new product?
This is the first post from series of articles about creating a new product.
When you start doing something new you have a lot of different challenges ahead of you. The most important I think is to define your product and believe me it’s not so simple. There are many approaches how to start defining it.

* You can define everything upfront (waterfall approach)
* You can be agiler and define your product more on the fly.

No matter what you choose you should have at least vision how it should work…


Inside module we can place service, agregate and model.

Layers in application: User Interface, Application, Domain, Infrastructure. Inside each layer we define moduels.


The secret of all victory lies in the organization of the non-obvious- Marek Aurelius

Tomasz Kasprzycki

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store