Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

What is router in web development?

user-image
Question ajoutée par Milenko Mudrinic , Manager of Sale , Comtradic
Date de publication: 2014/12/23
Alaa  Aldamiri  PMP
par 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
par 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
par 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

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?