Dry-ing Magritte
Stephan Eggermont & Diego Lont
Do it yourself
• Gofer new
• url: 'http://smalltalkhub.com/mc/
DiegoLont/QCMagritte/main';
• package:
'ConfigurationOfQCMag...
Introduction
• Magritte framework describes domain
objects and how to show them
• Very abstract
• Hooks not very obvious
Hexagonal architecture
• Use a domain model
• Use ports and adapters for all concerns
• UI
• Validation
• Persistency
• Ne...
This presentation
• Extend Magritte
• With as little duplication as possible
• Without having to write parallel hierarchie...
Example
• We use Twitter Bootstrap as a case
• Model is small
• Hard to extend
Custom rendering
• Default: renders table
• You can change table layout (a bit) in css
• Next option:
• Custom components
...
Custom Component
• For displaying a field different
• E.g. a European date format instead of US
• Problem
• Needs to be set...
Custom descriptions
• each domain type needs its own
description
• birthdate may be different from other
date types (histo...
Custom renderer
• Allow different layout than a table (i.e. div)
• Does not allow different components
• Problems:
• Needs...
DescriptionBuilder
• Problem:
• Each description needs same settings
• Solution:
• Custom description builder
• Root class...
Multi language labels
• Editor for several languages
• Default is “toString” of the key
• Languages can be added
• Transla...
Ajax
• Rendering is easy
• use custom renderer
• generates ajaxLabels
• Problems
• memento doesn’t apply domain rules
• de...
Memento
• Generic dictionary, no domain class
• Setting one value doesn’t affect others
• firstname change <=> fullname cha...
Dynamic descriptions
• Hide fields based on state
• Options based on state
Reports
• Part of ToManyComponent
• A table, generated from a description
• User wants to be able to
• Filter content dyna...
Dynamic reports
• Quite easy
• Use custom report renderer
• Add custom columns to allow AJAX filter
• Enable filters in to m...
User settings
• Easy to incorporate in component
• Problem
• Components are hard to re use
Queries
• Basis of report (possible)
• More precise filtering
• Allows for user settings
Thanks
• Friedrich Dominicus (Q-Software)
Upcoming SlideShare
Loading in …5
×

Dry-ing Magritte

1,045 views

Published on

Stephan Eggermont & Diego Lont

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

No Downloads
Views
Total views
1,045
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
2
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Dry-ing Magritte

  1. 1. Dry-ing Magritte Stephan Eggermont & Diego Lont
  2. 2. Do it yourself • Gofer new • url: 'http://smalltalkhub.com/mc/ DiegoLont/QCMagritte/main'; • package: 'ConfigurationOfQCMagritte'; • load. • ConfigurationOfQCMagritte project development load: #( 'Demo' ).
  3. 3. Introduction • Magritte framework describes domain objects and how to show them • Very abstract • Hooks not very obvious
  4. 4. Hexagonal architecture • Use a domain model • Use ports and adapters for all concerns • UI • Validation • Persistency • Network
  5. 5. This presentation • Extend Magritte • With as little duplication as possible • Without having to write parallel hierarchies • Without having to subclass everything
  6. 6. Example • We use Twitter Bootstrap as a case • Model is small • Hard to extend
  7. 7. Custom rendering • Default: renders table • You can change table layout (a bit) in css • Next option: • Custom components • Custom descriptions • Custom renderer
  8. 8. Custom Component • For displaying a field different • E.g. a European date format instead of US • Problem • Needs to be set for each field
  9. 9. Custom descriptions • each domain type needs its own description • birthdate may be different from other date types (history/future, defaults) • Only usefull for different types • You need to make a component as well
  10. 10. Custom renderer • Allow different layout than a table (i.e. div) • Does not allow different components • Problems: • Needs to be set for each domain object • Does not propagate (on “add / details”)
  11. 11. DescriptionBuilder • Problem: • Each description needs same settings • Solution: • Custom description builder • Root class • Different package (monkey patch)
  12. 12. Multi language labels • Editor for several languages • Default is “toString” of the key • Languages can be added • Translation can be exported / imported from/to csv • => DescriptionBuilder
  13. 13. Ajax • Rendering is easy • use custom renderer • generates ajaxLabels • Problems • memento doesn’t apply domain rules • description isn’t updated
  14. 14. Memento • Generic dictionary, no domain class • Setting one value doesn’t affect others • firstname change <=> fullname change • no domain validation in the memento • solution:AjaxMemento • allows domainrules to be set (influences)
  15. 15. Dynamic descriptions • Hide fields based on state • Options based on state
  16. 16. Reports • Part of ToManyComponent • A table, generated from a description • User wants to be able to • Filter content dynamically (AJAX) • Add / Remove columns • Save settings to profile
  17. 17. Dynamic reports • Quite easy • Use custom report renderer • Add custom columns to allow AJAX filter • Enable filters in to many component
  18. 18. User settings • Easy to incorporate in component • Problem • Components are hard to re use
  19. 19. Queries • Basis of report (possible) • More precise filtering • Allows for user settings
  20. 20. Thanks • Friedrich Dominicus (Q-Software)

×