Thanks very much for you replies! I now got myself confused a bit by reading the the following in an article:
Can you avoid changing the code you have already written and tested to add new functionality? Can you add new classes to your program without having to recompile the whole thing? The answer to both questions is yes, and as you might have guessed, is based on interfaces and dynamic class loading.
If there is a need to add functionality to your own classes, why would you be using dynamic loading
? I will always know all the methods in it so why not use the "new"
keyword and do a static
loading to load the classes and add functionality??
Here's the article
!Im still trying to understand the example in the article and would like to know if the given dynamic loading example
is the correct design pattern for such scenarios
Would be glad if someone could help me clarify my confusion!
[ September 17, 2007: Message edited by: Muni K Reddy ]