Chapter 6 -- Designing Interfaces

Chapter 6

This chapter explains several approaches to designing and managing interfaces in a distributed application. Each approach offers varying degrees of ease of use, extensibility, and scalability. You must understand the costs and benefits of each approach and pick the one that best meets your needs. What's really important is that you commit to one of the approaches before you start your design.

COM has been influenced by many factors to accommodate component-based development and interprocess communication. As a result, many of the designs and methodologies of classic object-oriented programming (OOP) don't work well in the world of COM. In particular, many common OOP interface designs don't scale when they're taken out of process because the proxy/stub layer has such a significant impact on performance. When you design an interface for an out-of-process object, your first priority should be reducing round-trips. This means that your classes and interfaces can become more complex than a simple class design that you would create in a classic OOP paradigm.

This chapter also explains how to implement an object with an outbound interface. It specifies the advantages of bidirectional communication and demonstrates two techniques for creating an outbound interface. One way is to use events, and the other way is to define and implement a custom callback interface. These techniques offer different combinations of ease of use, performance, and flexibility.

Programming Distributed Applications With Com & Microsoft Visual Basic 6.0
Programming Distributed Applications with Com and Microsoft Visual Basic 6.0 (Programming/Visual Basic)
ISBN: 1572319615
EAN: 2147483647
Year: 1998
Pages: 72
Authors: Ted Pattison © 2008-2017.
If you may any questions please contact us: