URLs should never have the server side technology

URLs should never have the server side technology used in them. Because it is just marketing for that technology and it does not just identify a resource.

Technologies that are shown in the URL but should not (with URL examples):
  • CGI https://bugzilla.mozilla.org/show_bug.cgi?id=249338 my suggestion https://bugzilla.mozilla.org/bug?id=249338 or https://bugzilla.mozilla.org/bug/249338
  • PHP http://www.facebook.com/home.php my suggestion http://www.facebook.com/
  • JSP https://issues.apache.org/jira/secure/Dashboard.jspa my suggestion https://issues.apache.org/jira/
  • ASP http://www.microsoft.com/en/us/default.aspx You should not ever have to refer to a default.aspx as http://www.microsoft.com/en/us/ should always be enough (ASP.NET also has problems rooting in the ancestor of the current MSWindows CP/M)
Most of the times these are examples of the lack of correct MVC web architectures. Always try to not use technologies that force you to have the technology name in the URL. It is bad practice. And a clear example of bad architecting.

You should also prevent using the technology name in the URL as in:
  • http://help.open.collab.net/servlets/tracking
So, always try to call a controller that will render a resource (JSON, HTML, XML, or any other format)

No comments: