Angular.js for ASP.NET MVC Developers

Fiuuuuuuuu After a long time I am again thinking to write a series.This time most popular JS library i.e angular.js for MVC developers.
Being an ASP.NET developer, I didn't find many resources on the internet for angular.js with AS.NET MVC.In this First blog, I will Introduce the angular.js for ASP.NET MVC guys.

What is Angular.js?

AngularJS is a client-side MVW(W stands for whatever) or MV* framework written in JavaScript. It runs in a web browser and greatly helps us (developers) to write modern, single-page, AJAX-style
web applications.
We can angular.js is an opinionated framework or software which tells or suggest us how to solve a problem in an efficient manner.Although there can be many solutions to a problem but angular feature specifications tells to do them in an efficient manner.

 Why an ASP.NET MVC Developer should use it?

MVC developer has to write to much code on the client side as well.But why angular when we are already doing well with jQuery, knockout, kendoUi.
Following are the reasons why a developer should use Angular.js
  1. Two-way data binding at client side (Knockout can be used, for jQuery we will have to write too much code in comparison to angular)
  2. Declarative way to write code (knockout can be used as well) Fiddle
 <tr ng:repeat="item in invoice.items">
            <td><input type="text" ng:model="item.description"class="input-small"></td>           
            <td><input type="number" ng:model="item.qty" ng:required class="input-mini"></td>
            <td><input type="number" ng:model="item.cost" ng:required class="input-mini"></td>
            <td>{{item.qty * item.cost | currency}}</td>
                [<a href ng:click="removeItem($index)">X</a>]

  1. The Well managed way to write the code at client side
  2. Testing was the main concern for angular.js , We can do unit testing and end to end testing using  their KARMA tool which was specially designed for angular (known as testacular as well)
  3.  HTML Templating
  4. currency formatting
  5. pluralization
  6. reusable controls (By creating HTML Directives)
  7. RESTful API handling
  8. AJAX handling
  9. modularization
  10. dependency injection
                  Will elaborate each point in my coming blogs. :) :)

                  Leave a comment

                  JavaScript For C# Developer

                  This Presentation depicts JavaScript concept for Csharp developer.It helps to understand the concepts of JavaScript resembling/differentiate them with C# concepts.

                  It took one week to complete the fundamental concepts of angular.Js, but it took more than one month to understand the concepts of javascript and relate it to C#.

                  So here it is:

                  Posted in , | Leave a comment

                  Hack proof your applications from Session Hijacking


                  This article is the Part-6 of my series Hack Proof your and mvc applications. In this article, I will describe what exactly Session Hijacking (Man-in the-middle-attack) is and how a hacker exploits it and how we can prevent Session Hijacking attack in applications.


                  Posted in | Leave a comment

                  Hack proof your Javascript using javascript Obfuscation in ASP.NET applications


                  This article is the Part-5 Article of my series Hack Proof your and mvc applications.
                  In this article i will describe how to obfuscate your JavaScript code (Your written business logic in JavaScript or those  JavaScript libraries you don't want to expose to others) in application with visual studio.

                  Background :

                  You can read previous article of this series from below links :

                    1. Secure your ASP.NET applications from SQL Injection
                    2. Secure your ASP.NET applications from XSS Attack
                    3. Secure your ASP.NET applications from CSRF Attack
                    4. Secure your ASP.NET applications from Sensitive Data Exposure and Information Leakage

                    Posted in , , | 2 Comments

                    Application Initialization in IIS 7.5 and IIS 8

                    Why we need Application initialization ?

                    On first HTTP requests applications both web forms and mvc application requires initialization tasks and "warm up" tasks (Startup processing , generating contents) etc.

                    Application initialization proactively loads and initialize all the dependencies like database connection , compilation of code and loading of assemblies etc...

                    Benefits of Application initialization :

                    • its decreases the first response time by preloading the application
                    • Can set a static page to increase the user experience while application is initializing
                    • Provides overlapped process recycling 

                    Posted in , , , | 1 Comment
                    Powered by Blogger.

                    Swedish Greys - a WordPress theme from Nordic Themepark . Managed by Sarvesh Kushwaha .