Chapter 2: Interface-Based Programming

 < Free Open Study > 



Objectives:

  • Learn the philosophy of interface-based development.

  • Create and implement interfaces using C++.

  • Describe how interfaces provide encapsulation and polymorphism.

  • Understand "published" interfaces and how to version them safely.

  • Develop custom APIs to retrieve interface pointers.

  • Understand interface inheritance and interface hierarchies.

The underlying backbone of COM is the concept of the interface. You simply cannot create COM solutions without them. Often, making the move from traditional OOP to the interface-based programming paradigm can be a bit jarring (just about as much so as the initial move from SP to OOP). Although COM is hopelessly dependent upon the use of interfaces, we can most certainly work with them in their own right.

To help you make the move into interface programming as gracefully as possible, this entire chapter examines the interface from a C++, and non-COM, perspective. By the end of this chapter you will be able to create and use C++ objects supporting multiple interfaces, and understand how the separation of interface from implementation is a modern refinement of classical OOP and the foundation of all things COM.



 < Free Open Study > 



Developer's Workshop to COM and ATL 3.0
Developers Workshop to COM and ATL 3.0
ISBN: 1556227043
EAN: 2147483647
Year: 2000
Pages: 171

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net