Monday, May 4, 2009

Design Guidelines - Static class design

Static classes are classes that do not contain instance members other than those inherited from Object, and do not have a callable constructor. The following guidelines help ensure that your static classes are correctly designed.

Do use static classes sparingly.

Static classes should be used only as supporting classes for the object-oriented core of the framework.

Do not treat static classes as a miscellaneous bucket.

The Environment class is a good example of the proper use of a static class. This class provides access to information about the current user environment.

Do not declare or override instance members in static classes.

If the design of a class suggests that there should be instance members, the class should not be marked static.

Do declare static classes as sealed and abstract, and add a private instance constructor, if your programming language does not have built-in support for static classes.

1 comment:

Blogger said...

Do you understand there is a 12 word sentence you can speak to your partner... that will induce deep emotions of love and impulsive attractiveness to you buried within his chest?

That's because deep inside these 12 words is a "secret signal" that triggers a man's instinct to love, treasure and care for you with his entire heart...

12 Words Who Trigger A Man's Love Response

This instinct is so built-in to a man's genetics that it will make him try better than ever before to love and admire you.

As a matter of fact, fueling this all-powerful instinct is absolutely binding to having the best ever relationship with your man that the moment you send your man one of the "Secret Signals"...

...You'll soon find him expose his soul and heart for you in such a way he never experienced before and he'll identify you as the only woman in the world who has ever truly tempted him.