All about Multithread Programming (Concept, Issues and Synchronization)

By , June 30, 2011

Multithreading ensures that the program never “goes to sleep” by keeping UI more responsive to the user. In my blog I covered numbers of articles on multithreading programming, issues with multithreaded programming and the synchronization technique to handle these issues. I found it is worth to consolidate these all information at one place. Hopefully this will help visitor to quickly refer the topic.


What is Multithreading?


Article: Multithreading Read more »

Issues with Multithreaded Programming: Part 3

By , June 23, 2011

In my previous articles “Issues with Multithreaded Programming: Part 1” and “Issues with Multithreaded Programming: Part 2” I have explained about four issues of Multithreading programming 1) Race Condition 2) DeadLock 3) LiveLock and 4) Priority Inversion. Continuing to my previous articles, in this article I have explained about following issues:

Issues with Multithreaded Programming: Part 2

By , June 22, 2011

In my previous article Issues with Multithreaded Programming : Part 1 I have explained about two most common issues of Multithreading programming 1) Race Condition and 2) DeadLock. Continuing to my previous article, in this article I have explained about following issues:

Issues with Multithreaded Programming: Part 1

By , June 21, 2011

Multithreaded (Parallel) programming is difficult for many reasons. Developer always has to put extra care to protect the program from issues like race condition, deadlocks, livelocks, priority inversions, two-step dances, and lock convoys. My personal experience says these all issues are tough to identify and then resolve.

It is always better to have understanding on these issues before writing multithreaded application. In this article I have covered the quick overview of following issues associated with multithreaded programming:

Lambda Expressions supersede Anonymous Methods

By , June 20, 2011

Lambda expressions introduced in the C# 3.0. Lambda expressions help reducing the burden of writing Anonymous Methods. Before Anonymous Methods there was only way to declare the delegate was to use named method. Microsoft has put continues effort to reach to Lambda expressions:

–      Before C# 2.0, named methods was the only option to declare the delegate

–      C# 2.0 introduced the Anonymous methods.

–      C# 3.0 and later, lambda expressions supersede anonymous methods as the preferred way to write inline code. There is only one case in which an anonymous method provides functionality not found in lambda expressions. Anonymous methods enable you to omit the parameter list. This means that an anonymous method can be converted to delegates with a variety of signatures. This is not possible with lambda expressions. Read more »

Create Database from Entity Model – Entity Framework Model First Approach

By , June 14, 2011

In my last article LINQ to SQL Vs Entity Framework I discussed about how powerful the ADO.Net Entity Framework compare to LINQ2SQL. In this article I will discuss about how to create Database from Entity Model (Entity Framework) using Model First approach.


Model First Approach

While designing Database for a project, we normally first finalize the models (entities and the relationships) and then create the physical database in the database server. Entity Framework allows us to follow the same approach where we can create entities, build the relationship between entities, finalize the design of database and could also start coding using entities even if physically database is not exist. Once we are done with database modeling, we can create physical database from Model. This is all about the Model first approach where you have created your model before the database and creating the database from Model. Read more »

LINQ to SQL Vs Entity Framework

By , June 8, 2011

LINQ to SQL and Entity Framework both are designed for ORM (Object Relational Model) support. They are developed to avoid the difficulties involved in writing Object Oriented code to perform RDMS operations. The OOP and RDMS are conceptually very different. The question arises when to use LINQ2SQL and when to use Entity Framework. What is the different between LINQ to SQL and Entity Framework.


LINQ to SQL Vs Entity Framework

LINQ to SQL and the Entity Framework have a lot in common, but each has features targeting different scenarios. While speaking about similarities or differences, I understand that ADO.NET Entity Framework’s LINQ to Entities can be considered as superset of LINQ to SQL and that, ADO.NET Entity Framework is much more than LINQ to Entities. Read more »

Hyperlink in ListBox

By , June 3, 2011

Today, one of my friends was asking me a question about how to add hyperlink text into the ListBox. I replied by adding respective control directly to the ListBox. Here in reply to my friend question, I am describing the steps:


How to add Hyperlink in ListBox

Every Control in has a property called “Contorls” to add any control within it. I used the same to add LinkLable (Hyperlink text) to add into ListBox.

I have created one simple Windows Form application called “HyperLinkInListBox”. Added one windows form called “frmHyperLinkInListBox” and the following controls within the form:

  1. One ListBox control named “lstName” : this will display all the Names and will have hyperlink associated with it.
  2. One Label control “lblURL” : This will the URL associated with Name. So that when user will click on any Name in the ListBox, the respective URL will display here. Read more »

Why Distributed Caching

By , June 2, 2011

One of the key techniques used to develop high-performance and scalable application is Distributed Caching.

In this article I will cover:

-          What is Distributed Caching and

-          What is the need of Distributed Caching


What is Disctributed Caching

Caching is a well-known concept; it is a technique to store the data in-memory so that application is not required to fire a query over the network to communicate with database or service. Communicating over the network always add lots of additional overheads (parsing, validating etc.) – ultimately increase the overall processing time for the request. When using caching, the data is always available in ready to use format within the memory, so that the overhead of network response time and processing time for the request can be reduced – ultimately increase the performance.


Read more »