tlambert03 / microvis

Other
2 stars 2 forks source link

task: clarify naming of "backend", "frontend", "model" #14

Closed tlambert03 closed 1 year ago

tlambert03 commented 1 year ago

the usage of the words backend, frontend, and model are lax.

most "core" objects (Canvas, View, Node, etc...) indirectly subclass the FrontEndFor base class... yet at the same time the "backends" (e.g. vispy, pygfx, etc...) are really just backends for implementing a view on the core model. A "view" is also very much a "front end" :joy: ... so this is bad.

Perhaps the words "core" and "model" should be used instead of front end for. Basically, kill FrontEndFor and call it ModelFor[]?

@alisterburt?

alisterburt commented 1 year ago

big fan, I love it but not 100% on the naming convention ModelFor[Backend] - it feels a bit like having TupleOf[int] rather than Tuple[int]... Are they both generics parametrised by another class? is the difference because you want to differentiate from containers? (please let me know if I'm abusing terms, not super on top of typing still)

alisterburt commented 1 year ago

Possible alternatives

I quite like the last two! also happy to go ModelFor if that's what you prefer, I have branches ready to go for a couple of these

tlambert03 commented 1 year ago

I like VisModel! I like it better than Model I think, to differentiate between all of the third party libraries that might say model (it's clearer that this is somehow different).

And you're absolutely right about to the For bit. I did it at first to really emphasize the parameter.., but I think it was misguided (and tupleOf is a great comparison)

tlambert03 commented 1 year ago

Side thought: I was thinking we should be similarly careful on the backend to use the term adaptor when possible to refer to our objects that sit between the visModel and the (true) backend objects

alisterburt commented 1 year ago

awesome, thanks! will PR vismodel and add a task for being clear about adaptor

alisterburt commented 1 year ago

how about renaming Backend to Protocol e.g. CameraBackend -> CameraProtocol or VisCameraProtocol

tlambert03 commented 1 year ago

love it. (I think I prefer the non-vis CameraProtocol version

alisterburt commented 1 year ago

crossed wires with #23 will implement as CameraProtocol