Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


How does the IDL describe my object?

March 20, 2000

The IDL description of your object operates in terms of Interface definitions.

If an object states in the IDL that it implements a particular interface then it is advertising the fact that it implements all the methods within that interface.

For example, consider a SeniorManager object. This object might implement the following methods:

  1. hirePeople()
  2. firePeople()
  3. startProject()
  4. endProject()

The IDL description of this object could state that this object implemented 2 custom interfaces, the changeHeadCount interface [ comprising methods 1 and 2 ] and the manageProject interface [ comprising methods 3 and 4 ].

In fact, given the interface naming conventions that COM uses, these 2 interfaces would probably more likely be called IchangeHeadCount and ImanageProject, with the leading "I" standing, funnily enough, for "Interface".

The topic of COM interfaces is substantially more detailed than has been laid out above, but a Perl developers writing COM components does not need to have more than a very basic knowledge of the significance of interfaces in COM. This is for 2 reasons:

  1. COM objects written in Perl have their IDL description generated by the PDK. This means that you do not have to worry about writing any of your own interface definitions for your object, as you might have to were you implementing it in C++.

  2. Because the PDK generates the IDL description of the methods of your object, you have no way of defining any custom interfaces that the COM object implements. Consider the IchangeHeadCount and ImanageProject interfaces mentioned above. If you wanted to state that your object implemented these, you would have to have some way of writing the IDL to say as much. The PDK, however, does this all for you. All Perl COM components implement only one interface, called "I[perl class name]" - so for example the SeniorManager object would be stated to implement ISeniorManager, which would comprise, all together, the 4 methods listed above. It is the PDK, therefore, that is responsible for defining the custom interface that your class implements.

This is nothing more than a very cursory introduction to a topic that lies at the very heart of COM - interface based programming. For those of you who wish to investigate the subject above and beyond the scope of this article, topics such as the IDispatch and IUnknown default COM interfaces, and early and late binding [ amongst many other things ] await you.

Multiple Interfaces
Introduction to Perl on Windows - Table of Contents
How do I package my PERL code as a COM component?


Up to => Home / Authoring / Languages / Perl / Windows




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers