mardi 25 août 2020

Which design pattern to use here?

I am building an app that consists of many applets. Applets can nest, but they have to instantiate in the context of their parent. Functionality is largely the same across contexts, but it needs to vary in key ways. Also--importantly--when an applet instantiates, it needs access to data that will vary based on both its class and its parent (which is itself an instance of another applet). This data cannot be computed at runtime and must be stored somewhere.

What design pattern should I use here, and will I be able to scale it to many different applets?

I realize this is kind of abstract, but if I try to explain specifics I think I will get sucked into the weeds.

Aucun commentaire:

Enregistrer un commentaire