gwagner's blog

CRUD Operations with IndexedDB - Part 1: Creating and Clearing a Database

gwagner's picture

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.

Asynchronous Programming in JavaScript

gwagner's picture

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.

The Most Important New JavaScript Elements for Basic Programming

gwagner's picture

There have been many articles about the new language elements introduced to JavaScript by ECMAScript 2015+ (that is, 2015+16+17+18+19+20+...). Typically, in these articles, a great number of new features are presented without taking their relevance into consideration, often with artificial programming examples that do not help to exhibit the potential use of a new feature.

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.

Dropping a DOM node without consulting its parent

gwagner's picture

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");
elemToDrop.parentNode.removeChild( elemToDrop);

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.

Representing Information Models as RDF and OWL Vocabularies

gwagner's picture

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.

Pages

Subscribe to RSS - gwagner's blog