Skip to main content

Posts

Showing posts from January, 2014

how knockout js communicate with rest services

how knockout js communicate with rest services window.pcx.global = {     baseUrl : "http://localhost:2000/ restservicesURL " ,     contentType : "application/json; charset=utf-8" ,     dataType : "json" } var setHeaderRequest = function (xhr, companyId) {     xhr.setRequestHeader( "CompanyID" , companyId); } var ajaxAsynch = function (url, data, CallType, callback) {     var global = window.pcx.global;         $.ajax({             url: global.baseUrl + url,             cache: false ,             beforeSend: function (xhr) {                 setHeaderRequest(xhr, "1");             },             type: CallType,             contentType: global.contentType,             data: JSON.stringify(data),             dataType: global.dataType,             success: function (data) {                 if (data !== undefined && data !== null ) {                     //TODO: Sucess logic.

KnockoutJs Interview Questions and Answers

What Is KnockoutJs? Why We Use? Knockout is a pure JavaScript library and with the help of KnockoutJs we can create rich and responsive applications. In KnockoutJs, UI (DOM) is directly linked with data model. If data source of the data model is getting update any time, at the same time the UI (DOM) sections will also get updated automatically. KnockoutJs is a  MVVM  design pattern. The MVVM basically know as Model View ViewModel. By the help of  KO,  we can implement all functionality more simply manner and works with any server or client-side technology. Feature of KnockoutJs – ü   Dependency Tracking ü   In the dependency tracking, KnockoutJs automatically update the UI (DOM) when your data model is change. ü   Declarative Binding ü   In the declarative binding, your UI (DOM) is connected to your data model in a    simply manner using data-bind control. What Are the main features of  KnockoutJs ?