reading-notes

View project on GitHub

Domain Modeling

Domain modeling is the process of creating a conceptual model in code for a specific problem. A model describes the various entities, their attributes and behaviors, as well as the constraints that govern the problem domain. An entity that stores data in properties and encapsulates behaviors in methods is commonly referred to as an object-oriented model.

1.The new keyword instantiates (i.e. creates) an object.
2.The constructor function initializes properties inside that object using the this variable.
3.The object is stored in a variable for later use.

some tips to follow when building our own domain models:

1.When modeling a single entity that’ll have many instances, build self-contained objects with the same attributes and behaviors.

2.Model its attributes with a constructor function that defines and initializes properties.

3.Model its behaviors with small methods that focus on doing one job well.

4.Create instances using the new keyword followed by a call to a constructor function.

5.Store the newly created object in a variable so you can access its properties and methods from outside.

6Use the this variable within methods so you can access the object’s properties and methods from inside.

What’s a Table?

A table represents information in a grid format. Examples of tables include financial reports, TV schedules, and sports results.

The <table> element is used to add tables to a web page.

A table is drawn out row by row. Each row is created with the <tr> element

Inside each row there are a number of cells represented by the <td> element (or <th> if it is a header).

You can make cells of a table span more than one row or column using the rowspan and colspan attributes.

For long tables you can split the table into a <thead>, <tbody>, and <tfoot>.

GLOBAL OBJECTS:

The Math object has properties and methods for mathematical constants and functions.

An object is a series of variables and functions that represent something from the world around you.

Web browsers implement objects that represent both the browser window and the document loaded into the browser window.

Arrays and objects can be used to create complex data sets (and both can contain the other).

Done by Omar-Zoubi GitHub