My Motto
1. Think Global, Act Local
2. Back your design with code
3. Integration, Integration, Integration, Integration, Seamless Integration
If you are reading this, you probably came here from google, msn or yahoo. I would be very surprised if you get here from clusty, gigablast or icerocket. How about MrSapo or TurboScout? These are some of my favorite Search Engine links. Thanks for stopping by.
Tech News
Future is my present
Friday, October 30, 2009
Saturday, September 12, 2009
Thursday, July 09, 2009
Monday, July 06, 2009
Sunday, June 21, 2009
Wednesday, March 04, 2009
Tuesday, February 24, 2009
Friday, February 13, 2009
Sunday, January 25, 2009
CodeProject: Scalable Session-State Storage for ASP.NET Server Farms. Free source code and programming help
Wednesday, January 21, 2009
Saturday, January 10, 2009
CodeProject: 99.99% available ASP.NET and SQL Server SaaS Production Architecture . Free source code and programming help
Wednesday, September 17, 2008
Monday, September 15, 2008
Thursday, September 11, 2008
IoC and DI 101
I was recently tasked with learning PRISM… The next few post will document my learning experience! PLEASE NOTE: I have no experience with previous technologies like CAB… This is truly my idiots opinion about what I have learned trying out PRISM!
I have identified some key “things” I MUST know in order to use PRISM (This list might change in the future). As I learn more about each one of these… I will post about it! The first item on my list is Unity!
“The Unity Application Block (Unity) is a lightweight extensible dependency injection container with support for constructor, property, and method call injection.”
If you want to learn more about dependency injection and IoC, here are some resources that helped me:
IoC and Unity - The Basics and Interception
IMHO… Their are 2 key things that unity provide that I should know. Lets look at the following interface
public interface ILogger
{
void LogSomething();
}And lets create a concrete class implementing this interface
public class ConsoleLogger : ILogger
{
public void LogSomething()
{
Console.WriteLine("ConsoleLogger.LogSomething()");
}
}This now makes it very simple for me to in the future create a different logger (ie. SqlLogger, TraceLogger, etc) and swap them at my will!
ILogger logger = new ConsoleLogger();
The only problem with the code above is that I am now tightly coupled to the ConsoleLogger… I actually need to reference the namespace in which I created ConsoleLogger!
This is were the IoC/DI stuff helps! Lets create a container
IUnityContainer container = new UnityContainer();And then I can register types or instances with this container
container.RegisterType
ILogger logger = container.Resolve
The code that actually creates the instance of ILogger, doesn’t need any knowledge of the concrete class!!!
It is actually very simple to create a basic IoC container yourself, here are some examples
Understanding IoC Container - sfeldman.NET
Building an IoC container in 15 lines of code
Ken Egozi's IOC in 15 lines
OK, that is the first key “thing”… The next “thing” is the dependency injection… Lets build on our first example that has a logger! Now we also have a CustomerRepository that depends on the ILogger
public class CustomerRepository : ICustomerRepository
{
ILogger _logger;
public CustomerRepository(ILogger logger)
{
_logger = logger;
}
public void GetACustomer()
{
_logger.LogSomething();
}
}
How does unity help us out here? Well, how would this have been done without unit?
ICustomerRepository repository = new CustomerRepository(new ConsoleLogger);
Do you see the tightly coupled stuff? Not so good! Assuming we already have a unity container and a logger registered… here is the unity way
ICustomerRepository repository = container.Resolve
This only scratches the surfaces of what IoC/DI is capable of… Also remember that Unity is by no means the only one of its kind… here is a cool list of other containers!!!
And that concludes my first baby steps into the world of loosely coupled applications, Inversion of Control, Dependency Injection and much more…
[UPDATE] More Resources
.NET Hitman has a nice article about IoC & Unity
Andrey Shchekin has a nice 2 part post about comparing popular the IoC containers (Part 1 & Part 2)
Thanks Ruby
http://http://dotnet.org.za/rudi/archive/2008/09/05/learning-prism-05-09-2008.aspx
Wednesday, September 10, 2008
Tuesday, September 02, 2008
Saturday, August 30, 2008
Wednesday, August 27, 2008
Thursday, August 21, 2008
Wednesday, August 20, 2008
Sunday, August 17, 2008
Thursday, August 07, 2008
Abstract and Sealed Classes and Class Members (C# Programming Guide)
Abstract and Sealed Classes and Class Members (C# Programming Guide): "If a virtual method is declared abstract, it is still virtual to any class inheriting from the abstract class. A class inheriting an abstract method cannot access the original implementation of the method—in the previous example, DoWork on class F cannot call DoWork on class D. In this way, an abstract class can force derived classes to provide new method implementations for virtual methods."
class member, method, field, property, or event, on a derived class that is overriding a virtual member of the base class can declare that member as sealed. This negates the virtual aspect of the member for any further derived class. This is accomplished by putting the sealed keyword before the override keyword in the class member declaration. For example:
C# Copy Codepublic class D : C
{
public sealed override void DoWork() { }
}
|
Microsoft Search change dhtml to whatever you want to search for
MSDN Mag- Search by Author, tech. index, word
CodeHound - The Software Developer's Search Engine
igrep - The Software Developer's Search Engine
CodeCrawler Nice asp.net , C# Java Articles and Search
VS 2005 bugs, feedback
ASP>NET Search Engine and Snippets
dotnet247 Search Engine
KBAlertz
Microsoft Support: Advanced Search KB by HOWTO, by days, by MSDN Articles- Neat
Microsoft FAQ by technology
WORLD OF DOTNET
Google BlogSearch
Coined the Words:
Inforder -- Information Hoarder
GLink -- Gem Link
Links
IT , Active Directory
AJAX
Architecture
ADO.NET
ASP.NET
Articles
ASP.NET 2.0
BizTalk 2004 , 2006
C# 2.0
.NET Code Code
.NET COMMON CODE PROBLEMS
Computer Science Journals
Computational Complexity
CONFERENCES
DESIGN PATTERNS
CSS DHTML HTML XHTML
Documentum
DOT NET DEBUGGING
DOTNET TOOLS
DOT NET RESOURCES
DOT NET 2.0 RESOURCES
FORUMS Groups
GROUPS
HTML DHTML
IIS
JavaScript
JAVA
LINQ DLINQ XLINQ
Magazines
Microsoft Watch
MicroStrategy
Online LookUps / Search
Oracle
Open Source Projects
PMP PMI
Refactoring
RSS ATOM
.NET Security
SOA
SQl Server 2005
TDD SCRUM
Semantic Web
TDD SCRUM
Visual Basic
VB.NET 2003
VB.NET 2005
DESIGN: Web Design Resources
ONLINE TUTORIALS: WEB Development HTML DHTML HTC
WEB Development IE 7 Links
NETWORKING
VSTO 2005 OFFICE WORD EXCEL POWERPOINT VISIO
WSE 3.0, Web Services, WS_I , WS_*
-->WINDOWS
WWF
XML
XQUERY 1.0
Business
Crystallography - My passion
CHEMISTRY
ENVIRONMENT
FUN GAMES
FreeWare
Free Online Books
GADGETS
GARDENING
GEOGRAPHY
HEALTH
Online Image
MUSIC
Movies
PHYSICS
Stock Market
SCIENCE
USA
Previous Posts
- Azure Design Patterns
- Learning resources for C# 4.0 and .NET 4.0 new fea...
- F# in C# world!!
- Silverlight 3.0
- My F# Notes : Introducing F# - Four part webcast s...
- Next generation of languages
- Web Dev .NET: Mini jQuery Lab
- How To: Scale .NET Applications scaling web servic...
- Internet Information Services: Scaling ASP.NET App...
- Silverlight Spy : First Floor Software
Archives
|
|
DISCLAIMER: This is my personal web site and statements on this site do not represent the views of anyone other than myself. I offer no guarentee of the accuracy of anything stated here. My blog contains links to external sites, which I am not responsible for.And BTW, if you ask me nicely or mention me , I might let you use my words Inforder and GLink
This is a paragraph of text that could go in the sidebar. IS it going there?
