Jim Fawcett CSE775 – Distributed Objects Spring 2007

Slides:



Advertisements
Similar presentations
Component Object Model
Advertisements

COM vs. CORBA.
Distributed Application Development B. Ramamurthy.
Computer Science Lecture 24, page 1 CS677: Distributed OS Today: More Case Studies DCOM Jini.
1 COM/DCOM n Part of Project Presentation (Concept Outline)
1 of 5 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
DATA, DATABASES, AND QUERIES Managing Data in Relational Databases CS1100Microsoft Access - Introduction1.
DATA, DATABASES, AND QUERIES Managing Data in Relational Databases CS1100Microsoft Access - Introduction1 Created By Martin Schedlbauer
1 Modular Software/ Component Software 2 Modular Software Code developed in modules. Modules can then be linked together to produce finished product/program.
Using Visual Basic 6.0 to Create Web-Based Database Applications
‘Tirgul’ # 7 Enterprise Development Using Visual Basic 6.0 Autumn 2002 Tirgul #7.
Microsoft’s Distributed Component Object Model (DCOM) Jim Ries Updated 10/5/1999 A semi-technical overview.
COM/DCOM Implementation Basics of: Object creation and access Object Reuse Interface referencing.
OLE / COM Helia / Martti Laiho Sources: MSDN Kraig Brockschmidt: Inside OLE Orfali-Harkey-Erwards: Client/Server Survival Guide.
Introduction to COM and DCOM Organizational Communications and Technologies Prithvi N. Rao H. John Heinz III School of Public Policy and Management Carnegie.
CS 603 DCOM April 5, DCOM – What is it? Start with COM – Component Object Model –Language-independent object interface Add interprocess communication.
COMCOM omponent bject odel After this presentation, you will: Be Able To: Conceptual understanding of COM How it works, What it’s used for Decode Acronyms.
A COM implementation of the KSpace A ‘Knowledge Space prototype’ by Santhosh CST
Designing and Developing WS B. Ramamurthy. Plans We will examine the resources available for development of JAX-WS based web services. We need an IDE,
Introduction to COM and ActiveX Controls. What is an object? In the Fayad sense of the word.
Computer Science and Engineering Department VI I - SEMESTER Subject Name : MIDDLEWARE TECHNOLOGIES LABORATORY Subject Code : IT-404.
Object Oriented Software Development 10. Persistent Storage.
12/6/2015B.Ramamurthy1 Java Database Connectivity B.Ramamurthy.
OLE Slide No. 1 Object Linking and Embedding H OLE H definition H add other information to documents H copy.
COM / DCOM Xiaolan Lu Mingzhen Wang Dong Xie. Why COM / DCOM?  Challenges facing the software industry  Component software provides a solution  General.
Seminarium on Component-based Software Engineering Feraaz Imami LIACS – Leiden University Fall 2005 Component Object Model (COM)
ASP. ASP is a powerful tool for making dynamic and interactive Web pages An ASP file can contain text, HTML tags and scripts. Scripts in an ASP file are.
1 Distributed Processing Framework Behind the scenes.
R R R CSE870: UML Component Diagrams Implementation Diagrams.
Jim Fawcett CSE775 - Distributed Objects Spring 2014
Windows Programming Environments
Microsoft Foundation Classes MFC
Copyright © Jim Fawcett Spring 2017
CSE791 - Distributed Objects, Spring 2002
Jim Fawcett CSE775 – Distributed Objects Spring 2017
Abstract Factory Pattern
CSE775 - Distributed Objects, Spring 2006
Jim Fawcett CSE775 – Distributed Objects Spring 2004
Project Center Use Cases Revision 2
Project Center Use Cases
Segments Basic Uses: slides minutes
Data Virtualization Demoette… ADO.NET Client
Apartments and COM Threading Models
Microsoft’s Distributed Component Object Model (DCOM)
Project Center Use Cases
Jim Fawcett CSE791 – Distributed Objects Spring 2001
CSE687 - Object Oriented Design class notes Survey of the C++ Programming Language Jim Fawcett Spring 2004.
COM components + persistent storage = objects
Out-of-Process Components
Project Center Use Cases Revision 3
Project Center Use Cases Revision 3
Abstract Factory Pattern
Intent (Thanks to Jim Fawcett for the slides)
Windows Internals Brown-Bag Seminar Chapter 1 – Concepts and Tools
Interpreter Style Examples
Analysis models and design models
Dreamweaver Basics.
Java Database Connectivity
Introduction of Week 11 Return assignment 9-1 Collect assignment 10-1
Database Connectivity and Web Development
COM, DCOM and Software Components
Topic 12 Lesson 1 – Data and databases
COMPONENTS – WHY? Object-oriented source-level re-use of code requires same source code language. Object-oriented source-level re-use may require understanding.
Out-of-Process Components
Active Template Library
Presented By Justas Raslanas
Chapter 8 - Design Strategies
Lecture 7 ATL and Out-of-Process Components
Executable Specifications
Jim Fawcett CSE687 – Object Oriented Design Spring 2015
Presentation transcript:

Jim Fawcett CSE775 – Distributed Objects Spring 2007 Monikers Jim Fawcett CSE775 – Distributed Objects Spring 2007

References About the only detailed reference is: Inside OLE, Second Edition, Kraig Brockschmidt, Microsoft Press, 1995 http://msdn2.microsoft.com/en-us/library/ms691261.aspx

Monikers Here’s what Microsoft MSDN Library has to say about monikers: Monikers are objects that implement the IMoniker interface and are generally implemented in DLLs as component objects. There are two ways of viewing the use of monikers: as a moniker client, a component that uses a moniker to get a pointer to another object; and as a moniker provider, a component that supplies monikers identifying its objects to moniker clients. OLE uses monikers to connect to and activate objects, whether they are in the same machine or across a network. A very important use is for network connections. They are also used to identify, connect to, and run OLE compound document link objects. In this case, the link source acts as the moniker provider and the container holding the link object acts as the moniker client.

What is a Moniker? Monikers contain the logic necessary to find a currently running object by name (CLSID, URL). They can recreate and initialize an object instance in case there is no running instance. Monikers provide persistent encapsulated names for: Files Database queries Specific range of spreadsheet cells Each moniker binds to one specific object

So What is a Moniker? A Moniker is a COM object that: Implements the IMoniker interface Provides persistent storage for descriptive text Knows how to: Instantiate and/or access its object Cause some process to act on its object Provides a “universal” interface so clients don’t need to know the details of what it does. Very like the way the STL iterators shield clients from container details.

So What is a Moniker? In the Windows OS, a moniker is anything that implements a link, e.g.: File associations (a specific extension is linked to an executable) Short cuts Bookmark to some place in a document Link to a chart inserted in a word document

What is a Moniker? A moniker is a COM object that implements the IMoniker interface, which, in turn inherits the IPersistStream Interface: Some of its IPersistStream methods are: IPersist: GetClassID IPersistStream: IsDirty, Load, Save, GetSizeMax Monikers add the methods: Binding: BindToObject, BindToStorage Building and Reducing Composite Monikers: Reduce, ComposeWith, Enum, Inverse, RelativePathTo Naming: GetDisplayName, ParseDisplayName Other methods: IsEqual, Hash, IsRunning, GetTimeOfLastChange, IsSystemMoniker

How are Monikers Used? Create a COM object and initialize its state from persistant storage, as a single operaton. Download a remote object’s server, register it, and instantiate the object, as happens with ActiveX objects on a webpage. There are a number of System Monikers that do these kinds of operations. System Monikers: File monikers: reconstitute object from file Class monikers: bind to an object’s class factory Item monikers: bind to a part of a larger object, e.g., a range of cells in a spreadsheet.

Class Moniker Call CreateClassMoniker Call BindMoniker That returns pointer to class factory Use that to create instance Use the instance Class monikers are placed in the per process activation table by RegisterClassObject, used by out-proc servers to support COM activation.

File Moniker Call CreateFileMoniker Call BindToObject to bind file to an object CLSID in file, or based on file extension FileMoniker: creates an instance of object Calls QueryInterface asking for IPersistFile interface and uses its Load method to initialize the object File moniker creates an initialized object

Code Samples In the code samples that follow, you will see applications of: Class moniker File moniker Custom moniker

End of Presentation