gwagner's blog

Web Development Pitfall No.1: Confusing a DOM collection with a JS array

gwagner's picture

Summary

Don't confuse a DOM collection with a JS array: Array functions, such as the forEach looping method, cannot be applied to a DOM collection!

For instance, when you retrieve all rows of an HTML table element, you get an HTMLCollection, which is an array-like object, but not an instance of Array, and therefore the following code does not succeed because the Array method forEach is not defined for an HTMLCollection like myTableEl.rows:

Architectures for the Web of Things

gwagner's picture

In the Web of Things (WoT), special communication networks composed of sensor nodes, actuator nodes and service nodes form the basis for new types of web applications, which are directly connected to the real world via sensors and actuators, and can be private, such as smart home apps, personal robotics apps and factory control applications, or public, such as air pollution monitoring systems and city parking management systems.

What does it need to be not only a good coder, but become a great app developer?

gwagner's picture

If you want to become a great app developer, it's not sufficient that you master your favorite programming technologies. It's essential that you understand all basic concepts and techniques, not just in programming, but also in information management.

A programming (or software development) technology typically combines a programming language (such as JavaScript, Java or C#) with a framework/library for user interface and data storage programming (such as BackboneJS, JSF or ASP.NET MVC).

Defining and Using Classes in JavaScript

gwagner's picture

The concept of a class is fundamental in object-oriented programming. Objects instantiate (or are classified by) a class. A class defines the properties and methods (as a blueprint) for the objects that instantiate it. Having a class concept is essential for being able to implement a data model in the form of model classes within a Model-View-Container (MVC) architecture.

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.

Pages

Subscribe to RSS - gwagner's blog