0
©   O LEKSII   DUKHNO   @   LO HIKA   SYST EMS
COMPLEXITY OF SOFTWARE
ABSTRACTIONS AND MODEL
ABSTRACTIONS AND MODELМодель представ-ляет собой специальноотобранный и сознательно упрощенный запасзнаний (набор данных)П...
DDD AS THE TOOL
DTO AND VIEW MODELDTO• Model data onlyView Model• Model data and behavioral aspects
WHY USING O-2-O WITH DDD?     Layers are independent     Code aligning     Flattening logic encapsulation
RESULTS USING DDD WITH O-2-O ?     Neater code     Simpler support     Better understanding
SAMPLES - DATA LAYER
SAMPLES – SERVICE LAYER
SAMPLES – APPLICATION LAYER
MODELS, DATA TRANSFER OBJECTS AND VIEW MODELS
HOME-GROWN OVER “OPERATOR” KEYWORDCode template:• public static implicit operator DTO_Type ( Entity_Type entity)          ...
HOME-GROWN OVER EXTENSION METHODSCode template:• public static DTO_Type ToDTO ( this Entity_Type photo )                  ...
HOME-GROWN OVER SEPARATE CLASSInstructions:• Define static or singleton class• Implement conversion methods explicitly    ...
EMIT MAPPER KEY SUFFICIENCIESFast (close to hand written code)Supports monoPretty extensible
EMIT OBJECT MAPPERS
EMIT MAPPERS FACTORY
EMIT MAPPER CONFIGURATION
EMIT MAPPER                   Standard               Custom converter               Post processing              Custom co...
OTIS          Metadata       Configuration file       Custom mapping          providers
OTIS                       MetadataNo DateTime and nullable value types support                    Configuration file     ...
AUTOMAPPER Mapping                Mapping Through                Through        Test MappingConvention            Configur...
USING AUTOMAPPER IN THE ALLOCINE-CMS
USING AUTOMAPPER IN THE ALLOCINE-CMS
THE OTHERS OPTIONS    Entities to DTOs    T4 templates – To    be continued
MAPPERS SUMMARY TABLE          Style     Facade    Spee     Open Reliabilit Silve Manuals     Cost///                     ...
Upcoming SlideShare
Loading in...5
×

Object-2-Object mapping, как приправа к вашему проекту

3,696

Published on

"Object-2-Object mapping, как приправа к вашему проекту" by Алик Духно

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
3,696
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
1,502
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • DDD layers:PresentationApplicationServiceDomainDTOДостоинства:Спрятанные деталиРазглаживание серии связанных бизнес сущностейУменьшенное колличество вызовов на уровне данныхНедостаткиУвелечение колличества классов и соответсвенно затраты на кодированиеДополнительные вычисленя
  • When implementing code for transformation between the types, the required effort can make significant part of overall effort on project, thus making the project more expensive and/or delaying release date. Types which implement these transformations are usually called assemblers, and often consist of heaps of trivial code which has to be properly tested and maintained. The idea behind otis is that the assembler requirements should be expressed declaratively, and the library will take care of generating the assembler types.
  • Transcript of "Object-2-Object mapping, как приправа к вашему проекту"

    1. 1. © O LEKSII DUKHNO @ LO HIKA SYST EMS
    2. 2. COMPLEXITY OF SOFTWARE
    3. 3. ABSTRACTIONS AND MODEL
    4. 4. ABSTRACTIONS AND MODELМодель представ-ляет собой специальноотобранный и сознательно упрощенный запасзнаний (набор данных)Представленный в структу-рированной форме.
    5. 5. DDD AS THE TOOL
    6. 6. DTO AND VIEW MODELDTO• Model data onlyView Model• Model data and behavioral aspects
    7. 7. WHY USING O-2-O WITH DDD? Layers are independent Code aligning Flattening logic encapsulation
    8. 8. RESULTS USING DDD WITH O-2-O ? Neater code Simpler support Better understanding
    9. 9. SAMPLES - DATA LAYER
    10. 10. SAMPLES – SERVICE LAYER
    11. 11. SAMPLES – APPLICATION LAYER
    12. 12. MODELS, DATA TRANSFER OBJECTS AND VIEW MODELS
    13. 13. HOME-GROWN OVER “OPERATOR” KEYWORDCode template:• public static implicit operator DTO_Type ( Entity_Type entity) Open sample
    14. 14. HOME-GROWN OVER EXTENSION METHODSCode template:• public static DTO_Type ToDTO ( this Entity_Type photo ) Open sample
    15. 15. HOME-GROWN OVER SEPARATE CLASSInstructions:• Define static or singleton class• Implement conversion methods explicitly Open sample
    16. 16. EMIT MAPPER KEY SUFFICIENCIESFast (close to hand written code)Supports monoPretty extensible
    17. 17. EMIT OBJECT MAPPERS
    18. 18. EMIT MAPPERS FACTORY
    19. 19. EMIT MAPPER CONFIGURATION
    20. 20. EMIT MAPPER Standard Custom converter Post processing Custom configurator
    21. 21. OTIS Metadata Configuration file Custom mapping providers
    22. 22. OTIS MetadataNo DateTime and nullable value types support Configuration file Custom mapping providers
    23. 23. AUTOMAPPER Mapping Mapping Through Through Test MappingConvention Configuration Source/Destination Projection Validate Properties Names Configuratio Convention Type n Converter Value Resolver Ignore
    24. 24. USING AUTOMAPPER IN THE ALLOCINE-CMS
    25. 25. USING AUTOMAPPER IN THE ALLOCINE-CMS
    26. 26. THE OTHERS OPTIONS Entities to DTOs T4 templates – To be continued
    27. 27. MAPPERS SUMMARY TABLE Style Facade Spee Open Reliabilit Silve Manuals Cost/// d Sourc y rlight e Emit Procedura No The Yes Low Yes Poor MidMapper l Best Auto Object Yes Good Yes High Yes Good LowMapper OrientedHome- Any Depends Depend Could Depends Yes Depends Highgrown s be
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×