What is DOM? What is the HTML DOM?
Defination: DOM
With the object model, JavaScript gets all the power
it needs to create dynamic HTML:
• JavaScript can change all the HTML elements on
the page
• JavaScript can change all the HTML attributes on the page
• JavaScript can change all the CSS styles on the
page
•JavaScript can remove existing HTML elements
and attributes
•JavaScript can add new HTML elements and
attributes
•JavaScript can react to all existing HTML events on the page
What is the HTML DOM?
The HTML DOM is a standard object model and programming interface for HTML. It defines:
• The HTML elements as objects
• The properties of all HTML elements
• The methods to access all HTML elements
• The events for all HTML elements
In other words: The HTML DOM is a standard for how to get, change, add, or delete HTML elements.
Core concept of MVC is to separate the business logic, user interface and data modelling from each other.
Model:
Model extracts data from a database like cloud, local storage, APIs. Sometimes it consist of some business logic.
View:
View represents the user interface of the app, It shows the modelled data and taking inputs from user.
Controller:
Controller mostly consist of business logic, that is what data will be displayed to user, also handling user input.
Flow of system:
Separating the three of these fundamental parts of tasks assists the engineer with composing a perfect code which makes the code reusable.
It becomes very easy to work on the project as it does not affect other parts of the project if something is changed in one part.
User interacts with view in which data is displayed, and provide the input with controller through view.
Controller is like brain it manipulates the data from the user or takes the data from the model to work on it and provides it to the view which shows the desired data to the user.
Thanks for reading our blog.
Www.deepthinker369.blogspot.com
Comments
Post a Comment
Write your opinion in comment section