As informações desta página não estão completamente disponíveis no seu idioma de escolha. Esperamos disponibiliza-las integralmente em outros idiomas em breve. Para ter acesso às informações no idioma de sua preferência, faça o download do PDF aqui.


Segregated DOM plus node for JS Testing

This blip is not on the current edition of the Radar. If it was on one of the last few editions it is likely that it is still relevant. If the blip is older it might no longer be relevant and our assessment might be different today. Unfortunately, we simply don't have the bandwidth to continuously review blips from previous editions of the RadarUnderstand more
Published: Jan 28, 2014
Last Updated: Jul 08, 2014
Jul 2014
As client-side JavaScript applications grow in sophistication, we see an increased need for engineering sophistication to match. A common architectural flaw is unfettered access to the DOM from across the codebase - mixing DOM manipulation with application logic and AJAX calls. This makes the code difficult to understand and extend. Thinking about separation of concerns is a useful antidote, aggressively restricting all DOM access (usually jQuery usage) to a thin 'segregation layer'. One pleasant side-effect of this approach is that everything outside of the segregated DOM layer can be tested rapidly in isolation from the browser using a lean JavaScript engine such as node.js.
Jan 2014