Jay Query

jQuery is a lightweight cross-browser JavaScript library that emphasizes interaction between JavaScript and HTML. http://jquery.com/

An very interesting (and the reason of its name) is that JQuery allows the developer to "query" for DOM nodes and modify them somewhat dealing with the page as it were a database. (Although not one following the relational model... I guess it is more like network model based)

Is JayQuery an example of the application of NimbleDatabases for UI and Document design and manipulation?


Rant

jQuery is crying GreencoddsTenthRuleOfProgramming, and is the evil Frankensteinian son of CODASYL (a NetworkDatabase). SQL is the de-facto standard (even though it's not a perfect language); so let's not invent more query languages. (Adding some tree-friendly SQL functions could help out in the case of markup documents.) Yet another reason why it's time to blow up the HtmlStack and start over. Tim Berners-Lee 2.0, where are you! A nation [world] turns its lonely eyes to you. --top

jQuery isn't a query language, and has nothing to do with query languages. It's a JavaScript library with a misleading name.

It is indeed a query language: "Put an event handler on all green tags with purple classes". It's a lot of things, perhaps too many. It may just end up being the next Emacs.

A query language answers questions, which is why it's called a query language. Obviously, if you find jQuery difficult, you're free not to use it. Instead, you can implement all its functionality from scratch.

    structure(s) to traverse -> filter criteria -> action(s) on filtered results

I think you are missing my point. JQuery is a band-aid. Yes, the band-aid may be better than no band-aid, but there is still a massive wound.

You claimed jQuery "is the evil Frankensteinian son of CODASYL (a NetworkDatabase)". Whether that was your core point or not, it's nonsense.

When you build a band-aid for a specific kind of mess, you tend to end up with Frankensteins. The CSS "selector" rules are also part of the disease.

My "fix" is to make stylesheets be XML and then find a convenient XML query language or devise SQL tree-oriented functions. That way we don't have to reinvent one query language for CSS and another for XML and another for tabular data, etc. OnceAndOnlyOnce. (Related: OverhaulingStyleSheets.)


EditText of this page (last edited May 31, 2013) or FindPage with title or text search