Semantic URL
Encyclopedia
The term semantic URL refers to a URL
Uniform Resource Locator
In computing, a uniform resource locator or universal resource locator is a specific character string that constitutes a reference to an Internet resource....

 which is of a form that is immediately and intuitively meaningful to non-experts
Layman
A layperson or layman is a person who is not an expert in a given field of knowledge. The term originally meant a member of the laity, i.e. a non-clergymen, but over the centuries shifted in definition....

. Such URL schemes tend to reflect the conceptual structure of a collection of information (see Information Architecture
Information Architecture
Information architecture is the art of expressing a model or concept of information used in activities that require explicit details of complex systems. Among these activities are library systems, Content Management Systems, web development, user interactions, database development, programming,...

) and decouple
Coupling (computer science)
In computer science, coupling or dependency is the degree to which each program module relies on each one of the other modules.Coupling is usually contrasted with cohesion. Low coupling often correlates with high cohesion, and vice versa...

 the user interface
User interface
The user interface, in the industrial design field of human–machine interaction, is the space where interaction between humans and machines occurs. The goal of interaction between a human and a machine at the user interface is effective operation and control of the machine, and feedback from the...

 from a server's internal representation of information. Semantic URLs have become an issue in recent years with the increasing use of server-side scripting
Server-side scripting
Server-side scripting is a web server technology in which a user's request is verified by running a script directly on the web server to generate dynamic web pages. It is usually used to provide interactive web sites that interface to databases or other data stores. This is different from...

 to power web sites and web services.

Non-semantic URLs

A non-semantic URL is typically composed of a path
Path (computing)
A path, the general form of a filename or of a directory name, specifies a unique location in a file system. A path points to a file system location by following the directory tree hierarchy expressed in a string of characters in which path components, separated by a delimiting character, represent...

, script name, and query string
Query string
In World Wide Web, a query string is the part of a Uniform Resource Locator that contains data to be passed to web applications such as CGI programs....

. The query string parameters dictate the content that is to be shown on the page, as in the following example:
http://example.com/showproduct.cgi?prodid=3448

Problems

The key issue with non-semantic URL is that while the query string parameters can be manipulated by hand, it is not always obvious what their possible values are. For example, many content management systems use a database
Database
A database is an organized collection of data for one or more purposes, usually in digital form. The data are typically organized to model relevant aspects of reality , in a way that supports processes requiring this information...

 record number to specify the page. This has a logical meaning only to the database management system
Database management system
A database management system is a software package with computer programs that control the creation, maintenance, and use of a database. It allows organizations to conveniently develop databases for various applications by database administrators and other specialists. A database is an integrated...

, meaning page URLs cannot be inferred by users.

Also, if the site database is moved/restructured, or the site itself is ported to a different software, all of its URLs can change, due to database records being re-ordered, script file names and/or extensions being changed, and so on. This can cause numerous problems, such as broken links (both internally and from external sites) and removal of search engine listings.

How a semantic URL works

A semantic URL replaces long query strings with a simple, traditional path structure. For example, the URL shown above could be replaced with the following:
http://example.com/products/example-product

The implementation of this can vary, but most often involves transparently rewriting the semantic URL into the query string form which is understood by the server-side software. Because the rewriting takes place on the server side, the semantic URL is the only form seen by the user.

Key points

Semantic URLs typically have the following qualities:
  • are easily remembered,
  • indicate navigational structure and position,
  • are intuitively manipulated,
  • are more durable and more reliably bookmarked, and
  • may inadvertently improve security by hiding internal server or application information.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK