Loading ...
Sorry, an error occurred while loading the content.

Re: [ydn-javascript] changing namespace allowed?

Expand Messages
  • Eric Miraglia
    Scchoy711, Will it work? Yep. (Note that many code obfuscators go much further event than what you re suggesting, while also shrinking the overall size of
    Message 1 of 4 , Mar 17, 2006

      Will it work?  Yep.  (Note that many code obfuscators go much further event than what you're suggesting, while also shrinking the overall size of your js.  Not recommending this; see here for what/why on our recommendation. But, in general, script post-processing is pretty common.)

      Would you be going against the grain by obfuscating the namespace? I think so.  

      The YAHOO object is there not to document the legal source of the script (as you say, that's what the copyright is for) but rather to separate out the YUI Library into its own object space and make transparent to developers what the nature of that space is.  It's important here for all the usual reasons that namespaces are important in traditional software development.  But it's also important in the sense that the presence of the YAHOO object in your code is an easy way for collaborators or future developers on your project to identify the library that you're using.  In a world where scripts from heterogeneous sources often live on the same page, that's actually a nice advantage.

      In short, we'd always prefer to see you keep the APIs intact, because in the long run that seems like it makes for a more transparently organized ecosystem.  But the copyright/licensing link is all that's required.


      On Mar 16, 2006, at 11:09 PM, sschoy711 wrote:

      I love the yahoo library.  it is so well documented and flexible.

      however, one thing i am wondering is if we are allowed/able to change 
      the namespace so that it doesn't show things like YAHOO.widget.xxx? 

      I want to repackage this so my client who doesn't want to see that can 
      get their way?  I would be more than happy to include the license.txt 
      and all copyrigth information in the code.  

      Basically, if i do a global casesensitivefind/replace on YAHOO, will it 
      work and am I going against the grain?

      Yahoo! Groups Links

      <*> To visit your group on the web, go to:

      <*> To unsubscribe from this group, send an email to:

      <*> Your use of Yahoo! Groups is subject to:

    Your message has been successfully submitted and would be delivered to recipients shortly.