Introduction to the Unidirectional Association Application

Let’s see what we need to learn in order to create a Unidirectional Association Application.

We'll cover the following

The three example applications that we’ve have in previous parts of this course (the MinimalApp, the ValidationApp, and the EnumerationApp) have been limited to managing the data of only one object type. A real application, however, has to manage the data of several object types, which are typically related to each other in various ways. For example, there may be associations and subtype (inheritance) relationships between object types. Handling associations and subtype relationships are advanced issues in software application engineering. They aren’t often discussed at length in textbooks and aren’t well supported by application development frameworks.

A unidirectional functional association is either one-to-one or many-to-one. In both cases, associations are represented, or implemented, with the help of a single-valued reference property.

What we’ll cover

In this chapter, we’ll look at the following

  1. How to derive a plain JS class model from an OO class model using single-valued reference properties representing unidirectional functional associations.
  2. How to code the JS class model in the form of plain JS model classes.
  3. How to write the view and controller code based on the model code.

Before we show how to derive a plain JS class model and code it in JavaScript, we first introduce a few new elements of the JS language that we’ll use throughout this course.

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy