1 / 19

Intro to COM

Intro to COM. What is it and what can it do for me?. COM Defined. COM (Component Object Model) and DCOM (Distributed COM) are a set of binary and network standards for the modeling of objects and their communications. OK, What are Components?.

spiro
Download Presentation

Intro to COM

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Intro to COM What is it and what can it do for me?

  2. COM Defined COM (Component Object Model) and DCOM (Distributed COM) are a set of binary and network standards for the modeling of objects and their communications.

  3. OK, What are Components? • Components are big brother of Classes. Component = Object • Interface = Function Set of that Object • Properties = Member Variables • (all Properties are actually get & put calls) • Methods = Functions • BONUS: Components can have more than one interface.

  4. IUnknown IFoo IFooEx What makes up a Component? • Implementation object • Interface object(s) Implementation Object Components are well-encapsulated objects

  5. Identifiers • GUID (globally unique identifiers) • are stored in 16-byte (128 bit) structures • CLSID(class identifier GUID) • IID(interface identifier GUID) IUnknown • QueryInterface • Returns a pointer to requested Interface • AddRef • Increases the RefCount • Release • Decreases the RefCount

  6. Where do components live? • In-Process servers (.dll) • Out-of-Process servers (.exe) • Remote servers (.exe) • ActiveX (.ocx)

  7. Using Components • Rapid Application Development • Seamless application updates • Build great apps without reinventing the wheel • Interface different systems with ease • Examples: Serial port communications, Scanner image capture, Image archive systems, internet server interaction (CDDB)

  8. What languages can I use? • C++, Java, Visual Basic and VB Script (IIS) • ActiveX technology, Use MS ATL (VC++) • Component creation • Component use in applications

  9. Why should you learn COM? • Saves tremendous time (after the initial learning curve) • Use of existing objects • Object Reuse: C++ tried to address this issue, but just made it easy to reuse source code. • So you can use DCOM.

  10. Parallel Programming • Three main types of applications: • CPU intensive • graphics rendering • BFA • Resource Specific • DCOM lets you do this seamlessly • Highly connected • custom data, application structures • hybrid memory models

  11. Cradle - Traveling Salesman

  12. 6min 30 sec 16 sec

  13. 197 days 3.5 Days

  14. Life 3D

  15. Life3D face relationships 1 6 2 1 2 5 3 3 4 4 5 6

  16. Symera Viewer

  17. Clustering Scenarios Tight Coupling Loose Coupling

  18. Life3D Class Conversion User Interface Distributed Object CMainWindow CFaceWindow CCubeFace CCubeFace (interface) CFace (implementation) CSymObj CSymObjRef CSymObj Original classes New classes Symera base classes

  19. Recommended Reading • Dr. GUI articles on COM - a MUST READ • Essential COMby Don Box • Inside COM & Inside Distributed COM(MS Press) • ActiveX/COM Control Programming (WROX Press) • For the complete history and theory, read: • Inside OLE (MS Press)

More Related