Instance, container, group and component termonology

I think we all know that Groups are basically like a subclass of ComponentInstance but still not really etc etc.

Very often code, as well as the end user, makes no difference between a Group and a ComponentInstance, but there is no common superclass or other name given in the API to refer to them both. Often they are referred to as instances or containers.

I’m thinking I’ll refer to something that is either a Group, ComponentInstance or an Image as an instance, and a something that is either a Group or ComponentInstance as a container when naming variables and parameters. I’ve seen these terms being used interchangeably but it might be useful to make a difference between the two.

In a very technical sense you could argue an Image is also a container as it contains a face and 4 edges, but in a more practical sense this is an implementation detail, while the contained entities is the essence of a group/component.

Thoughts on this?

My naming has been:

Group/ComponentInstance => instance
Image => image
ComponentDefinition => definition

When difference between group and component instance matters I’ll use group and instance respectively. (A little bit of ambiguity in regard to instance, but usually YARD doc comments clarify this if needed.)

This is what I’ve done too so far but was thinking about unifying my phrasing going forward. In the end everything is stated in the YARD tags but it could be nice to keep things consistent.

I’m thinking
ComponentDefition -> definition
ComponentInstance -> component (might be ambiguous but since I always use definition for definitions it could work)
Group -> group
Image -> image
Group or ComponentInstance -> container
Group, ComponentInstance or Image -> instance

(Not a developer)
My confusion with Images is that once exploded, they are merely a rectangle and a face with applied texture,
But when you want to go back, you can only make it a component or group, not an image.
(Not a developer)

Under the hood that face and those edges are there the whole time, but I think it is a (badly kept) secret. Assembling an Image back from these entities could be a plugin idea.