L8V2L Posted September 8, 2014 Share Posted September 8, 2014 If I have a couple of script tags, they can have the potential of collision with each other with name space, correct?If I encapsulate each on in an object, will that fix that? Link to comment Share on other sites More sharing options...
justsomeguy Posted September 8, 2014 Share Posted September 8, 2014 Assuming that the objects don't have the same names and you aren't using global variables, yes. Link to comment Share on other sites More sharing options...
thescientist Posted September 8, 2014 Share Posted September 8, 2014 there are also libraries and design practices for that as well. * RequireJS * Browserify * AMD * CommonJS Link to comment Share on other sites More sharing options...
L8V2L Posted September 8, 2014 Author Share Posted September 8, 2014 there are also libraries and design practices for that as well.* RequireJS* Browserify* AMD* CommonJSNo libraries!!! Link to comment Share on other sites More sharing options...
thescientist Posted September 9, 2014 Share Posted September 9, 2014 I said there were also design practices / specs, like AMD. Maybe looks things up before you dismiss things you have no idea about. There is also the sandbox pattern and the module pattern. Link to comment Share on other sites More sharing options...
L8V2L Posted September 9, 2014 Author Share Posted September 9, 2014 I said there were also design practices / specs, like AMD. Maybe looks things up before you dismiss things you have no idea about. There is also the sandbox pattern and the module pattern. I'm pretty up for the module pattern... Care to speak on what the others are? A brief description. It can even be vague. Link to comment Share on other sites More sharing options...
thescientist Posted September 9, 2014 Share Posted September 9, 2014 or you can get a specific description, by doing some research. Link to comment Share on other sites More sharing options...
davej Posted September 9, 2014 Share Posted September 9, 2014 <script>if (typeof proj1 === 'undefined'){var proj1 = {};//project namespace}else{alert('Namespace conflict');throw {name:'error',message:'Namespace conflict'};} Link to comment Share on other sites More sharing options...
L8V2L Posted September 10, 2014 Author Share Posted September 10, 2014 I knew someone would say that but all I could find of this, http://unscriptable.com/code/Using-AMD-loaders/#42 Link to comment Share on other sites More sharing options...
scout1idf Posted September 10, 2014 Share Posted September 10, 2014 Try using Wikipedia for some of your searches..... http://en.wikipedia.org/wiki/Module_pattern Link to comment Share on other sites More sharing options...
L8V2L Posted September 10, 2014 Author Share Posted September 10, 2014 (edited) Try using Wikipedia for some of your searches..... http://en.wikipedia.org/wiki/Module_patternI'm studying with/'' module... I'm speaking on AMD. Edited September 10, 2014 by L8V2L Link to comment Share on other sites More sharing options...
L8V2L Posted September 10, 2014 Author Share Posted September 10, 2014 What laptop should I get? Is a Mac good? It seem to be the developer choice. Or is an window okay? I only ever use toashia, and that other brend I can't remember... HELP!!!! I'm in decisive!!!!Which brend should I go with!!!!And for a cheap prices!!!Please any suggestion!!!! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now