Hexagonal Architecture for Programmers

目录:
Programmer
In-person or Remote:
In-person, Remote
Level:
More Experienced
Language:
English
Certificate Level:
HoA Level A Certificate
{{variant.name}}:
{{opt.name}}
{{opt.value ? '' : opt.name}}
{{opt.value ? '' : opt.name}}
描述

 

Description

 

"Allow an application to equally be driven by users, programs, automated test or batch scripts, and to be developed and tested in isolation from its eventual run-time devices and databases."

-- Hexagonal Architecture defined : https://alistair.cockburn.us/hexagonal-architecture/

 

In this short and intense workshop, learn how to implement hexagonal architecture in your own development environment. As an extra benefit, experience acceptance-test-first and micro-slicing program development.

 

Who Should Attend

 

For medium- and senior-level programmers. This is for programmers wishing to learn the structure of the hexagonal (ports & adapters) architectural design pattern, to see it programmed in their own development environment. Ideally, there are a few people in the workshop with experience with the pattern, to help program the sample problem with the desired dev environment.

 

Sequencing

 

Lecture: Introduction of the origin, motivation for, structure of the pattern.

Environment setup: Establishing the versioning, testing environment.

Micro-sliced development: 3-6 micro-slices of development to implement the base architecture and grow it to incorporate external complexity.

Roundtable Discussion: Questions and discussions from the workshop. 

 

Targeted Outcomes from the Workshop

 

At the end of the workshop, attendees should be able to:

Describe the intended purpose, benefits, structure of the architecture.

Describe what is a "port", how that fits with test harnesses and databases.

Set up a simple application, with test harness, in your selected environment.

Answer basic questions from colleagues about the pattern.

 

Longer Description of the Workshop

 

The workshop proceeds in four stages.

 

In the first stage, Dr. Cockburn describes the origin of the idea, the pressures that generated it, the structure of the pattern, the terms involved, the names "hexagonal" and "ports & adapters", the naming of ports, the use of testing and loopback. At the end of this section, the basic idea will be motivated and described.

 

In the second stage, Dr. Cockburn will pass control over to one of the workshop attendees, who will have a development environment set up, with version control, checking and test harness set up. We will review that structure and make sure that everyone is understanding how that works. 

 

In the third and most important stage, all of the participants in the workshop will help, in a "mob programming" style, to build a small application exhibiting the hexagonal architecture structure. 

 

We will build a simple reference application with somewhere between four and six stages, "micro-slices", of growing complexity, in an acceptance-test-driven manner. The first slice is just the test harness and first test case; the second is to add an in-memory database; and from there to increase the complexity of the application and the external technologies. At the end of this section, attendees will have participated in and seen the incremental construction of a simple implementation of the pattern. 

 

The fourth and final stage will allow discussion about the properties of the architecture, the programming habits demonstrated, and the conventions appropriate to the attendees' development environment. Having seen the program written, these questions will be more accurate and relevant than the questions at the beginning.

 

At the end of these stages, attendees should be able to describe the intended purpose, benefits, structure of the architecture; describe what is a "port", how that fits with test harnesses and databases; set up a simple application, with test harness, in your selected environment, and answer basic questions from colleagues about the pattern.

 

Pre-work to Maximize the Outcomes for the Workshop

 

  • Pre-reading: Read the original article: https://alistair.cockburn.us/hexagonal-architecture/ and the longer description by Juan Manuel Garrido de Paz: https://jmgarridopaz.github.io/content/articles.html.

  • Watch the first part of the 3-part video series: Alistair in the Hexagone

  • Environment setup: The lead attendee(s) in the workshop establish the programming, versioning, testing environments used in the workshop. 

also ref: https://alistaircockburn.com/Discussion of dependency inversion etc.pdf

and

https://alistaircockburn.com/Articles/Discussion-of-dependency-injection-etc

"Consulting at its finest"

"My specialty is sewing together different departments in a company. This naturally results from doing real work with them, increasing trust, reducing fear, and making honest progress. My company is called Humans and Technology for good reason." --Alistair Cockburn