Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
KnockoutJS Web Development

You're reading from  KnockoutJS Web Development

Product type Book
Published in Feb 2015
Publisher
ISBN-13 9781782161028
Pages 178 pages
Edition 1st Edition
Languages

Native templates


Templates are patterns for how we merge data and the stuff the data fits into. The most popular form of templates on computers in the early days was something we called a mail merge. Programs like Microsoft Word would use a mail merge document and a data file, and merge them together. The original purpose was for printing.

Over the time, we shifted to using this same type of technology to do web pages. When a user would go to a website and request a web page, the servers started getting smarter. The data was mixed into a template and the merged result was returned to the browser as HTML. This was an amazing game changer for shopping sites and other sites where the basic page was the same. This is why we call these pieces of code templates.

One way to look at this is to think about when people decorate houses. We have things we call stencils. While the stencil defines how the shape of the result will look, it does not control what color you paint something with. If you have...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}