Geeks With Blogs
Madhawa Learns To Blog : C#, Java .net, c#, java,sql, OOAD and more mad memory dumps...

Last week I got some emails from colleagues regarding “C# Coding Standards”. Lance Hunt’s “C# Coding Standards for .NET” caught my eye and especially the part about Object Model Design.

  • Always prefer delegation over inheritance.
  • Avoid “Premature Generalization”. Create abstractions only when the intent is understood.
  • Do the simplest thing that works, then refactor as time permits.
  • Always make object-behavior transparent to API consumers.
  • Always separate presentation layer from business logic.
  • Always prefer interfaces over abstract classes.
  • Try to append the design-pattern name to class names where appropriate.
  • Make members virtual if they are designed and tested for extensibility.Consider using the sealed keyword to break the inheritance chain.
  • Refactor! Refactor! Refactor!
Posted on Tuesday, August 29, 2006 3:17 PM .net | Back to top


Comments on this post: Best practices on Object Model Design

# re: give me a Object Model Design for library management system
Requesting Gravatar...
immediatly givre me
Left by sudarshan on Sep 02, 2009 3:38 AM

Your comment:
 (will show your gravatar)


Copyright © Madhawa Karunaratne | Powered by: GeeksWithBlogs.net