In this talk, Jan will present a new and innovative approach to evolving a full stack software architecture of JavaScript and TypeScript projects, that he has been using to drive the development of a financial system.
Behaviour-Driven Architecture builds on ideas from BDD, UCD and DDD and works particularly well in complex domains as it encourages strong domain modelling, clean code, clean architecture and drastically speeds up automated acceptance testing.
27. serenity-js.org#SerenityJS #FullStackCon @JanMolak
- How do you build a shared understanding?
- We agree on how to Build it Right:
coding standards,
design patterns,
architectural patterns,
test coverage…
- ok, but how do you know you’re building
The Right Thing?
37. serenity-js.org#SerenityJS #FullStackCon @JanMolak
“ ”Behaviour-Driven Development
BDD is a practice of using Cucumber to write
slow and flaky automated tests,
driving the fully-assembled system through its UI.
41. serenity-js.org#SerenityJS #FullStackCon @JanMolak
“ ”Impact Mapping is a collaborative way to help us
understand the bigger picture, describe roadmaps
and figure out how we’re going to have
a huge impact with our software and achieve
something great instead of just shipping features.
- Gojko Adzic
46. serenity-js.org#SerenityJS #FullStackCon @JanMolak
Goal Actor Impact Deliverable
Measurable, clear goal
with a specific time scale
People who can help us
achieve the goal
Personas Market segments
How should people’s
behaviour change?
47. serenity-js.org#SerenityJS #FullStackCon @JanMolak
Goal Actor Impact Deliverable
Measurable, clear goal
with a specific time scale
People who can help us
achieve the goal
Personas Market segments
How should people’s
behaviour change?
What can we do?
53. serenity-js.org#SerenityJS #FullStackCon @JanMolak
Goal Actor Impact Deliverable
Digital
documents
only
Content
Editors
Customers
Come back more frequently
Don’t lose their documents
Manage all templates
in one place
Read their documents
Automate document
delivery
54. serenity-js.org#SerenityJS #FullStackCon @JanMolak
Goal Actor Impact Deliverable
Digital
documents
only
Content
Editors
Customers
Document
Library
Come back more frequently
Don’t lose their documents
Manage all templates
in one place
Read their documents
Automate document
delivery
55. serenity-js.org#SerenityJS #FullStackCon @JanMolak
Goal Actor Impact Deliverable
Digital
documents
only
Content
Editors
Customers
Document
Library
Notifications
Come back more frequently
Don’t lose their documents
Manage all templates
in one place
Read their documents
Automate document
delivery
56. serenity-js.org#SerenityJS #FullStackCon @JanMolak
Goal Actor Impact Deliverable
Digital
documents
only
Content
Editors
Customers
Document
Library
Notifications
Come back more frequently
Don’t lose their documents
Manage all templates
in one place
Read their documents
Document
GeneratorAutomate document
delivery
57. serenity-js.org#SerenityJS #FullStackCon @JanMolak
Goal Actor Impact Deliverable
Digital
documents
only
Content
Editors
Customers
Document
Library
Notifications
Enterprise CMS
Come back more frequently
Don’t lose their documents
Manage all templates
in one place
Read their documents
Document
GeneratorAutomate document
delivery
59. serenity-js.org#SerenityJS #FullStackCon @JanMolak
Goal Actor Impact Deliverable
Digital
documents
only
Content
Editors
Customers
Document
Library
Notifications
Enterprise CMS
Come back more frequently
Don’t lose their documents
Manage all templates
in one place
Read their documents
Document
GeneratorAutomate document
generation
62. serenity-js.org#SerenityJS #FullStackCon @JanMolak
Automated Document Delivery
In order to reduce cost and environmental impact
As a responsible financial company
We’d like the customer documents
to be generated automatically
And delivered in a digital format
When specified business events occur
65. serenity-js.org#SerenityJS #FullStackCon @JanMolak
“ ”
Feature Mapping is a light-weight, outcome-focused,
highly collaborative requirements discovery practice
that helps build a deep collective understanding of
customer needs, and that provides a smooth path to
high quality executable specifications.
- John Ferguson Smart
66. serenity-js.org#SerenityJS #FullStackCon @JanMolak
Automated Document Delivery
In order to reduce cost and environmental impact
As a responsible financial company
We’d like the customer documents
to be generated automatically
And delivered in a digital format
When specified business events occur
68. serenity-js.org#SerenityJS #FullStackCon @JanMolak
Connie Registers
with our service
Actors: Connie the Customer
Service Agreement
Upon registration
Examples: Tasks: Consequences:
Connie sees the
Service Agreement
in her Library
70. serenity-js.org#SerenityJS #FullStackCon @JanMolak
Connie Registers
with our service
Actors: Connie the Customer, Edna the Editor
Service Agreement
Upon registration
Examples: Tasks: Consequences:
Connie sees the
Service Agreement
in her Library
Edna prepares the
template for the
Service Agreement
71. serenity-js.org#SerenityJS #FullStackCon @JanMolak
- How is the Service Agreement connected
with the registration event?
- Edna will have to configure this… somehow.
It would be nice if she could
use the CMS for that.
72. serenity-js.org#SerenityJS #FullStackCon @JanMolak
Connie Registers
with our service
Actors: Connie the Customer, Edna the Editor
Service Agreement
Upon registration
Examples: Tasks: Consequences:
Connie sees the
Service Agreement
in her Library
Edna prepares the
template for the
Service Agreement
Edna configures
Service Agreement
to be delivered
upon customer
registration
How is she going
to do that?
73. serenity-js.org#SerenityJS #FullStackCon @JanMolak
- We seem to be relying on that CMS quite a lot.
What if it goes down?
- We should retry the process when it’s back up
and notify the customer when the document is
delivered
74. serenity-js.org#SerenityJS #FullStackCon @JanMolak
Connie Registers
with our service
Actors: Connie the Customer, Edna the Editor
Service Agreement
Upon registration
Examples: Tasks: Consequences:
Connie sees the
Service Agreement
in her Library
Edna prepares the
template for the
Service Agreement
Edna configures
Service Agreement
to be delivered
upon customer
registration
CMS is down
Connie is notified
when the document
is ready
- || - - || -- || -
75. serenity-js.org#SerenityJS #FullStackCon @JanMolak
- Should connie be notified when any document is
delivered, or just in this case?
- Well, some of the documents will be triggered
without her action.
That’s the case with monthly, quarterly and
annual statements.
So yes, she should be notified when any
document is delivered.
76. serenity-js.org#SerenityJS #FullStackCon @JanMolak
Connie Registers
with our service
Actors: Connie the Customer, Edna the Editor
Service Agreement
Upon registration
Examples: Tasks: Consequences:
Connie sees the
Service Agreement
in her Library
Edna prepares the
template for the
Service Agreement
Edna configures
Service Agreement
to be delivered
upon customer
registration
Customer
is notified when
the Document
is delivered
Connie is notified
when the document
is ready
- || - - || -- || -
78. serenity-js.org#SerenityJS #FullStackCon @JanMolak
Connie Registers
with our service
Service Agreement
Upon registration
Examples: Tasks: Consequences:
Connie sees the
Service Agreement
in her Library
Edna prepares the
template for the
Service Agreement
Edna configures
Service Agreement
to be delivered
upon customer
registration
79. serenity-js.org#SerenityJS #FullStackCon @JanMolak
Connie Registers
with our service
Service Agreement
Upon registration
Examples: Tasks: Consequences:
Connie sees the
Service Agreement
in her Library
Edna prepares the
template for the
Service Agreement
Edna configures
Service Agreement
to be delivered
upon customer
registration
Scenario: Service Agreement is delivered upon customer registration
Given Edna has prepared a template for the Service Agreement
And configured the Service Agreement to be delivered upon customer registration
When Connie registers with our service
Then she should see the Service Agreement in her Library
110. serenity-js.org#SerenityJS #FullStackCon @JanMolak
When working on a new feature ask:
- What’s the business goal? Why is this needed?
- What’s the context? Who are the “users”?
- What If something doesn’t go according to plan?
- How are we going to test it? support it?
measure the impact of our work?