Devoxx 2017

Almost two months ago I visited Devoxx 2017. It’s about time to write some notes on the stuff I learnt there!

Event Storming & DDD workshop

The week started off with a full afternoon workshop led by Stijn Vanpoucke. The workshop consisted of small pieces of theory, alternated with exercises using post-it’s and markers.

A few of the theoretic pieces:

  • An event is something that has happened in the past. It is usually phrased in past tense. It should be understandable for business users.
  • A command is an user-initiated action. It explains the origin and sometimes the reason for the action.
  • An entity is an individual thing. It has a unique identity. Often, entities are mutable.
  • A value object is an non-unique value. It is often immutable. Its equality is based on it’s attributes. It should be able to validate itself. They can be combined.
  • An aggregate is a combination of entities and value objects. They are structured in a hierarchy. Its root is always an entity. Aggregates contain business rules. Note that a bigger aggregate is not always better! To circumvent this, aggregates can use soft links based on the unique identity of other entities.
  • The bounded context describes the context from which you look at it. Take a pen as example; what a pen is depends on the context from which you look at it. To stress the fact that it has boundaries, it is called a bounded context. Bounded contexts support the idea of having “one team, one (business) language”. The bigger the bounded context is, the bigger the language, whether artificial or natural. Finally, multiple domains can have different words for the same concept. A sales department might speak of products while inventory management might name the same concept article.

Kotlin for Java programmers

This year had a lot of talks about Kotlin scheduled. To visit them all would take too much time, so I decided to follow just one by Venkat Subramaniam. I figured it would give me about the same amount of content…

Kotlin is a statically typed language that runs on the JVM. Source code can be compiled to include the Kotlin runtime, so there is no additional runtime dependency left. Invoking kotlinc without any arguments give you an REPL (Read–Eval–Print Loop).

Declaring variables or method arguments have a slightly different syntax: numberOfThings: Int. This might look strange, but there is an idea behind it. The name of a variable is more important than its type.

A lot of other Kotlin things made me think of Scala:

  • the difference between val and var
  • string interpolation - writing "Hello, ${name}" instead of "Hello, " + name
  • multi-line strings, including a trimMargin option.
  • decomposing properties from an object, like val (name, id) = user. This is something you also see in languages like TypeScript or newer versions of JavaScript.

Building apps with React Native

On Tuesday afternoon, I gave a deep dive myself. The topic was React Native, with a deep intro into React itself. To me, understanding React is crucial for working with React Native. Apart from the theoretical parts, I did some live coding. To that, I had two physical devices, my own Android phone and a borrowed iPhone. It was definitely fun to present at Devoxx and see the stage from another perspective.

For those who missed it, the recording is on YouTube.