"Up-Down Development & DSL-first approach", Владимир Мельник, DataArt

Preview:

Citation preview

Спикер:Тема презентации:

Мельник Владимир Владимирович

Up-Down Development & DSL-first approach

Chaos - Driven Development

Spaghetti – Oriented Development

Domain – Driven DevelopmentBetter, but isn’t great

Up – Down Development Everywhere!

Presentation Layer

Presentation Layer is the same as User Interface and is responsible for presenting data to user and interpreting user’s commands. We can split it conventionally to forms and views.

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 automatized with the help it.

Domain Layer

It defines tasks that application should do and coordinates them between Domain Entities/ Aggregates and Services.

Infrastructure Layer

Infrastructure Layer does all the dirty job.

UI and MagickHow user sees your application

For user UI is the application.

D is for Dependency Inversion Principle

Split off your app on layers that should not be dependent on layers below.

Layers testing

With Up-Down development your unit tests becomes acceptance, functional or integration tests.

Layers testing

Write unit tests for screen or screens of a feature for your presentation layer.

Write correct static presentation 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 Application layers (refactor).

Layers testing

“Make UI dynamic” means your Unit-tests becomes functional, integration or even acceptance.

Prehistory of DSL – First

“DSL-first” approach as evolution of Up-Down Development

DSL – First approach

“The whole is greater than the sum of its parts” – Aristotle

SLOC - System as a Logic Over Components.

DSL implementation is the system and code written in DSL is the system rules and/or state.

SLOC principle

Example of refactoring using “DSL-first” approach

Example of refactoring using “DSL-first” approach

Example of refactoring using “DSL-first” approach

What we got

Great abstraction and single interface for all SOAP/RESTful APIs

No vendor lock

Easy to read and maintain code

Smaller number of code defects

Example from Better Than Everybody Software

Abstract Query Interface (AQI) – the way how we get DB – agnosticism and split off layers.

Example from Better Than Everybody Software

Thank you!

Do you have any questions?

Recommended