Book Image

Mastering ArcGIS Server Development with JavaScript

By : Raymond Kenneth Doman
Book Image

Mastering ArcGIS Server Development with JavaScript

By: Raymond Kenneth Doman

Overview of this book

Table of Contents (18 chapters)
Mastering ArcGIS Server Development with JavaScript
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

An overview of Knockout.js


Another JavaScript library that can be used to create an interactive single page application is Knockout.js. Knockout was developed by Steve Sanderson of Microsoft, though it's not considered a Microsoft product. It's based on Windows Presentation Framework in that it uses the Model-View-ViewModel (MVVM) architecture and allows two-way binding on observed properties. Two-way binding means that data isn't just written to an HTML element, but it can also be updated, like a text input field in a form, and the data will be already reflected in the application.

Knockout and MVVM

The MVVM is similar in nature to MVC architecture. Both use a model to get to the data, and a View to show the data. However, instead of an active controller directing the model and views, the ViewModel sits under the UI layer and exposes functions and data from the model to the View. The ViewModel typically knows nothing about the View it's working with. It simply stores and provides information...