Patterns - Ed's Blog
in

dotnet.org.za

South African .NET Developer Portal

Ed's Blog

Object reference not set to an instance of an object

Browse by Tags

All Tags » Patterns (RSS)
  • Inversion of Control using context

    Inversion of Control (IoC) is a pattern to seperate out funcionality from objects to allow these objects to be more focussed as well as to make the functionality replaceable with new implementations. This pattern has become quite the rage in the Java and community and is making it way over to .NET as well. To find some background on the whole thing, check out this article by Martin Fowler. Several frameworks have been created to take care of IoC for you, like Spring and PicoContainer , both of which...
    Posted Feb 08 2005, 11:49 AM by eduard with | with 1 comment(s)
    Filed under:
  • New Pattern community

    Microsoft has started a new wiki on patterns. Hope this is a sign of more good things to come from them in this space. Check it out here . Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
    Posted Feb 02 2005, 07:58 AM by eduard with | with 1 comment(s)
    Filed under:
  • Singleton Pattern in C#

    I found this article on how to implement singletons in C#, it pretty cool because it cover thread safety as well. Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
    Posted Jan 27 2005, 07:54 AM by eduard with | with no comments
    Filed under:
  • Comparison of IoC implementations

    I found this article that compares HiveMind, PicoContainer and Spring as Inversion of Control frameworks. If you don't know what IoC is, you can check out the definitive article by Martin Fowler here . Although these frameworks are for java, it is pleasing to note that both Spring and PicoContainer has .NET ports. Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
    Posted Nov 23 2004, 08:41 AM by eduard with | with no comments
    Filed under:
  • Object service lookup using the Spring.NET framework

    In a recent post I was wondering how one can do a lookup for the current implementation of an object service. Armand pointed me to the Spring.NET framework (a port of the Java Spring framework). Following here is a quick example of how I used it. (The framework can do a lot more than what I show here - it has a complete dependancy injection/container framework for example) First thing is to download and extract the zip file, compile the source and reference the Core and Context namespaces in your...
    Posted Nov 12 2004, 02:33 PM by eduard with | with 1 comment(s)
    Filed under: ,
  • Object Service lookup in .NET, any ideas ?

    So here is my problem. Let's say you're writing an App and you want to offer “services” to your objects, for example a services that is going to log anything you want to a file (for debugging etc.). I want to offer this service transparently from the implementation. This would allow me to replace the logging framework without affecting the calling/client objects. So obviously I'd create an interface that is used by all my objects and “wrap“ the actual logging code in an object...
    Posted Nov 08 2004, 08:45 AM by eduard with | with 8 comment(s)
    Filed under:
  • Martin Fowler planning new book

    Martin Fowler has announced that he has started capturing new patterns for a follow-up book to Patterns of Enterprise Application Architecture . I read this book as well and I think it's brilliant a reference to sound architectural practice. You can read some of the content that the new book will contain here . Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
    Posted Aug 06 2004, 01:59 PM by eduard with | with no comments
    Filed under: ,
  • Plug-in architecture and dependancy injection

    Martin Fowler wrote an article on dependancy injection ( http://www.martinfowler.com/articles/injection.html ). It's very good in explaining what it's about and the various implementation options. Definitely recommended reading if you are a patterns fan. Recently Daniel Cazzulino wrote about implementing the pattern in .NET. It seems we've got a lightweight component infrastructure built into the .NET framework (very cool). The article is a bit heavy........ okay, let's not kid ourselfs, it's very...
    Posted Jul 22 2004, 09:16 AM by eduard with | with 1 comment(s)
    Filed under:
  • Anti-patterns

    I must say I found this very good reading. The “article“ lists various anti-patterns and explains how they (don't) work. Also good for a laugh. http://www.theserverside.net/news/thread.tss?thread_id=27414 I must also shamefully admit that I'm guilty of “Pattern oriented architecture”. Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
    Posted Jul 20 2004, 11:55 AM by eduard with | with 1 comment(s)
    Filed under:
  • Singleton pattern for ASP.NET

    (I previously posted this on sadeveloper.net, but since I now have my own blog, I thought I'd stick it here as well.) To implement the singleton pattern (GoF) in ASP.NET you need to put in a bit of a twist if you want to have once instance of an object per web request. The twist I'm talking about has to do with the scope of static variables in ASP.NET. basically a static variable is visible to the whole of a process. Because of the ASP.NET process model, all client requests share the same process...
    Posted Jul 07 2004, 07:39 AM by eduard with | with 8 comment(s)
    Filed under:
  • Cool site on GoF patterns

    I came across this site with explanations and C# example code of the GoF patterns. Pretty nice. Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
    Posted Jul 06 2004, 12:20 PM by eduard with | with no comments
    Filed under:
Powered by Community Server (Commercial Edition), by Telligent Systems