I'm fairly new to JS with no formal training, but I try my best to be conscientious...
I notice that in our code base lots of data gets shoved into the browser's DOM. Is that a good idea? For example, a component might perform an AJAX call, get a set of data from the server, and then stick the result directly into the DOM (e.g. company_namespace.component.content.result_1, company_namespace.component.content.result_2, etc...) for later access. It feels kind of dirty to me. It seems like you'd want to use a closure of some sort that has an underlying private array with accessor functions to add or retrieve information. Are my concerns valid? Is there a compelling reason to NOT stuff junk into the DOM? If the answer has been oft-covered or is obvious please feel free to point to a reference. Since I've discovered this mailing list I've been "living on the end of a fire hose" (which is ok, you know...). Thanks, Ray -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/[email protected]/ To search via a non-Google archive, visit here: http://www.mail-archive.com/[email protected]/ To unsubscribe from this group, send email to [email protected]
