Here you will create a dynamic web-application using minimal HTML and instead using the Document Object Model (DOM) and JavaScript

Why? Why can’t I just write the HTML, the CSS, link it together and I have my site?! Yes yes, it may look like I am making things more complicated than needs must, but the efficiency of single page apps can save time later on when developing dynamic web applications, especially when making changes.

There are many angles to addressing this issue, the most obvious to state is from the perspective of the browser (for example, chrome, firefox…). If you have a dynamic web application which has many pages of material, there’s probably repeated code somewhere(such as the navigation bar, the footer and more). When you navigate through these pages the browser will refresh the page each time, reloading content that was already loaded in the previous page. Thats just extra work for the browser and can result in a bad user experience; the seconds wasted in a page reload could make or break a sale to a customer.

This is where a single page app comes in handy. If you only need to update a portion of your site with new information based on the user’s actions, you can do so without reloading the page, but instead just grabbing the data and adding it onto the page. Let’s start.

#javascript #webdev #web-development

How to Build a Dynamic Web Application using DOM and JavaScript
3.95 GEEK