Over the next several posts, I am planning on diving into the Document Object Model (DOM). Before we do that, however, I wanted to spend a post discussing why it is important to understand and utilize the DOM. First…what is the DOM? A quick, thirty-thousand foot fly by definition is basically the structure of an HTML document. Think of it like a tree. each element is a node on that tree. For example, the body tag…that is a node. Imagine you have a wrapper div inside of that. That wrapper div is also a node. In fact, it is a child node of the body tag, which is its parent node.
We can tap into the DOM with our JavaScript code, which allows us to manipulate the DOM to suit the needs of our program. Why would we want to do that. Besides the coolness factor, it is to provide a better experience for our end user.
The term user interface (UI) has been around a while and speaks to the way a program is laid out and works from the end user perspective. Some time ago, the term user experience (UX) came into vogue. While the term UI is still utilized, the term UX speaks to a deeper level of user interactivity. As developers we want to have our end user have more than a nice time utilizing our program. We would like them to have an experience. Dare I say, a ‘movie-like’ experience?
Now I say that we would like them to have a nice experience, but I would go so far as to say that it is a need. Why? It will directly affect the bottom-line. Allow me to share some statistics I gleaned from a white paper I read through recently. I will not bore you with the entire nitty gritty details of the white paper, but simple share some highlights I thought were interesting…
- More customers will be willing to purchase. On average, companies that provide a superior experience have 14.4% more customers who are willing to consider them for another purchase than companies in the same industry that offer a poor customer experience.
- More customers will resist doing business with competitors. Compared with companies that offer a poor experience, companies that offer the best experience in their industries have 15.8% fewer customers who are likely to consider doing business with a competitor.
- More customers will recommend you. Companies with the highest experience scores have 16.6% more customers who are likely to recommend their products or services compared with their lowest-scoring competitors.
So, keep these things in mind as you work through building your program. Developers tend to get lost in the weeds and do things in programs that perplex end users. Keeping the end user in mind helps prevent that.
Happy Coding!
Clay Hess