30/05/2012
27/05/2012
08/05/2012
NuGet Package: Facebook helper in MVC Razor
CodeProject
The era of global connectivity has begun. Social networking being the first step in this process, most of the latest technologies are coming up with different kinds of support for social network sites.
One of the famous of such social networks is Facebook.
Recognized this button. Yes, in this post we will see how to implement this kind of functionality in your MVC Razor application with a single line of code.
The era of global connectivity has begun. Social networking being the first step in this process, most of the latest technologies are coming up with different kinds of support for social network sites.
One of the famous of such social networks is Facebook.
Recognized this button. Yes, in this post we will see how to implement this kind of functionality in your MVC Razor application with a single line of code.
29/04/2012
Entity Framework: Adding DataTable with no Primary Key to Entity Model.
Exception: The table/view '[TableName]' does not have a primary key defined and no valid primary key could be inferred. This table/view has been excluded. To use the entity, you will need to review your schema, add the correct keys, and uncomment it.
09/04/2012
Delegates & Events
CodeProject
In this post, we will go back to basics of C# concepts. From the time when i am new to .Net development till today, one of the first five C# questions is
" What is a Delegate? What is an Event? What are the Differences? "
Lets see this with a practical implementation.
In this post, we will go back to basics of C# concepts. From the time when i am new to .Net development till today, one of the first five C# questions is
Lets see this with a practical implementation.
06/04/2012
$.post and $.get in MVC Razor & JQuery
CodeProject
In this post we will see when to use and How to use ajax calls in MVC Razor using JQuery.
When i am trying to create a POC for combination of entity framework and a MVC Application, i came across this requirement which made me to use $.post() and $.get().
Now, people very easily say, $.post() for posting data and $.get() for getting data using ajax call. Great!
But its not that simple as saying it. We need to decide what has to be used in combination of these ajax calls.
In this post we will see when to use and How to use ajax calls in MVC Razor using JQuery.
When i am trying to create a POC for combination of entity framework and a MVC Application, i came across this requirement which made me to use $.post() and $.get().
Now, people very easily say, $.post() for posting data and $.get() for getting data using ajax call. Great!
But its not that simple as saying it. We need to decide what has to be used in combination of these ajax calls.
18/03/2012
Custom Filters in MVC - Authorization , Action, Result, Exception Filters.
CodeProject
Filters in MVC are attributes which you can apply to a controller action or an entire controller. This will allow us to add pre and post behavior to controller action methods.
There are 4 types of Filters. Which were described in above image.
Objective: Learn about filters and create custom filters for better understanding.
Filters in MVC are attributes which you can apply to a controller action or an entire controller. This will allow us to add pre and post behavior to controller action methods.
There are 4 types of Filters. Which were described in above image.
Objective: Learn about filters and create custom filters for better understanding.
23/02/2012
Structural Pattern : Decorator Pattern Demo
CodeProject
Decorator Pattern can be defined best by below Image.
Before going into details lets go through the text book definitions and UML diagrams first.
Definition:
Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to sub-classing for extending functionality.
Decorator Pattern can be defined best by below Image.
Before going into details lets go through the text book definitions and UML diagrams first.
Definition:
Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to sub-classing for extending functionality.
21/01/2012
Unit Test Case writing for a MVC Project
In this post we will learn how to write Unit Test Cases for a MVC project.
One strong reason behind choosing MVC approach is TDD (Test Driven Development).
If we say my Data layer / Business Layer is 100% tested,it should pass all the positive scenarios and fail in all negative scenarios.
In order to do that, we need to write test cases for all the public methods present in different layers of our application and test them thoroughly.
I have created a very simple POC for demonstrating on how to write test cases.
One strong reason behind choosing MVC approach is TDD (Test Driven Development).
If we say my Data layer / Business Layer is 100% tested,it should pass all the positive scenarios and fail in all negative scenarios.
In order to do that, we need to write test cases for all the public methods present in different layers of our application and test them thoroughly.
I have created a very simple POC for demonstrating on how to write test cases.
16/01/2012
Behavioral Patterns - Observer Pattern
Lets not follow the text book definition of Observer Pattern.
Start with OO Principles.
OO Principle says, "Strive for loosely coupled design between objects that Interact".
Loose coupling brings the flexibility and resilience in system.
Lets take Facebook notifications as an example.
When there is any changes in my profile or wall , it will be automatically notified to my friends.
In this case, i am the subject and My friends are Observers. My friends list may vary. People may be added or removed from the list. But the system should be flexible enough to communicate the information despite of the change in observers list.
Start with OO Principles.
OO Principle says, "Strive for loosely coupled design between objects that Interact".
Loose coupling brings the flexibility and resilience in system.
Lets take Facebook notifications as an example.
When there is any changes in my profile or wall , it will be automatically notified to my friends.
In this case, i am the subject and My friends are Observers. My friends list may vary. People may be added or removed from the list. But the system should be flexible enough to communicate the information despite of the change in observers list.
Subscribe to:
Posts (Atom)




