Saturday, May 12, 2012

  KnockOutjs.js


Microsoft just a created a new MVVM Architecture in client side.This is knockout


      This is the project that comes under the MIT License, that has a community not governed by Microsoft
Let us take an overview of knockoutjs.js


Since it is a JavaScript library, you just have to download its file from the knockoutjs and include it in your webpage as simple script tag.

<script src='<YOUR SCRIPT LIBRARY>/knockoutjs.js'></script>.......that's it.

Now you are ready to use the power of the knockout as and when you want to.

Some of the key features of the knockoutjs is that:

  1. It is Rich in Client Side Interactivity.
  2. It fully supports bindings between the data and objects as well as with controls.
  3. Wide support to almost every browser from IE 6+,FF2+,Opera,Chrome and bla bla.....
Now let us take a normal example of ko(Knockoutjs,js)

<!-- This is a *view* - HTML markup that defines the appearance of your UI -->

<p>First name: <strong data-bind="text: firstName"></strong></p>
<p>Last name: <strong data-bind="text: lastName"></strong></p>

<p>First name: <input data-bind="value: firstName" /></p>
<p>Last name: <input data-bind="value: lastName" /></p>
.
.
.
.

// This is a simple *viewmodel* - JavaScript that defines the data and behavior of your UI
function AppViewModel() {
    this.firstName = "Knock";
    this.lastName = "Out");
}

// Activates knockout.js
ko.applyBindings(new AppViewModel());

Thursday, May 10, 2012

Automatic Log Off Using JQuery


Plugin : Idle Plugin

This is one of the great plugin used for Automatic Logging Off the Account when the user sits idle for a couple of minutes.

Will Provide you the example very soon.........