Hi, before this project I used to have my extension code in one giant class. Sometimes it was 500-600+ lines of code. Now I’m diving more deeply into object oriented design patterns and following them trying to make my components have many small classes instead of one giant one.
My question is, how to do it in TD? Here’s what I’ve tried so far:
-
Create 10 extensions for my component. First of all: after 3-rd extension it started to take significant amount of time for TD to re init all extensions. Second: I don’t see a point for having all my classes as extensions since I only want to interface with single “main” class.
-
Have my “main” class as extension of the component and all my other classes just sitting in regular text DAT’s. Then in main I’d init them as
mod('UtilClass').UtilClass(me)
I really liked this approach until I realized that once I create an instance via import mechanism it gets cached and any changes to the child class doesn’t affect anything unless I reopen TD or do something else as radical as that -
Looked at TD components in pallete. There I saw that each sublass usually is an extension of a sub base with a little network inside. However, in my case all the work is done inside the class itself, so I don’t see a point in creating multiple base comps just to separate my extensions
Help please