Take the 2-minute tour ×
English Language & Usage Stack Exchange is a question and answer site for linguists, etymologists, and serious English language enthusiasts. It's 100% free, no registration required.

I need to understand the difference and the application of both words (route/routes and router/routers). I plan to apply one of words to define the route of a URL for a website. For instance:

URL /route/example will be routed to a specific callback.

The problem is that I need to understand the definition of these words to decide which one I will use for this purpose.

share|improve this question

closed as off-topic by tchrist, FumbleFingers, MrHen, Mitch, Ronan Jul 7 at 10:18

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions that can be answered using commonly-available references are off-topic. A list of these references can be found here: List of general references" – tchrist, FumbleFingers, MrHen, Mitch, Ronan
If this question can be reworded to fit the rules in the help center, please edit the question.

    
I wonder if this is a good site to get a reliable answer for very technical terms used in very specific and narrow way, or if an answer is more likely to be human equivalent of machine translation. These words even mean different thing in visible user interface and in source code comments. –  hyde Jul 6 at 6:49
    
This topic is off-topic here, as it is about technical vocabulary. A correct answer would be entirely about the technical subject, not about the English language. This might be on-topic at Webmasters. –  David Richerby Jul 6 at 7:57
    
What did a dictionary say about those two words? –  Mitch Jul 7 at 2:07

2 Answers 2

up vote 4 down vote accepted

It might be confusing that "route" is also a verb. So the following sentence is correct:

The router routes you to a route.

I'm guessing you're referring to some of the popular web frameworks, such as Express or Grails, that use this terminology. You can think of a route as the name of a function or resource, which is requested by the user via URL.

For example, say you want to show the user a color of car. You might define a route like this:

  • /car/:color
    • Returns the car of color :color
    • Example: the URL /car/blue returns a blue car.

If we were to write a function that did this, it might look like this:

  • function car (color) { ...
    • Returns the car of color color
    • Example: car('blue');

The web framework will setup this mapping: route -> function. So the route here is the key, and the function is the value. The router is the mechanism in the framework that uses the route specified by the user to figure out what function to invoke.

share|improve this answer
    
I'm talk exactly about frameworks. So, can I say that I need add a new route to the router? Like $router->add_route()? Or I need use same term like $router->add_router() or $route->add_route()? –  David Rodrigues Jul 6 at 2:38
1  
$router->add_route() is correct. Also I would say that a router routes via a route. –  Jim Jul 6 at 4:29

Regarding to computer science terms, as far as I know router is what we known as device in charge of assigning IP addresses and controlling data packages within the network and so on. On the other hand we have route, which essentially means the same as "path". A path is a "direction" pointing to a unique file system location by following the directory tree hierarchy.

share|improve this answer
1  
This is incorrect on both points. Routers do not assign IP addresses and routes are not paths in the sense that filesystems use the term. –  David Richerby Jul 6 at 7:49
    
@DavidRicherby Since when do routers not assign IP addresses? My wireless router has a DHCP server built in and uses it to assign IP addresses to my local network. This is a different type of router than the one being asked about, but it is not incorrect to say that a router is what is widely known as the device that assigns IP addresses and controls data package movements within a network. –  Janus Bahs Jacquet Jul 7 at 9:18
    
@JanusBahsJacquet Fair point. The correct statement is that any individual router does not necessarily assign IP addresses and that many IP addresses are not assigned by any router at all. –  David Richerby Jul 7 at 18:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.