In this article, we show how to create and clear an IndexedDB database keeping all code in a single HTML file. Creating an IndexedDB database means first creating an empty database, and then adding records to its empty tables (or "object stores"). In Part 2, we will explain how to retrieve, update and delete IndexedDB records, such that we get the full collection of CRUD operations: Create, Update, Retrieve and Delete.
In programming, we often have the situation that, when calling a possibly time-consuming input/output (I/O) operation (or any long-running operation, e.g., for performing a complex computation), the program execution has to wait for its result being returned before it can go on. Calling such an operation and waiting for its result, while the main program's further execution (and its entire thread) is blocked, represents a synchronous operation call.
In this post, we only present the most important new language elements, which are generally useful for all kinds of basic programming tasks, in a summarized way.
For quite a long time, it was pretty cumbersome to delete a node from the DOM of an HTML document because one had to go to its parent and ask it to destroy its child (by invoking removeChild), like so:
var elemToDrop = document.getElementById("elemID");
It has always felt strange having to use such an indirect approach (having to ask the parent) for the very basic operation of dropping a DOM node.
The Resource Description Framework (RDF), together with its extension RDF Schema, is a logical formalism that allows formalizing information models in the form of RDF vocabularies and representing propositional information on the Web, embedded in web pages or in the form of special web data sources. OWL extends RDF by adding many additional language elements for expressing constraints, equalities and derived classes and properties in the context of defining vocabularies. Unfortunately, both RDF and OWL have many usability issues.