reading-notes

Object-Oriented Programming, HTML Tables

Domain Modeling

Explain why we need domain modeling.

Domain modeling is the process of creating a conceptual model of a specific problem domain, which includes its concepts, relationships, constraints, and rules. The purpose of domain modeling is to provide a clear and shared understanding of the domain and its complexities. It is essential for effective problem-solving and solution design in any complex domain. By creating a shared understanding of the domain, stakeholders can work together more effectively to design solutions that meet the needs of the domain and its users.

Source

HTML Table Basics

Why should tables not be used for page layouts?

While tables can be used for layout purposes, it is generally not recommended due to accessibility, maintenance, performance, and semantic issues. Using CSS for layout purposes is a more flexible and maintainable approach that can provide better accessibility and performance.

List and describe 3 different semantic HTML elements used in an HTML <table>.

  1. <caption>: is used to add a title or caption to an HTML table

  2. <thead>, <tbody>, and <tfoot>: These elements are used to group the content of a table into sections. The <thead> element contains the header rows of the table, while the <tbody> element contains the data rows. The <tfoot> element contains footer rows.

  3. <th>: The <th> element is used to define header cells in an HTML table.

Introducing Constructors

What is a constructor and what are some advantages to using it?

A constructor is a special method that is called when an object is created. It is used to initialize the object’s state by assigning values to its properties, allowing for the encapsulation, flexibility, inheritance, and readability of object initialization.

How does the term this differ when used in an object literal versus when used in a constructor?

The this keyword behaves differently depending on how it is used. In an object literal, it refers to the object that contains the function, while in a constructor, it refers to the instance of the object that is being created.

Source -Introducing Constructors

Object Prototypes Using A Constructor

Explain prototypes and inheritance via an analogy from your previous work experience. NOTE: This is a very common front end developer interview question

Prototypes and inheritance in JavaScript can be compared to a senior employee and their junior colleagues.

Source

Things I want to know more about