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

Preface

Good tools make the Internet responsive and interactive and put its control in the hands of developers. The Knockout library is well-known because it is a pair of boxing gloves that work well in the ring! What jQuery did for JavaScript years ago, Knockout is doing for smart data management with the browser elements. With this library, you will find another way to enjoy building web technology, while building sites that end users will enjoy just as much. If you know the basics of JavaScript and HTML, this book will soon make you a champion.

What this book covers

Chapter 1, Getting Started with KnockoutJS, teaches you what Knockout is and why it is different. This chapter gets you coding and opens the door to a simpler and more powerful way of building web pages.

Chapter 2, Using Arrays, Nesting, and Grids, continues opening your mind to less code with more power. There is special coverage on dynamic sorting of data collections that will put power coding in the hands of newer developers.

Chapter 3, Giving Forms the Knockout Touch, demonstrates the use of Knockout to make our web forms easier and fun to build. This covers both simple and grid-based forms.

Chapter 4, Coding – AJAX, Binding Properties, Mapping, and Utilities, proves that Knockout is not just a stand-alone solution. It is a technology that connects and simplifies our interaction, and it has a number of awesome plugins that will make you eager to use it in your projects.

Chapter 5, The Joy of Templates, covers native templates, enhanced collection handling, render events, third-party templates, and a few more template options.

Chapter 6, Packaged Elegance, takes you into the future of web development. This chapter covers present-day use of custom components in all popular browsers. We will use this opportunity to cover another way of building a simplified and powerful SPA, single-page applications, and solutions.

What you need for this book

First, you will need a computer with a web server. The examples will run on any common server, so a special server-side language is not required. You will need a text editor, and if you want to use the exercise files, you will need to be able to decompress a ZIP file. There is a built-in provision for this in most modern computers. Finally, you will need a browser to view your work.

Who this book is for

This book is for web developers or web designers who work with HTML and wants to gain knowledge while making things simple. This will show you how to automate, with some simple markup, the interaction between your data and the visual side of the browser. If you are looking to get the best experience with cleaner and more sustainable code, this book will serve you well.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and explanations of their meanings.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "We will need to use the push method of our bound array collection to add this."

A block of code is set as follows:

<button data-bind="click: sort('name')">Sort By Name</button>
<button data-bind="click: sort('item')">Sort By Item</button>

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

this.orderVM = new ko.simpleGrid.viewModel({
data: this.orders,
columns: [
{ headerText: "Customer", rowText: "name"},
{ headerText: "Item", rowText: "item"},
{ headerText: "Count", rowText: "qty"}
],
pageSize: 3
});

Any command-line input or output is written as follows:

> pagedOrderModel.orders()

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Click on the Add Staff button."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail , and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at , and we will do our best to address the problem.

lock icon The rest of the chapter is locked
You have been reading a chapter from
KnockoutJS Web Development
Published in: Feb 2015 Publisher: ISBN-13: 9781782161028
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}