recursive framework extension / derivation
Posted: Mon Mar 06, 2023 6:05 pm
After having already spent quite a while editing a framework definition which is derived / extended from another oXygen framework, I noticed that I cannot derive frameworks recursively: If my framework B is derived from framework A, I cannot create a derived framework C from B. If I do so, I get another framework C directly derived from A.
I can very much understand the implementer's point of view that they want to limit problems arising from transitive / recursive extension relationships. So this is not a feature request. However, I wonder what is the best way to deal with a situation, where I want to share settings, code, images, schemas, resources etc. between several, somewhat related frameworks. Here are the options that came to my mind:
1. I could just follow the approach that oXygen suggests: Derive frameworks B and C from A independently. Problem: B and C have a lot in common, so that would mean a lot of settings and resources for Author actions, buttons, CSS, schema, transformations would have to be duplicated and maintained separately. This approach does not scale well - what if I need further frameworks D, E, F that share settings with B and C (but not with A)?
2. I could try to make B a new base framework: I create a hard copy of framework A, customize it to my needs and call it B. I derive C from B, just adding / changing, what's different in C, as compared to B. This approach is OK, but the disadvantage is: A is an open source framework maintained by a community. I will lose the chance to easily update framework A without too much manual labour. If I need functionality of newer versions of A in my new base framework B, I will have to manually copy and sort it out.
3. I am already using an oXygen project file with my setup anyway. I could switch from "external" to "internal" storage of my frameworks and marry the framework definitions with the project file settings. Whereever my frameworks B and C need to access common resources (like e. g. images for buttons, common schema or template files, etc.), I would refer to them using the ${pd} editor variable instead of ${frameworkDir}. I will not be able to use my framework definitions independently from my project file anymore, but that is a price I might be willing to pay for not having to maintain duplicate versions of shared resources. I could still derive B and C from A and install updates of framework A when needed. But even though I don't have to maintain duplicate resources, I might still have to maintain quite a few duplicate definitions. (If I want to change the image file name for an Author action, I would have to adjust the Author action in every framework definition that is using this button image.)
So, none of the strategies is ideal, but I have a tendency of going down path number 3. But before I decide about that, I'd like to hear from the oXygen community, if there are any other possible solutions that I may have overlooked, and that are potentially easier or more flexible to be maintained.
Best regards,
Kai
I can very much understand the implementer's point of view that they want to limit problems arising from transitive / recursive extension relationships. So this is not a feature request. However, I wonder what is the best way to deal with a situation, where I want to share settings, code, images, schemas, resources etc. between several, somewhat related frameworks. Here are the options that came to my mind:
1. I could just follow the approach that oXygen suggests: Derive frameworks B and C from A independently. Problem: B and C have a lot in common, so that would mean a lot of settings and resources for Author actions, buttons, CSS, schema, transformations would have to be duplicated and maintained separately. This approach does not scale well - what if I need further frameworks D, E, F that share settings with B and C (but not with A)?
2. I could try to make B a new base framework: I create a hard copy of framework A, customize it to my needs and call it B. I derive C from B, just adding / changing, what's different in C, as compared to B. This approach is OK, but the disadvantage is: A is an open source framework maintained by a community. I will lose the chance to easily update framework A without too much manual labour. If I need functionality of newer versions of A in my new base framework B, I will have to manually copy and sort it out.
3. I am already using an oXygen project file with my setup anyway. I could switch from "external" to "internal" storage of my frameworks and marry the framework definitions with the project file settings. Whereever my frameworks B and C need to access common resources (like e. g. images for buttons, common schema or template files, etc.), I would refer to them using the ${pd} editor variable instead of ${frameworkDir}. I will not be able to use my framework definitions independently from my project file anymore, but that is a price I might be willing to pay for not having to maintain duplicate versions of shared resources. I could still derive B and C from A and install updates of framework A when needed. But even though I don't have to maintain duplicate resources, I might still have to maintain quite a few duplicate definitions. (If I want to change the image file name for an Author action, I would have to adjust the Author action in every framework definition that is using this button image.)
So, none of the strategies is ideal, but I have a tendency of going down path number 3. But before I decide about that, I'd like to hear from the oXygen community, if there are any other possible solutions that I may have overlooked, and that are potentially easier or more flexible to be maintained.
Best regards,
Kai