问题
Really, it's mentioned everywhere but there is even no wikipedia page named exactly that. Is this just a fancy name for URL redirecting? Does it have another name or definition?
回答1:
Reverse routing is the process of generating the URL that would lead to a route, given a symbolic reference to the route (could be name of the route/view/controller or a reference to the controller, depending on the framework).
(This is "reverse routing" because it's the opposite of normal routing or forward routing, which maps from a URL to a route specifying the view or controller.)
Examples for various frameworks:
- Django has the url template tag and the urlresolvers.reverse helper method
- flask has url_for
- Rails has link_to
来源:https://stackoverflow.com/questions/19549805/what-is-reverse-routing