gwagner's blog

JavaScript supports four types of basic data structures

gwagner's picture

The four types of basic data structures supported by JavaScript are: array lists, maps, records and JSON tables. The following list provides a summary:

  1. Array lists, such as ["one","two","three"], are special JS objects called 'arrays', but since they are dynamic, they are rather array lists as defined in the Java programming language.

  2. Maps are also special JS objects, such as {"one":1,"two":2,"three":3}, as discussed below.

Expressing Date/Time Information with the <time> Element

gwagner's picture

While date/time information items have to be formated as strings in a human-readable form on web pages, preferably in localized form based on the settings of the user's browser, it's not a good idea to store date/time values in this form. Rather we use instances of the pre-defined JavaScript class Date for representing and storing date/time values.

Storing database tables in JavaScript's Local Storage

gwagner's picture

In most apps we have some form of data management where data is represented in tables such that table rows correspond to objects, anf the table schema corresponds to the objects' type. When building a front-end web app with JavaScript, the simplest approach for persistent data storage is using JavaScript's localStorage API, which provides a simple key-value database, but does not support database tables. So, the question is: how can we store and retrieve tables with Local Storage?

Why are associations so difficult to understand, not just for developers?

gwagner's picture

Class diagram with a chair association between classes Committee and ClubMemberIn summary, the answer to this question is: because unlike the general concept of an object type or class, the general concept of an association, as defined by UML, does not have a direct computational counterpart, neither in common object-oriented (OO) programming languages, nor in SQL.

Pages

Subscribe to RSS - gwagner's blog