r/programming • • Dec 03 '18

Open Source .NET – 4 years later

http://mattwarren.org/2018/12/04/Open-Source-.Net-4-years-later
53 Upvotes

16 comments sorted by

View all comments

Show parent comments

2

u/m50d Dec 04 '18

Validation in the ui and the logic layer are different.

No, the same type has the same set of valid states, by definition.

Do not be a lazy copy-paster, do the right thing.

This is utterly backwards. You avoid copy-pasting by avoiding repeating yourself, which means reusing the same logic - not a copy but the actual same code - when you want to do the same thing.

And, text-based communication have tons of benefits: scriptable easy to replace gui frontends testable easy to insert something (e.g., logging, network forwarding, etc.) in between

All that remains true for more structured communication mechanisms, which avoid the security issues and unreliability inherent in text-based approaches. Custom parsers are still one of the biggest sources of security vulnerabilities, and interleaving control and data is still another one.

1

u/[deleted] Dec 04 '18

Seems like you don't understand the Unix way.

None of those "structured" communication protocols, including the most retarded default choice, plain API calls, can have any of the properties I listed.

You cannot put something in between your UI and logic backend.

And, once again, validation in UI have absolutely nothing to do with the backend validation.

Also, it's really hard to screw up parsing S-expressions or even json.