+ 2

Could a JSON based markup language take over from HTML.

Or is HTML too well established?

2nd Oct 2019, 12:55 PM
Sonic
Sonic - avatar
14 odpowiedzi
+ 10
Sonic JSON and HTML serve completely different roles and therefore wouldn't be considered as alternative options. JSON is a serializing format used for data interchange between systems. It's most well known for serializing Javascript objects over HTTP and document databases. HTML is a DSL for loading the browser DOM. This question would make more sense if a JSON based DSL for loading the DOM was beginning to grow in popularity. I'm not aware of any such DSL. 🤷‍♂️ Until then, the answer is emphatically - no. 😉👌
2nd Oct 2019, 4:45 PM
David Carroll
David Carroll - avatar
+ 6
SpaceJam♨ Having been a developer through those dreaded days of the browser wars, I can say that the pain points of Javascript today are nothing compared to what they were in the late 90s through the 2000s. It was like writing code for each browser engine back then in a different flavor of bad JS. Today, the development workflow is much nicer as we can focus on a single solution rather than chasing after every deviating nuance between the different browser engines. Javascript today is a fantastic language despite the silly null issue and a few other quirks that are easily avoided. I wasn't aware that there was still a "calling" for the replacement of Javascript. If there was such a calling, I imagine it could be accelerated by the browser engines and ECMA to agree to a standard update for an alternative language to be supported natively with direct access to manipulating the DOM. Until then, we'll need to gauge adoption of transpiling projects like Btython. 🤷‍♂️
3rd Oct 2019, 5:41 PM
David Carroll
David Carroll - avatar
+ 4
-----Feasability--------- First, can you create a JSON alternative to HTML? I think maybe it is possible. ------Competitive Advantages------ Then you need to think of why JSON would be a better markup language, good enough to justify the extreme costs of disruptions. ----Industrial Policy---- Seperate from all this, assumming first two things are met. A successful marketing strategy. In the business world it takes a lot of industrial strategy to take over a market. Look at the browser wars Microsoft didn't just release a better browser and dominate. It took a bit of tactics like bundling internet explorer with windows, even then it was a bit more involved then that. This is why this project would require a visionary leader with ⭕⭕ maybe that can be you 😊.
3rd Oct 2019, 3:44 AM
SpaceJam♨
SpaceJam♨ - avatar
+ 4
Jacob Heath chrome wasn't around when internet explorer and netscape went head to head. You can google it and read the story yourself. They call it the browser wars, in the 90s interesting piece of internet history. Very relevant case study of how a technology comes to dominate. Sonic have to agree with you here, I think that HTML and CSS are solid technologies, but people have been calling for the replacement of Javascript it just never really pans out for the last few reasons of my previous post. David Carroll Always a pleasure when you give your insights, I wish I would have gone into coding sooner than I did. Yes, you are right, javascript has matured into a dominate web language in its own right. But you misread me, I was saying ❗❗that out of HTML, CSS & Javascript I think that Javascript would be the one more likely to be replaced❗❗, correct me if I'am wrong.
3rd Oct 2019, 1:25 PM
SpaceJam♨
SpaceJam♨ - avatar
+ 3
Oh SpaceJam♨ I am no visionary leader but a humble learner with a mediocre level of curiosity. While building a browser DOM with JSON would be possible, I don't think that there is much of a competitive advantage over HTML. It probably has more of an advantage over XML due to XML's requirement that documents be well formed with compulsory end tags. As html doesn't have this requirement even the amount of saving in document size with JSON would be less compared with XML. So, I don't see it happening, even if there was a visionary leader.
3rd Oct 2019, 6:21 AM
Sonic
Sonic - avatar
+ 3
Btw SpaceJam♨ Chrome is way better than edge.
3rd Oct 2019, 6:31 AM
Jacob Heath
Jacob Heath - avatar
+ 3
HTML is kind of weird anyway right. You have to spam <div> everywhere so you have a way to hook into blocks of markup with CSS. It is so tedious that nobody writes HTML by hand anymore and instead we use tools to generate it. And while JSX is awesome it leads to code like <button onClick={this.click}></button> which sometimes makes me wonder whether XML is even the right way to express these ideas. If I was tasked to come up with notation that would surely not be it. There was this early competitor language to CSS called DSSSL, a LISP dialect, and it looked pretty lovely. With the power of hindsight and seeing how nobody writes static HTML these days maybe we could use a similar language instead of HTML: (element button (event click (lambda (e) ...))) That comes with a host of issues in itself but I like to entertain the idea of a web based entirely on LISP. I'm sure we could cook up a better HTML in JSON too. But HTML is so prevalent that it's hard to even imagine anything else isn't it.
4th Oct 2019, 1:54 AM
Schindlabua
Schindlabua - avatar
+ 2
now that you mention it, its so familiar with json vs xml case. and nowadays json is almost take over. idk maybe w3c havent thought about it, then again browsers are already use html for a long time and changing that could be an issue
2nd Oct 2019, 1:15 PM
Taste
Taste - avatar
+ 2
Taste yes, json gradually kicking out the over bloated XML is the reason why I wondered if this could also happen with html. But maybe html is too established for that.
2nd Oct 2019, 1:51 PM
Sonic
Sonic - avatar
+ 2
Let me tell you a story that will give you answer. When javascript was not a thing and web was pretty static the guys at netscape navigator (a popular browser at that time) though about making a scripting language that can manipulate HTML of page. But there was only 10 days to create that language and those guys built a decent language in those 10 days it was named JavaScript to capture some popularity from java (most hyped language of that time). In the process of making language in 10 days the developers didn't have enough time to test the language fully and there were lot of bugs that went unnoticed. W3c never fixed those bugs till date just not to break compatibility of web. So It is rare that w3c will ever try to replace HTML with something else.
2nd Oct 2019, 2:26 PM
Saurabh Sharma
Saurabh Sharma - avatar
3rd Oct 2019, 1:45 PM
Sonic
Sonic - avatar
+ 1
i really used to ie whenever i reinstalling windows. my first impression on edge after fresh install windows 10 is "whoa its so fast" but i still download firefox right after that moment
3rd Oct 2019, 6:43 AM
Taste
Taste - avatar
0
JSON has no benefit over HTML. It uses Strings as keywords, which are encapsulated ("") Further it adds complexity by adding {} and [] HTML just encapsulates lists by putting it inside tags. Short: HTML is better suited for the purpose.
4th Oct 2019, 11:59 AM
Loeschzwerg