scls19fr / Nextion.jl

An unofficial Julia library to communicate with Itead Nextion display
Other
1 stars 1 forks source link

Using interfaces / traits / composition over inheritance ? #15

Open scls19fr opened 6 years ago

scls19fr commented 6 years ago

Using Traits.jl https://github.com/mauro3/Traits.jl SimpleTraits.jl https://github.com/mauro3/SimpleTraits.jl Traitor.jl https://github.com/andyferris/Traitor.jl (see https://github.com/andyferris/Traitor.jl/issues/8 ) FieldTraits.jl https://github.com/SimonDanisch/FieldTraits.jl union types multiple inheritance could help to avoid to repeat a lot of code

https://en.wikipedia.org/wiki/Composition_over_inheritance

IWidget ITouchable IColourable IFontStyleable ICallback(able) IBooleanValued INumericalValued IStringValued

Maybe I should consider drawing a UML diagram https://creately.com/ https://www.genmymodel.com/ https://yuml.me/diagram/nofunky/class/draw http://www.umlet.com/ https://www.gliffy.com/examples/uml-diagrams https://online.visual-paradigm.com/solutions/free-uml-tool/ http://staruml.io https://www.modelio.org