I have a project where I load parts of my content over an ajax request. I get everytime the same structures of information (json) and I tried to make a coffeescript class for each DOM-Layout which presents these structures.
Im working on the first DOM-representation for these structures and my code is blowing up by statements like controls.append @Legende.content.messageSpan
or @Legende.content.itself.append $(labelNew).html "Name: "
The problem: There are 3 following DOM-representations i have to implement and that will blow up my code.
My question is as follows: What is the main practice to handle many DOM-tree changes and/or prevent enlarging the number of files and increased file sizes?