3 ms·
Because the myriad ways public people interact with your code through HTTP and routes starts to rival the complexity of getting crypto code right, with a lot of
by kbenson 10y ago
Because the myriad ways public people interact with your code through HTTP and routes starts to rival the complexity of getting crypto code right, with a lot of the same sorts of downsides (which is to say problems often lead to security issues, and very few people are capable of reasoning about all the implications of the decisions made). I would suggest someone not roll their own framework (which is essentially creating a framework of their own at some level) for the same reasons I would suggest someone not roll their own crypto. The upside is relatively minuscule compared to the downsides, IMO.
> Nobody sees any other kind of application written by a previous programmer and cries "oh no! I am entirely at the mercy of this previous programmer! If only they had used one of the dozen competing frameworks this tragedy could have been avoided.".
Yes, they do. If you came upon someone's custom HTTP client, I imagine your response would be something along those lines. If not lamenting that you're at their mercy, at least cursing them for imposing a requirement of some level of strength that you use what is very likely to be a substandard implementation of what you can find freely available. So, you either replace it with something less likely to cause the odd problem later (and deal with all the testing to make sure you didn't introduce a bug, and you probably did) or deal with those odd problems ("what do you mean we aren't conforming to TLS correctly? Why haven't we seen this until now?").
- deleted 10y ago[deleted]
- MustardTiger 10y ago> If you came upon someone's custom HTTP client, I imagine your response would be something along those lines. No, why would it? What HTTP client framework am I supposed to be wishing they used?
- kbenson 10y agoMaybe cURL? Some other one I don't know of (I know the ones in my preferred languages). Do we really need to also be responsible to dealing with already solved problems as well as the problems specific to our domain? Do we really want to also deal with the not-fully-compliant HTTP client or making sure we support HTTP/2, or do we want to use widely accepted solutions for those so we can focus on the real problem at hand (which is usually not the intricacies of HTTP negotiation, or some other well understood and supplied need).
- MustardTiger 10y agoCurl isn't a framework. >Do we really need to also be responsible to dealing with already solved problems as well as the problems specific to our domain? No? What does that have to do with anything? >Do we really want to also deal with the not-fully-compliant HTTP client or making sure we support HTTP/2, or do we want to use widely accepted solutions for those so we can focus on the real problem at hand (which is usually not the intricacies of HTTP negotiation, or some other well understood and supplied need). Did you reply to the wrong comment by mistake or something? What does any of this have to do with me or what I said?
- kbenson 10y ago> Curl isn't a framework. I wasn't under the impression we should be limiting this to frameworks. What's the difference between a framework and a library for the purpose of this discussion? I think they are functionally equivalent. I was clear to equate it to crypto originally, which doesn't really make sense when viewed as applying to frameworks only. We're a couple comments removed from that, I thought that wasn't in question. Same with an HTTP client. Frameworks don't event necessarily implement clients. I'm addressing NIH syndrome, and I don't think frameworks really deserve special consideration in any way. > Did you reply to the wrong comment by mistake or something? What does any of this have to do with me or what I said? See above. And I've been sticking with the same examples since the first comment. Why is this all of a sudden not making sense?
- MustardTiger 10y ago>I wasn't under the impression we should be limiting this to frameworks The discussion is entirely and solely about frameworks.. >What's the difference between a framework and a library for the purpose of this discussion? Wikipedia exists. >See above Above what? Nothing you said above answers my question. >And I've been sticking with the same examples since the first comment. Why is this all of a sudden not making sense? Because it has absolutely nothing to do with anything I said, like I clearly stated.