ruby on rails - Why is web routing not always automated? -


What is the purpose of manual web routing? Why not all people automatically map between URLs and modules / method / functions names?

I would argue that you can start with completely automatic mapping, and then you want to apache mod_rewrite or mod_redirect or whatever you can use, you want to refactor in any way that is current URL will be changed without breaking the URL.

Due to using two main manual routing to do more than automatically.

  1. Manual routing allows you to use the rest as it is meant to be used. This means that the same URL can access up to 4 different tasks, which The used HTTP method differs from (Post, GAT, Put, Delayed). With automatic routing, you will highlight the method names of your underlying functions, therefore, you will have 4 different URLs.

  2. Manual routing also allows you to find more search engine friendly urls, usually using slugify method, but manual routing allows you to ignore this additional information. , And just focuses on the ID portion of the URL to take you to the right path for a specific resource.

    There is another reason, which is purely cosmetic, is that the URLs just look better, are they causing the problem? Something like this can happen.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -