26
Спикер: Тема презентации: Мельник Владимир Владимирович Up-Down Development & DSL-first approach

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

  • Upload
    dataart

  • View
    153

  • Download
    0

Embed Size (px)

Citation preview

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

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

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

Up-Down Development & DSL-first approach

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

Chaos - Driven Development

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

Spaghetti – Oriented Development

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

Domain – Driven DevelopmentBetter, but isn’t great

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

Up – Down Development Everywhere!

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

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.

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

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.

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

Domain Layer

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

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

Infrastructure Layer

Infrastructure Layer does all the dirty job.

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

UI and MagickHow user sees your application

For user UI is the application.

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

D is for Dependency Inversion Principle

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

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

Layers testing

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

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

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).

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

Layers testing

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

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

Prehistory of DSL – First

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

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

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.

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

SLOC principle

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

Example of refactoring using “DSL-first” approach

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

Example of refactoring using “DSL-first” approach

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

Example of refactoring using “DSL-first” approach

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

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

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

Example from Better Than Everybody Software

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

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

Example from Better Than Everybody Software

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

Thank you!

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

Do you have any questions?