Object-2-Object mapping, как приправа к вашему проекту
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

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

on

  • 3,153 views

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

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

Statistics

Views

Total Views
3,153
Views on SlideShare
919
Embed Views
2,234

Actions

Likes
0
Downloads
1,501
Comments
0

2 Embeds 2,234

http://www.usergroup.od.ua 2225
http://1992046596800250872_8b90fc18dbe2c12a9d261f7cee8e1951f69a51c5.blogspot.com 9

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • 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.

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

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