Clean code in a nutshell: 5 Reasons you Should be Writing Clean Code

Errors vs Business rules

From time to time, we see a mixture of validation rules and exceptions throwing in a code base. But then again, what is a validation rule? It’s an ordinal response from an application. Hence, it is not an error and should not be treated as such. From a development point of view, errors must be flagged (thrown), while violations of business rules is ordinary data flow

What is an error?

An error is specific a application state in which following actions must…

  • cloud — profile to run application inside Cloud infrastructure with extra configuration, beans etc…
  • local — profile to run application in local environment

What is EnvironmentPostProcessor?

EnvironmentPostProcessor is a Spring initialization mechanism which allows Environment to be configured before application initialization state.

void postProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application);

Pre Requirements

  • Java 8— download it from here or run this command in Your terminal
sudo apt-get install openjdk-8-jre
  • Apache Kafka 1.00 with Scala 2.12— download from here
  • Be familiar with Spring Framework
  • Oracle VirtualBox — download from here
  • Docker-machine — download from here

Configure and run Apache Kafka

Apache Kafka contains of two main components:

  • Zookeeper — used for configuration and redistribution of events
  • Broker server — broker server used for message consuming/producing

Kiril Nugmanov

Java Engineer

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