PreCon: Designing Reusable Class Libraries Slides posted

As promised,  the good folks at MSDN have posted our precon slides.   Please take a look.  Remember that plagiarism is the highest form of flattery [:D]  I’d be honored if you used these slides to push good design practices at your company…

I’d love to hear your success stories (or otherwise [:)]).  


Oh, and if you didn’t fill out an eval for the precon, there is still time, love to have your feedback there as well.



Comments (8)

  1. LordHits says:

    Thanks for posting these slides. I’m hoping MS posts the slides from all the tracks of PDC05 soon for those that can’t make it there.

    Can’t wait for the Framework book to arrive. Still on pre-order state at amazon. 🙁

  2. LordHits says:

    Regarding my previous comment, I just found all the ppt slide decks for PDC05 here:


  3. Mikewo says:

    I attended the precon session and really enjoyed it. I think all the prep work you and Krysztof did paid off. I also appreciate the openess of you and Krysztof for questions during and after the session.

    I’ve been pushing the design guidelines at my current client to some success.

    The book has been put in queue on my nightstand and I’m looking forward to reading it.

  4. Joe says:

    I agree with Developer about ArgumentNullException. Since all public methods should check arguments for null, this exception is used very frequently. In an international application, it would be a pain to have to provide a localized message each time.

  5. BradA says:

    Thanks for chiming in Joe… And you are right, the developer here makes a good, valid argument. My point is not that we should not provide some sort of short cut for the common case, just that we should ALSO support the common pattern. For example could we have a constructor that took some sort of resource id as the first argument rather than a string so it doesn’t conflict with the pattern?

  6. Joe says:

    Brad, I guess the real point to make is that all design is trade-off, and it’s not always easy to get agreement on which is the ‘best’ design. I don’t think it’s possible to also support the common pattern – there can only be one constructor with a single string argument, and a resource id argument is really a different pattern.

    ArgumentNullException is used mostly by class library developers (usually after running FxCop!) who can be expected to get it right. And Intellisense mitigates the risk of getting the meaning of the argument wrong. In any case I’m glad I am writing ‘throw new ArgumentNullException("myArg");’ and not ‘throw new ArgumentNullException(String.Format(CultureInfo.CurrentCulture, Resources.ResourceManager.GetString("NullArgument"), "myArgument");’

    Great presentation in any case – in fact it’s enhanced by emphasising that finding good designs isn’t always easy.

  7. The intention "Make the simple things simple and the hard things possible" of the Designing Reusable

  8. says: