jvalue / jayvee

Jayvee is a domain-specific language and runtime for automated processing of data pipelines
https://jvalue.github.io/jayvee/
150 stars 15 forks source link

[REFACTORING] Rename wrappers to adapters #552

Open georg-schwarz opened 7 months ago

georg-schwarz commented 7 months ago
          I think we have three possibilities:
  1. Accept the wrapping concept and name the method wrapASTNode for clarity. I think it is better to rename the method than the factory though.
  2. Apply SE patterns and consider the wrapping as an adapter (?) pattern, rename wrapperFactories to adapterFactories and rename the method createAdapterForASTNode (or similar?)
  3. Consider creating domain objects from AST nodes and use individual function names depending on type, e.g. createValueType, createBlockType etc that take an AST node as parameter. Probably rename the factory to something appropriate for this.

Thinking about it, I like the second option. To me it feels like it makes the wrapping concept more clear if you know SE patterns (which we should teach / expect students to know). I am not sure the adapter pattern is a 1:1 match but it feels correct.?

_Originally posted by @rhazn in https://github.com/jvalue/jayvee/pull/549#discussion_r1570216566_