Combine JavaScript and a Template Engine for Flexible Web Apps
Template engines (TEs) can be very useful in web development scenarios where you need to generate and format text automatically according to specific processing rules. Basically, a TE takes a data model, applies a given template, and produces the result document. These engines can also help you build your applications based on the Model-View-Controller (MVC) pattern, making them more robust and maintainable than applications based on spaghetti code. Most programming languages provide built-in or third-party TEs.
Merging a TE and JavaScript will enable you to build very flexible web applications. Using them together also helps keep the presentation logic separated from the model. So, for example, you could use several templateswhich you might load using Ajaxto present the same data through different layouts.
In his Web Developer's Virtual Library (WDVL) article, Alessandro Lacava shows you how to combine the power of a TE called TrimPath with one of the most used client-side programming languages, JavaScript. In the past, JavaScript was used just for form validation and other "trivial" tasks. However, since the emergence of Ajax, JavaScript has gained more and more popularity among web developers. The capability to make asynchronous calls to the server and update a web page without reloading it made JavaScript a language that no web developer could do without.
Read the full story at Web Developer's Virtual Library:
Combine JavaScript and a Template Engine for Flexible Web Apps



Solid state disks (SSDs) made a splash in consumer technology, and now the technology has its eyes on the enterprise storage market. Download this eBook to see what SSDs can do for your infrastructure and review the pros and cons of this potentially game-changing storage technology.
Discover how to start developing for the Android platform with this extensive guide, which provides a reference to the Android platform as well as a look at developing your first Android application. You'll explore the top 10 features for developers as well as learn design and development tips that go beyond the phone and target tablet development as well.