4 ms·
90% of everything served as JSON can be served as semantic HTML and then manipulated with roughly the same amount of code required to manipulate JSON. Yes, JSON
by romaniv 11y ago
90% of everything served as JSON can be served as semantic HTML and then manipulated with roughly the same amount of code required to manipulate JSON. Yes, JSON navigation is "built in". However, HTML has incredibly powerful CSS queries which allow you to manipulate hierarchical data with minimal fuss.
- tomjen3 11y agoCSS doesn't even have a way to select all h1 elements that contains a div with a date class so I strongly question the assertion that it has "extremely powerful CSS queries" (if you think you are about to prove me wrong with a one-liner, please re-read the phrasing).
- romaniv 11y agoYou did not provide an example of production-ready JSON query library for feature comparison.
- hrktb 11y agoI understand that everything in json could also be represented in another format. But if your master data is in json, does it always make sense to convert the data to static html just for the sake of it ? Would you build a server component only for that conversion ? The answer to these question will depend on your priorities and use case, and the choice can easily be between no site or a js rendered site.
- romaniv 11y agoYou're assuming the same thing you're arguing for. Namely, that JSON should be your base format. I can equally say: "I understand that everything in HTML could also be represented in another format. But if your master data is in HTML, does it always make sense to convert the data to JSON just for the sake of it? Would you build a separate client-side rendering component only for that conversion?" There two non-circular considerations that favor HTML: 1. Web pages still render via DOM. JSON data has to be tramsformed, HTML does not. 2. HTML has semantic capabilities. JSON does not.
- hrktb 11y agoI am arguing that no one format SHOULD be your base format for data. You'll happen to have a format or another for any reason, it could be json, xml, csv or anything else. Contrary to that you are positing that everything should always be based on or converted to plain html before serving to a browser. That's the point where we disagree.
- mark_l_watson 11y agoI interpret 'master data' as meaning something different: a uniform set of schemes used throughout an enterprise that supports an organization's data stores. Master data is a canonical representation.