Спикер:
Тема презентации:
Мельник Владимир Владимирович
Up-‐Down Development & DSL-‐first approach
Slide 2
Slide 2 text
Chaos - Driven Development
Slide 3
Slide 3 text
Spaghetti – Oriented Development
Slide 4
Slide 4 text
Domain – Driven Development
Better, but isn’t great
Slide 5
Slide 5 text
Up – Down Development Everywhere!
Slide 6
Slide 6 text
No content
Slide 7
Slide 7 text
Presentation Layer
Presenta(on
Layer
is
the
same
as
User
Interface
and
is
responsible
for
presen(ng
data
to
user
and
interpre(ng
user’s
commands.
We
can
split
it
conven(onally
to
forms
and
views.
Slide 8
Slide 8 text
Application Layer
Domain
Layer
or
Model
Layer
or
Domain
Model
Layer
is
the
main
part
of
your
app,
which
stores
all
domain-‐specific
logic
and
describes
business-‐processes
that
are
automa(zed
with
the
help
it.
Slide 9
Slide 9 text
Domain Layer
It
defines
tasks
that
applica(on
should
do
and
coordinates
them
between
Domain
En((es/
Aggregates
and
Services.
Slide 10
Slide 10 text
Infrastructure Layer
Infrastructure
Layer
does
all
the
dirty
job.
Slide 11
Slide 11 text
UI and Magick
How user sees your application
For
user
UI
is
the
applica(on.
Slide 12
Slide 12 text
D is for Dependency Inversion Principle
Split
off
your
app
on
layers
that
should
not
be
dependent
on
layers
below.
Slide 13
Slide 13 text
Layers testing
With
Up-‐Down
development
your
unit
tests
becomes
acceptance,
func(onal
or
integra(on
tests.
Slide 14
Slide 14 text
Layers testing
Write
unit
tests
for
screen
or
screens
of
a
feature
for
your
presenta(on
layer.
Write
correct
sta(c
presenta(on
code
which
passes
the
tests.
Add
more
contexts
and
edge-‐cases
to
your
tests.
Update
UI
for
new
tests.
Make
UI
dynamic
through
adding
mocked
Domain
Model
and
Applica(on
layers
(refactor).
Slide 15
Slide 15 text
Layers testing
“Make
UI
dynamic”
means
your
Unit-‐tests
becomes
func(onal,
integra(on
or
even
acceptance.
Slide 16
Slide 16 text
Prehistory of DSL – First
“DSL-‐first”
approach
as
evolu(on
of
Up-‐Down
Development
Slide 17
Slide 17 text
DSL – First approach
“The
whole
is
greater
than
the
sum
of
its
parts”
–
Aristotle
SLOC
-‐
System
as
a
Logic
Over
Components.
DSL
implementa(on
is
the
system
and
code
wriVen
in
DSL
is
the
system
rules
and/or
state.
Slide 18
Slide 18 text
SLOC principle
Slide 19
Slide 19 text
Example of refactoring using “DSL-first” approach
Slide 20
Slide 20 text
Example of refactoring using “DSL-first” approach
Slide 21
Slide 21 text
Example of refactoring using “DSL-first” approach
Slide 22
Slide 22 text
What we got
Great
abstrac(on
and
single
interface
for
all
SOAP/RESTful
APIs
No
vendor
lock
Easy
to
read
and
maintain
code
Smaller
number
of
code
defects
Slide 23
Slide 23 text
Example from Better Than Everybody Software
Abstract
Query
Interface
(AQI)
–
the
way
how
we
get
DB
–
agnos(cism
and
split
off
layers.