Why do so many namespaces start with com

I’ve noticed that a lot of companies use “reverse domain name” namespaces and I’m curious where that practice originated and why it continues. Does it merely continue because of rote practice, or is there an outstanding architecture concept I might be missing here?

Also note questions such as: https://stackoverflow.com/questions/189209/do-you-really-use-your-reverse-domain-for-package-naming-in-java that sort of answer my question but not 100%

(If it makes you feel any better, I’m really curious if I should be using it for my javascript namespacing efforts, but I’m more curious about then when and why, and that should help guide me on the javascript answer, nota bene: “window”)

Example of this practice extending to folders and files:

2

Reverse Domain Notation has its origins in Java, but is widely used in many platforms, such as Android Packages, Mac OS X Packages, JavaScript, ActionScript, and more.

The practice is extremely useful because it provides a decentralized system for namespacing software. There is no need to apply to a centralized agency for a namespace; simply use the domain name you own (reversed) and manage that within your own organization. By naming packages like this, one can be almost certain that code won’t conflict with other packages.

From Oracle’s Java Tutorials:

Companies use their reversed Internet domain name to begin their package names
for example, com.example.mypackage for a package named mypackage created by a
programmer at example.com.

Name collisions that occur within a single company need to be handled by
convention within that company, perhaps by including the region or the
project name after the company name (for example,
com.example.region.mypackage).

It’s more than a rote practice, it’s good practice because it’s a complete and fully specific namespace. If there were two companies named Acme and both chose the namespace acme., their code would conflict. But only one of those companies can own the domain acme.com, so they get to use the com.acme. namespace.

Reversing the domain name allows for a top-down architecture. com would contain code for companies (or anyone who owns own a .com domain name), and underneath that would company (domain) names. Then, deeper within that would be the structure of the organization and/or the actual namespace. (For example, if it was code from a network called internal.acme.com, that gives this department their own sub-namespace of com.acme.) This top-down structure is used in a number of applications, including in systems administration. (It’s similar to reverse IP address lookups.)

Personally, I use it for all new JavaScript code I write for my company. It ensures that the code will never conflict with any other code, even if I later write the same code for another company. It can make accessing the code cumbersome (typing com.digitalfruition. can get a bit much) but that can easily be worked around with a closure and a local variable (var DF = com.digitalfruition).

3

It’s because using namespaces reduces the chances of name conflicts tremendously, and because using your domain name (which has already been regulated) is a good way to create a global namespace.

By reversing the domain part in the namespace, you make it sortable; all names that belong to your little chunk of the namespace universe are sorted together.

And last but not least, the TLD .com is the most popular TLD on the internet, so it’s used by more software developers than any other TLD.

In any case, the practice started with Java, where each and every class needs to have it’s own file, and to play in a larger ecosystem the global namespace scheme was introduced to help keep classes easy to qualify.

4

Endianness

I’m not a java expert, but as to the general pattern this is just another permutation of big-endian vs little-endian, metaphorically speaking.

“Endianness” is sometimes used to describe the order of the components
of a domain name, e.g. ‘en.wikipedia.org’ (the usual modern
‘little-endian’ form) versus the reverse-DNS ‘org.wikipedia.en’
(‘big-endian’, used for naming components, packages, or types in
computer systems, for example Java packages, Macintosh “.plist” files,
etc.). URLs can be considered ‘big-endian’, even though the host part
could be a ‘little-endian’ DNS name.

In this case, its presumably for organizational purposes to allow for natural grouping / tree branching. It keeps things tidy at a higher level, and you dig down for more specific detail.

The alternative would be very flat, and meaningful / potentially useful grouping would have to be interpreted vs being intrinsic to the structure.

8

I think a minor detail was not mentioned in the other answers: The reason that the .com TLD is the most popular one, is that in the early days of the Web, Web-browsers like Netscape Navigator “auto-appended” .com if it was missing in the address (eg. if the name-lookup failed). So if you typed “shareware”, it would be expanded to “http://shareware.com” (or “http://www.shareware.com”; I don’t remember the www detail).
.com domains are probably still the most popular.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật