3 ms·
> I'm not sure there's anything "impossible" about how small this is. You don't really need a lot of lines of code to support routes, request and response and n
by motorest 1y ago
> I'm not sure there's anything "impossible" about how small this is. You don't really need a lot of lines of code to support routes, request and response and nothing else. If anything, 765 lines of code for this is quite a lot.
How do you explain why virtually all frameworks end up requiring an order of magnitude more LoC?
- iLoveOncall 1y agoBecause they support a lot more features? I made a similar "framework" in PHP years back as an experiment and it was a couple hundred lines AT MOST.
- motorest 1y ago> Because they support a lot more features? Not necessarily. For example, some minimal web frameworks actually provide multiple routing strategies because different implementation strategy have tradeoffs.
- bdhcuidbebe 1y agoNot meaning to be pedantic, but supporting multiple routing strategies is textbook ”more features”.
- motorest 1y agoAre they, though? I mean, is it a feature to make something usable? If you have hard performance constraints and you know what routes you need to suppport, a generic but prohibitively expensive routing strategy can prevent you from using the framework.
- bdhcuidbebe 1y ago> I mean, is it a feature to make something usable? In your own example, having multiple ways of declaring routing is not required to be considered usable. So, yes.