Archive for category .NET

IoC and Dependency Injection With “Unity Application Blocks”

Modern business applications consist of custom business objects and components that perform specific tasks or generic tasks within the application, in addition to components that individually address crosscutting concerns such as logging, authentication, authorization, caching, and exception handling.

The key to successfully building these types of applications is to achieve a decoupled or very loosely coupled design. Loosely coupled applications are more flexible and easier to maintain. They are also easier to test during development. You can mock up shims (lightweight mock implementations) of objects that have strong concrete dependencies, such as database connections, network connections, enterprise resource planning (ERP) connections, and rich user interface components.

Dependency injection is a prime technique for building loosely coupled applications. It provides ways to handle the dependencies between objects. For example, an object that processes customer information may depend on other objects that access the data store, validate the information, and check that the user is authorized to perform updates. Dependency injection techniques can ensure that the customer class correctly instantiates and populates all these objects, especially where the dependencies may be abstract.

Read More At MSDN

Post to Twitter Post to Plurk Post to Yahoo Buzz Post to Delicious Post to Digg Post to Facebook Post to MySpace Post to Ping.fm Post to Reddit Post to StumbleUpon

, ,

No Comments

Interesting Linq Problem

Check out the code below:

using System.Linq;
class Program
{
  static void Main()
  { 
      int[] data = { 1, 2, 3, 1, 2, 1 };
      foreach (var m in from m in data orderby m select m)
            System.Console.Write(m);
  }
}

Now, the question is:

frustration3  Is this code valid or not??

  If valid, how?

  If not valid, why?

(Source: Eric Lippert’s Blog)

Post to Twitter Post to Plurk Post to Yahoo Buzz Post to Delicious Post to Digg Post to Facebook Post to MySpace Post to Ping.fm Post to Reddit Post to StumbleUpon

,

2 Comments

DAIICT | ASP.NET MVC Session

Hey folks!

Today there was my session on ASP.NET MVC at DAIICT, Gandhinagar. And an amazing seminar it was for me.. ;)

It started with Vivek giving a brief introduction about me to the crowd.

Then we had a session on ASP.NET MVC where I bored the poor kids to death for 1 hour and 20 mins <Evil Grin>

Then cane a session on Windows Mobile by Kaushal.

To wrap it up, we had an HOL on windows mobile where we showed some nifty tricks that can be done on windows mobile.

The resources of my presentation can be found here: ( Presentation , Code Sample )

To run this sample you will need:

Keep watching this space for a detailed walk-through of the contact manager I made in the presentation.

You can see the gallery of the photos of this event here: ( Uploading Soon…)

Learning Resources:

•C#
–MSDN
–C# 3.0, A Beginner’s Guide   | Herbert Schildt   | TMH

ASP.NET Fundamentals
–MSDN
–ASP.NET, A Beginner’s Guide   | William Sanders   | TMH

•MVC
–Http:// asp.net/mvc
–Http://weblogs.asp.net/ScottGu
–Professional ASP.NET MVC 1.0   | Scott Guthrie et.al.   | Wrox
–Pro ASP.NET MVC Framework   | Steven Sanderson   | Apress

Post to Twitter Post to Plurk Post to Yahoo Buzz Post to Delicious Post to Digg Post to Facebook Post to MySpace Post to Ping.fm Post to Reddit Post to StumbleUpon

3 Comments

Get Adobe Flash playerPlugin by wpburn.com wordpress themes