News for hackers. Stuff that matters.
Re:Web SQL Database: In Memoriam by batbomb on Monday April 28, 2014 @02:01PM (#7661734)
It's unfortunate most of this was debated at the beginning of all the hype around NoSQL data stores.

It would be some work, but still be relatively trivial to build a query spec, probably based off of SQL 92, and a basic type system spec (Strings, numbers, and dates are the bulk of it), and then an implementation of everything else.

Facebook did it with Presto, although they haven't finished the DML part of it.

Reading the emails, I get the feeling most of the people involved didn't have as much experience with databases as they probably should have in order to make a truly informed decision.

Re:Web SQL Database: In Memoriam by pornel on Monday April 28, 2014 @02:21PM (#7661886)
The problem is that all pages aren't written to the spec, they're written to work with implementations.

When there's only one implementation (that authors care about), then every quirk, bug and accidental misfeature can be depended upon, and SQLite has plenty of those ("FLOATING POINT" parsed as "INT", magic of ROWID, the lax type system even more forgiving than PHP, etc.)

If there was another implementation then lack of overlap in quirks/bugs would prevent authors from depending on them (e.g. if you wrote something stupid then it'd work in one browser, but not the other).

ASCII venn diagram of 2 implementations:

   { bugs1 ( usable standard } bugs2 )
ASCII venn diagram of all browsers just shipping same Sqlite:

   {( usable: standard and all bugs })
Re:Web SQL Database: In Memoriam by nolanl on Monday April 28, 2014 @05:27PM (#7663203)
That's a good point, and one I could have added to the post. There are bugs in Web SQL, but they're largely the same on both Chrome and Safari. IndexedDB is trickier, because the bugs are all different between Firefox, IE, and Chrome. Again, another situation where libraries can help out.

Although in general, it's sad that the "independent implementations" mantra basically guarantees a lack of consistency across browsers. It's like we only have a choice between "pointing to a pile of C code" or ending up with a pile of browser bugs. Maybe the W3C could write acceptance tests to go alongside the specs.

Re:Web SQL Database: In Memoriam by pcwalton on Monday April 28, 2014 @06:28PM (#7663545)
> Maybe the W3C could write acceptance tests to go alongside the specs.

Like these? :) https://github.com/w3c/web-platform-tests

Re:Web SQL Database: In Memoriam by nolanl on Monday April 28, 2014 @06:56PM (#7663684)
Heh, I learned a thing about a thing! :) Curious to know how so many quirks slipped through, though. Maybe I should do a PR on the tests for bugs that the browser vendors might not know about, e.g. https://gist.github.com/nolanlawson/8330172.
Re:Web SQL Database: In Memoriam by TazeTSchnitzel on Monday April 28, 2014 @02:18PM (#7661858)
They could have defined a subset of SQLite which you could implement without needing SQLite.
Re:Web SQL Database: In Memoriam by frenchy on Monday April 28, 2014 @02:38PM (#7661993)
But if everyone used the same buggy implementations there would still be a problem. Web developers usually write for the implementation, not the spec.