Hey guys, On the topic of namespacing, I have also found 'pollution' of the core a problem. I recently worked for a company that had over 30 plugins and I did run in to conflicting problems, especially with jQuery UI, which is one reason I stay away from it amongst others.
If you are interested I've created a way to add namespacing to jQuery whilst still using 'this' as DOM array. Currently, it only goes 1 level deep, but I have found it extremely usefull. Instead of: $('div').dialog('open'); you could go: $('div').dialog().open(); Check the latest of this thread: http://groups.google.com/group/jquery-dev/browse_thread/thread/664cb89b43ccb92c -- Trey On May 8, 10:20 am, chris thatcher <thatcher.christop...@gmail.com> wrote: > blah my keyboard had is heavy and i hit send before i meant to. continuing > for roddy inline > > On Thu, May 7, 2009 at 8:06 PM, chris thatcher < > > > > thatcher.christop...@gmail.com> wrote: > > roddy, nice to meet you. reponse is inline > > > On Thu, May 7, 2009 at 7:31 PM, kiusau <kiu...@mac.com> wrote: > > >> QUESTION ONE: When is use of the jQuery prototype object appropriate, > >> and when is it not? > > > i am not a jquery core or ui developer so this response must be taken with > > a grain of salt. > > > it is appropriate for the static jQuery namespace when the function is > > either 'generally useful' or 'highly reusable in instance context where the > > context is a dom node' > > > for the latter case ('highly reusable in instance context where the context > > is a dom node') i am way over-specific; however, the jquery core has > > basically cornered this market. the core dev team is highly aware of basic > > issues and most everything you could think of is already there. > > > 'polluting' the core namespace is the responsiblity of plugins. the term > > 'pollution' is used to mean only that every name you put on the namespace > > has the probability of conflicting in the future if it doesn't already > > exist. > > > if you make sure a name doesn't already exist on the jquery namespace, and > > if you think the new property (which may be a function, object, array, > > simple type, or a hetergeneous object/array/function jquery-like collection) > > is useful enough to be in the core library, please feel free to ask the > > jquery-dev list > > the chances are they will point to a thread that exists already and/or they > will question the concept by usually > 1) pointing to an existing solution > 2) providing context for why the question is still open > 3) ask you to create a ticket to fix it > 4) tell you it's a perfect use of the plug-in architecture an point you to a > great reernce for how to publish it correctly > > > > >> BACKGROUND: I am still trying very hard to identify the error that is > >> prohibiting me from incorporating a jQuery plug-in into my site in a > >> manner similar to the way that the author of the plug-in has > >> incorporated it into his. Although I have sought consultation with > >> the author, he appears uninterested in working with me. > > > post a link. you did below and i'm just about to look at it; however, it > > 'should' be the first thing you post. reduce the problem to a simple > example and post the url. the community will help you in most cases in just > a few minutes. on the other hand if you post something analogous to 'I > HAVE A MAJOR PROBLEM!!! CAN YOU HELP??? NOW!!! > 2...@#$%!#&#$%&%^%$$*$...@#%257 > > well chances are > > no > > the reason is we need you to help us help you. if you want the most basic > question answered please use this list: > jquery-ment...@googlegroups.com > > > > > > >> My still fledgling knowledge of jQuery tells me that the author of the > >> plug-in and my implementation of his plug-in are constructed > >> differently. Whereas I use jQuery's prototype property to reference > >> my method and then assign my method anonymously to my HTML document as > >> follows: $().myJQMethod(). The author of the plug-in does something > >> very different. > > >> Please compare the isolated code that I have extracted from the > >> author's plug-in and my implementation of it. Links to the source > >> pages have been included. > > >> CONSTRUCT A (The jQ_Impromptu Plug-In): > > >> (function($) { > >> $.prompt = function(message, options) { > >> })(jQuery); > > >> SOURCE: > >>http://homepage.mac.com/moogoonghwa/Imagine_Prototype/JavaScript/jQ_I... > > >> CONSTRUCT B (My implementation of the jQ_Impromptu Plug-In) > > >> (function($) { > >> $.fn.getBrowserInformation = function() { > >> })(jQuery); > > >> SOURCE: > >>http://homepage.mac.com/moogoonghwa/Imagine_Prototype/JavaScript/jQ_b... > > >> QUESTION TWO: Although I am able to implement the author's method, it > >> is not performing as it should. When the alert box appears with focus > >> the hosting HTML page is suppose to show through with dimmed opacity. > >> My implementation does not achieve this effect. Firebug has alerted > >> to me to the following breakpoint, but I am poorly unable to interpret > >> it. > > >> jQuery.cache[ id ][ name ] : > > >> Could someone help? > > >> SOURCE HTML: > >>http://homepage.mac.com/moogoonghwa/Imagine_Prototype/Content/ > > >> Roddy > > > -- > > Christopher Thatcher > > -- > Christopher Thatcher