Geeks With Blogs
Blog Moved to Blog Moved to
As I wandered the net this morning for my usual tech tips and such, I always found that I can be a sucker for lists.  I came across this blog post 10 tips on writing reusable code in which Hosky elaborates upon what he feels should be concentrated upon.
The basic list boils down to this:
1.  Don't repeat code
2.  Make code do one thing
3.  Break down logic by test case
4.  Remove business logic from frameworks
5.  Hide code dependencies with abstract classes and interfaces
6.  Code for extensibility with interfaces
7.  Code with fewer lines and keep classes focused
8.  Reduce coupling
9.  Be more modular
10.  Write as if you were an external API
Although this is a Java site and written from the perspective of a Java programmer, the same thing applies to all OO languages.  I could easily apply the same principles to C#, C++, or even VB.NET (shudders).  Much of what is written here is about the basic OO principles when it comes to reusability that needs to be drilled into developers heads time and time again. 
Posted on Wednesday, June 21, 2006 12:16 PM .NET , Enterprise Architecture | Back to top

Comments on this post: Tips on Writing Reusable Code

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Matthew Podwysocki | Powered by: