When you are aware of the advantages of DOM immediately you start using it in your web pages. DOM is useful because it is a smart way to optimize your website in order you don’t have to waste time writing a lot of code or having problems with your XML files. The Document Object Model (DOM) is capable to manipulate the data model only in memory and not the representation as XML. The DOM works with the tags of your website modifying them, inserting, or removing them. When you are developing websites in Asynchronous JavaScript and XML (AJAX) will have the opportunity to create dynamic pages, more efficient and without having to code a lot.
If a system is continually changing, or if you want users to be able to extend
it, then the Dynamic Object Model architecture is often useful. The
alternative is to pick a simple programming language that is flexible and easy
to learn. In fact, a Dynamic Object Model is a kind of programming
language. Visual Basic could be thought of as based on a Dynamic Object
Model, though its internals are hidden and it is hard to be sure.
Systems based on Dynamic Object Models can be much smaller than
alternatives. One architect told me that his 50,000 line system had more
features than systems written without a dynamic object model that took over 3
million lines of code. I am working on replacing a system with several
millions lines of code with a system based on a dynamic object model that I
predict will require about 20,000 lines of code. This makes these systems
easier to change by experts, and (in theory) should make them easier to
understand and maintain