Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

What is router in web development?

user-image
Question added by Milenko Mudrinic , Manager of Sale , Comtradic
Date Posted: 2014/12/23
Alaa  Aldamiri  PMP
by Alaa Aldamiri PMP , Project Manager (PMP, Scrum, Six Sigma Certified) , Saudi Business Machines SBM General Marketing and services representative of IBM in Saudi Arabia

Routes are basically paths the user takes which are attached to code that will be triggered when a user reaches the specific route.

It takes a much cleaner and clearer approach to cut down on the added hierarchy complexity that MVC can add.

Muhammad Majid Saleem
by Muhammad Majid Saleem , Senior PHP Developer / Project Manager , SwaamTech

In simple words:

Router helps web server to fetch an appropriate and exact information for user.

 

It is like Station Master at railway station, who informs to Train Driver to change track for crossing other train.

Mostafa Mohammed Naguib
by Mostafa Mohammed Naguib , Senior back-end developer , Egpay payment solution

Router or routing in web development is more like managing a well-organized redirecting systemwhich mostly would be something like thissay you have a model which called "users"and it contains a method called "new" , "edit" Or even "view"and then you have something like the ID of the userwith a good routing system your link should "user/edit/1"so your app will always take the first arg as a "Model" and find it in your models, then search for the2nd arg as "method" inside that Model, then use the3rd arg as an "id" if needed.the most flexible routing system i'v seen so far is the Zend framework Routing one.

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.