From http://blog.csdn.net/wishfly
"
For example.
You need to print "Hello wrold." on the screen ."
OK!
You wrote down: prtinf ("Hello world .");
Then, you may wish to write in the file.
So it is changed;
If (screen ){
Prtinf ("Hello world .");
} Else (File ){
Write_to_file ("C: \ hello.txt", "Hello world .");
}
Then, you may want to write to the printer.
If (screen ){
Prtinf ("Hello world .");
} Else (File ){
Write_to_file ("C: \ hello.txt", "Hello world .");
} Else (printer ){
Write_to_printer ("Hello world .");
}
So you feel a little bored-think of a way: How to not changeProgramOr do you need to modify the program to implement this extension?
So the framework came in!
Use a function:
Print ("Hello world.") to realize polymorphism.
The specific implementation process is the Framework implementation.
Summary: The Framework is a set of interfaces for program extension.
"