Good domain modeling helps us communicate the specific problem amongst stakeholders and allows us to be able to model and build scalable code that can be explained technically and in layman’s terms.
Tables layouts reduce accessibility for visually impaired users, the structure of a table is very complex markup wise and can make code harder to debug and tables widths and sizes are dependent on the content inside making them hard to style.
<table>
.Creating a table includes the following HTML
elements:
<table>
<tr>
<td></td>
</tr>
</table>
A constructor is basically just a function being called using the new
keyword to create a new object, bind this
to the new object, so this
can be used in te constructor, run code in the constructor and return a new object. The advantage to using constructors is a faster a shorter way to create many objects with similar properties, and using the keyword this
instead of creating a new object inside of the constructor function.
In a constructor, the this
keyword binds itself to a property that is being declared, in an object literal, we are referring to something that is currently in the object.
Inheritance is when we use the Object.create(anotherObject)
method for an object using another object. We can change the properties that we need to change using the created object and it will inherit properties we didn’t declare from anotherObject
. The same goes for prototypes, we can create different object methods using Object.prototype.functionName
and it will be shared with all Object
that is created.
An analogy of this from my previous job is when a new person onboards into our team, they are given the default priviliges, and inherit default restrictions, once they are fully onboarded into the system and into a specific team, they will also gain the shared priviliges(just like methods) once their account is fully created/onboarded.
References