intro to com what is it and what can it do for me?
TRANSCRIPT
![Page 1: Intro to COM What is it and what can it do for me?](https://reader031.vdocuments.mx/reader031/viewer/2022020117/56649e045503460f94aefb4a/html5/thumbnails/1.jpg)
Intro to COM
What is it and what can it do for me?
![Page 2: Intro to COM What is it and what can it do for me?](https://reader031.vdocuments.mx/reader031/viewer/2022020117/56649e045503460f94aefb4a/html5/thumbnails/2.jpg)
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.
![Page 3: Intro to COM What is it and what can it do for me?](https://reader031.vdocuments.mx/reader031/viewer/2022020117/56649e045503460f94aefb4a/html5/thumbnails/3.jpg)
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.
![Page 4: Intro to COM What is it and what can it do for me?](https://reader031.vdocuments.mx/reader031/viewer/2022020117/56649e045503460f94aefb4a/html5/thumbnails/4.jpg)
What makes up a Component?
• Implementation object• Interface object(s)
IFooEx
IFoo ImplementationObject
IUnknown
Components are well-encapsulated objects
![Page 5: Intro to COM What is it and what can it do for me?](https://reader031.vdocuments.mx/reader031/viewer/2022020117/56649e045503460f94aefb4a/html5/thumbnails/5.jpg)
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
![Page 6: Intro to COM What is it and what can it do for me?](https://reader031.vdocuments.mx/reader031/viewer/2022020117/56649e045503460f94aefb4a/html5/thumbnails/6.jpg)
Where do components live?
• In-Process servers (.dll)
• Out-of-Process servers (.exe)
• Remote servers (.exe)
• ActiveX (.ocx)
![Page 7: Intro to COM What is it and what can it do for me?](https://reader031.vdocuments.mx/reader031/viewer/2022020117/56649e045503460f94aefb4a/html5/thumbnails/7.jpg)
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)
![Page 8: Intro to COM What is it and what can it do for me?](https://reader031.vdocuments.mx/reader031/viewer/2022020117/56649e045503460f94aefb4a/html5/thumbnails/8.jpg)
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
![Page 9: Intro to COM What is it and what can it do for me?](https://reader031.vdocuments.mx/reader031/viewer/2022020117/56649e045503460f94aefb4a/html5/thumbnails/9.jpg)
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.
![Page 10: Intro to COM What is it and what can it do for me?](https://reader031.vdocuments.mx/reader031/viewer/2022020117/56649e045503460f94aefb4a/html5/thumbnails/10.jpg)
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
![Page 11: Intro to COM What is it and what can it do for me?](https://reader031.vdocuments.mx/reader031/viewer/2022020117/56649e045503460f94aefb4a/html5/thumbnails/11.jpg)
Cradle - Traveling Salesman
![Page 12: Intro to COM What is it and what can it do for me?](https://reader031.vdocuments.mx/reader031/viewer/2022020117/56649e045503460f94aefb4a/html5/thumbnails/12.jpg)
Traveling Salesman - 13 Ponts
0
50
100
150
200
250
300
350
400
450
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
Number of MachinesPII 333MHz
Sec
on
ds
to c
om
ple
te
0.00%
20.00%
40.00%
60.00%
80.00%
100.00%
120.00%
140.00%
160.00%
180.00%
Per
cen
tag
e o
f T
heo
reti
cal
Theoretical
Actual
% Theoretical
6min 30 sec
16 sec
![Page 13: Intro to COM What is it and what can it do for me?](https://reader031.vdocuments.mx/reader031/viewer/2022020117/56649e045503460f94aefb4a/html5/thumbnails/13.jpg)
Traveling Salesman - 17 Points(43,680 times the calculation)
0
2000000
4000000
6000000
8000000
10000000
12000000
14000000
16000000
18000000
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
Number of MachinesPII 333MHz
Sec
on
ds
to c
om
ple
te
0.00%
10.00%
20.00%
30.00%
40.00%
50.00%
60.00%
70.00%
80.00%
90.00%
100.00%
Per
cen
tag
e o
f T
heo
reti
cal
Theoretical
Actual
% Theoretical
197 days
3.5 Days
![Page 14: Intro to COM What is it and what can it do for me?](https://reader031.vdocuments.mx/reader031/viewer/2022020117/56649e045503460f94aefb4a/html5/thumbnails/14.jpg)
Life 3D
![Page 15: Intro to COM What is it and what can it do for me?](https://reader031.vdocuments.mx/reader031/viewer/2022020117/56649e045503460f94aefb4a/html5/thumbnails/15.jpg)
Life3D face relationships
21
43
5 6
1
5
6 2
3
4
![Page 16: Intro to COM What is it and what can it do for me?](https://reader031.vdocuments.mx/reader031/viewer/2022020117/56649e045503460f94aefb4a/html5/thumbnails/16.jpg)
Symera Viewer
![Page 17: Intro to COM What is it and what can it do for me?](https://reader031.vdocuments.mx/reader031/viewer/2022020117/56649e045503460f94aefb4a/html5/thumbnails/17.jpg)
Clustering Scenarios
Tight Coupling Loose Coupling
![Page 18: Intro to COM What is it and what can it do for me?](https://reader031.vdocuments.mx/reader031/viewer/2022020117/56649e045503460f94aefb4a/html5/thumbnails/18.jpg)
Life3D Class Conversion
CMainWindow CFaceWindow
CCubeFace(interface)
CFace(implementation)
CSymObj CSymObjRef
Original classes
New classes
Symera base classes
CCubeFace
CSymObj
User InterfaceDistributed Object
![Page 19: Intro to COM What is it and what can it do for me?](https://reader031.vdocuments.mx/reader031/viewer/2022020117/56649e045503460f94aefb4a/html5/thumbnails/19.jpg)
Recommended Reading
• Dr. GUI articles on COM - a MUST READ
• Essential COM by 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)