3 ms·
I've seen many web frameworks where the design is centered around URL+Method dispatching (routing). Many frameworks also play overly clever type system tricks i
by jstimpfle 11y ago
I've seen many web frameworks where the design is centered around URL+Method dispatching (routing). Many frameworks also play overly clever type system tricks in the dispatching code, just so the intro looks really short and sweet.
Having developed two or three nontrivial web applications myself, I don't think routing is a substantial part of web application design. A framework which focuses on routing will probably be suitable mostly for small one-off applications. This approach has in fact lead to significant boilerplate in my routing endpoints. The boilerplate would probably not have amassed so naturally if I had first implemented the actual functionality as data or streaming interfaces.
If the functionality is finished, a custom integration with HTTP should not be more painful then integrating with a framework. Furthermore, the implementation can be accessed with an interface other than HTTP (testing, internal scripts...)