O'Reilly logo

Microsoft® ASP.NET and AJAX: Architecting Web Applications by Dino Esposito

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The HTML Message Pattern

The BST pattern forces you to generate any HTML you need in the browser using the JavaScript language. In general, this is a good thing because it allows you to isolate all (or, at least, most) of the presentation logic in the one tier. In addition, by using templates and JavaScript callbacks you can keep up with the inherently dynamic nature of HTML and manage to accommodate characteristics of the data and the user’s expectations.

Templates help you a lot in wedding code flexibility with ease of maintenance. A general-purpose class such as the HtmlListBuilder presented here completes the offering and closes the circle. You can’t reasonably rely on plain JavaScript statements to generate HTML and mix generation with sprinkles ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required