Moving ahead with my work, solved a few problems, refactored my JavaScript libraries into something I can reuse
I'm glad I don't have to use tricks like this to deal with JavaScript namespacing :
Tons of ways people use to deal with the namespace issue like closures, IIFEs, etc., now that I don't have to do it (because I'm working on backend JS), JS becomes more bearable...
So sharing this today, done awhile ago... what I do to generate my models is to use a template, (mustache.js in this case) then render the model... I have ~100 lines of spaghetti code that does it for now, actually parses an HTML template and inserts the properties into a model template.
I'm glad I don't have to use tricks like this to deal with JavaScript namespacing :
Tons of ways people use to deal with the namespace issue like closures, IIFEs, etc., now that I don't have to do it (because I'm working on backend JS), JS becomes more bearable...
So sharing this today, done awhile ago... what I do to generate my models is to use a template, (mustache.js in this case) then render the model... I have ~100 lines of spaghetti code that does it for now, actually parses an HTML template and inserts the properties into a model template.
Comments
Post a Comment