TypeScript allows us to define complex types via interfaces. Interfaces play a very important role in complex scenarios. for example when objects contain other properties. In regular form, defining an interface is a little bit like the C# syntax and implementing an interface members by a class is in the below form:


  1. interface IBaseInterface {
  2.     GetSomthing();
  3. }
  5. class BaseClass implements IBaseInterface {
  7.     GetSomthing() {
  8.     }

backbonJS is based on MV* patterns and designed for developing single page applications. It provides some basic and essential functionalities like attributes, events and validations for models. A model of backboneJS encapsulates model data that is further available for an application to interact with the user interface.

"Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling

A JavaScript framework (Not a library) based on MVV pattern created by Google which makes the code readable, organized and extensible.  You know in large application developments specially in SPAs which has been on top during the last few years, managing and developing JavaScript in client side is so hard. AngularJS provides some powerful features for developers like  Expressions, Directives, Data Binding, Filters, Partial Views, Modules, Dependency Injection, Routes, Controllers, Scope, Services… and makes the JavaScript development more easier and powerful.


If you have worked with asp.net MVC routing, you will find out that there are lots of similarities with asp.net web API and actually Web API uses the MVC standards on routing. There is only one difference and that's about using HTTP method in web API instead of URL path in MVC. In other word, Web API does not specify an action route parameter, bur it by default maps incoming requests to the appropriate action based upon the HTTP verb of the request.

Take a look at the following sample: 

  1. [HttpPut]
  2. public HttpResponseMessage Order

One of the key concept of every programming language is the Scope. In JavaScript, variable and function scoping is a little bit different and so cool! you can have multiple var (variable) in a function, All of them run well if you declare at the top of the function. (althought you wont get any kind of error if you declare at the end of the function) For example:

  1. console.log(variable);    // undefined
  2. Var variable="something";

Now, notice about the following code:

  1. var x = "something ";

You know there are lots of advantages behind the Single page applications, but just like other technologies it has some lacks in some cases. I just talk about disadvantages of SPAs in this post:


It makes the page content heavy and large: just image a single page apps which handles lots of feature in a page, needless to say it would be large and maybe in some cases it could cause page load slow.

It makes a kind code Duplications: yo

Although I've decided to write a blog post about the key points of this book after finishing it But before that I want to tell you how I enjoy by reading this book in the way of coming back to home in taxi from my work place!

As every developer should know something about web site optimization, this book shares some good experiences on building fast asp.net web applications. there are dozens of techniques you can apply immediately to make your sites and applications faster.


Table of Contents

JavaScript, by default does not come with built-in namespace or class but as it's extremely a flexible language you can create namespace in JavaScript by object literals. Based on wikipedia definition "literal is a notation for representing a fixed value in source code."  you can simply create Object literal by using: 

  1. A colon which separates the property name from