JavaScript is the most popular language today. Can it be a candidate to replace HTML in the semantic grounds?

Just an illustration of Semantic JavaScript

asked 31 Dec '12, 05:50

CybeSpeaker's gravatar image

CybeSpeaker
234
accept rate: 0%


JavaScript can not replace HTML, but it can help semantics to be used in HTML. Your example illustrates how to do reasoning over facts embedded in JavaScript structures, but you don't use HTML.

You can see another illustration of reasoning over triples embedded within HTML with RDFa using JavaScript. In this example, you can enter statements, such as: Erasmus Darwin was Robert Darwin's father or questions such as: Who were Charles Robert Darwin's parents?

permanent link

answered 31 Dec '12, 11:32

link0ff's gravatar image

link0ff
262
accept rate: 100%

Thank you for answering. The example you gave can't ask me questions. I mean a little bit different process. Not the moment when a user searches for information. But the moment when he feeds new information into a machine.

(31 Dec '12, 12:24) CybeSpeaker CybeSpeaker's gravatar image

Like in expert systems where you can add new information either by using data-driven approach by asking yes/no questions (like in your example) or add new facts by allowing a user to enter free-form sentences in a natural language. But this is not the main difference. The difference relevant to the Semantic Web is that with the semantic based approach, information represented by triples is stored in HTML by using RDFa. So if you want to change your example to make it semantic based, you could output the collected facts using RDFa embedded within HTML. Then external applications could use it.

(31 Dec '12, 13:52) link0ff link0ff's gravatar image

Javascript is semantic, just like HTML, every language has its own semantics.

HTML is used to describe the contents of a web page, and Javascript could be used to describe these same contents. If we consider the contents as a description (as in HTML) then we only need JSON, converting from HTML to JSON and backwards would simply be a syntactic translation, instead of the tag "head" we would use the attribute "head" in some Javascript object.

But why would we do that?

HTML works quite fine for what it does, if there is any movement in this direction I think the first steps will be Javascript templates to generate HTML out from JSON, as any decent server side language does already.

I'm sorry this doesn't address the semantic web topics.

Now, if we consider the languages used for knowledge representation in the semantic web, as RDF, and how it can be expressed in XML, N3, Turtle or other notations it's easy to see that we can easily do something similar with JSON. And maybe it would be convenient and save some time and effort from parsing if we are going to reason (infer new triples) using some Javascript engine.

Is that interesting?

I don't know. Maybe you or someone else can come up with an interesting use case. My perception is that this kind of agents that use the knowledge available to reason over it tend to be developed as services in the cloud, and they may be free but retain the code and the economic profit possibilities. Javascript is gaining strength in the server side with Node.js, but I cannot tell which language may become the most widely used in the cloud or how long or how strong may be the predominance of the cloud as the business model for semantic web applications (if that ever happens).

tl;dr

In short, technological progress will be where money is or where crazy people are making some progress regardless of the money. Where is the money? I wish I knew, please tell us if you find out. Until then, I will side the crazy people :)

permanent link

answered 02 Jan '13, 12:01

trylks's gravatar image

trylks
1136
accept rate: 0%

edited 02 Jan '13, 12:06

Thank you for paying attention to my question here. I believe I belong to the crazy people. Book printing was once a crazy idea and book writing as well. We already seldom write on paper. We write on RAM. RAM is better than paper, but we still use it much like it were paper.

I think of the future web not as a collection of linked pages, but as a collection of linked words. And references to real world objects will be most important, because through this words gain more meaning. Pages will be built on request by search engins. Sites will be just stores of connected data.

(02 Jan '13, 13:21) CybeSpeaker CybeSpeaker's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×23

question asked: 31 Dec '12, 05:50

question was seen: 926 times

last updated: 02 Jan '13, 13:21