Class 7 Reading Assignment
These are my notes from Module 7
Domain Modeling
- we need domaning modeling because;
- it is a model that can be used by both technical and busisness teams. This allows the team working with the project to have better direction and work more fluid with one another.
HTML Table Basics
- why should tables not be used for page layouts
- Do Not use tables to layout web pages. they are used for tabular data. you lose accessibility for people using screen readers, tables produce ‘tag soup’ and they are also not automatically responsive like standard layour containers.
- List and describe 3 different semantic HTML elements used in an HTML <table>.
introducing constructors
- What is a constructor and what are some advantages to using it?
- a constructor function is a function that is utilized to ‘dry’ up your code. when called a new object gets created automatically. this allows you to create a template for your objects.
- How does the term this differ when used in an object literal versus when used in a constructor?
- when used within an object literal the term ‘this’ refers to the object itself whereas the term ‘this’ refers to the constructor function.
Object Protypes Using A Constructor
- Explain prototypes and inheritance via an analogy from your previous work experience.
- prototypes allow new properties to be added to object constructors. Prototypes inherit properties from a prototype.
Constructors
What are they?
- A Special type of function
- Act like a blueprint or ‘factory’ for objects
- Start with a keyword ‘function’
why do we use them?