"David A. Black" <dblack / wobblini.net> schrieb im Newsbeitrag
news:Pine.LNX.4.44.0407120755490.11648-100000 / wobblini...
> Hi --
>
> On Mon, 12 Jul 2004, Randy Lawrence wrote:
>
> > How do we manage namespaces in Ruby to avoid collisions with 3rd
parties?
> >
> > In Java, they use something like "com.companyname.foo" as a naming
> > convention which then maps to directories.
> >
> > In Ruby, how do we name modules so our "foo" module doesn't collide
with
> > a 3rd-party module named "foo" from another company?
>
> I would emulate the built-in/standard library style as much as
> possible, i.e., no company names and a General::Specific::MoreSpecific
> nest.
>
> If company names absolutely must enter into it, it would be better to
> put them at the other end; I'd rather "require
> 'xml/parsers/AcmeXMLCo'" than 'AcmeXMLCo/xml/parser'.  The former is
> not ideal, but it's less disruptive and less ungainly than the latter.

But having the company name as prefix makes installation easier, because
otherwise if your package consists of several modules you'll have to
manage several sub folders.

Regards

    robert