3 ms·
I guess you are asking why not just use the filesystem one-one like mapping url to file? A benefit of routing is that you can have a single point of contact in
by insky 12y ago
I guess you are asking why not just use the filesystem one-one like mapping url to file?
A benefit of routing is that you can have a single point of contact in your app: a front controller. And you can place your route config in one place.
This router also has RESTful routing, detecting HTTP methods upfront that correspond to a predictable method name in a named class.