Why using Interface

[youtube=http://www.youtube.com/watch?v=lXqXODHOjWM]


Using interface add flexibility and power to your design it solves the hard equation how to make the classes cohesion and lose coupling? , because by making interface, class doesn’t need each other anymore, by using interface you define the services that will provided by the class.
This will apply the Dependency inversion principle
You can see the video for more information.
For more information about Dependency inversion principle visit the following links

http://www.objectmentor.com/resources/articles/dip.pdf
Thanks
M.Radwan


Share This: