| ▲ | motorest 5 days 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 5 days ago | parent [-] |
| Because 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 5 days ago | parent [-] | | > 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 5 days ago | parent [-] | | Not meaning to be pedantic, but supporting multiple routing strategies is textbook ”more features”. | | |
| ▲ | motorest 4 days ago | parent [-] | | Are 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 3 days ago | parent [-] | | > 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. |
|
|
|
|