Regards,
Eric Longman
Atl-Connect Internet
Services
+-------------------------------------------------------+
|
Atl-Connect Internet Services
http://www.atlcon.net |
| 3600 Dallas Hwy
Ste
230-288
770 590-0888 |
| Marietta, GA
30064-1685
[EMAIL PROTECTED]
|
+-------------------------------------------------------+
----- Original Message -----
Sent: Friday, August 24, 2001 9:52
AM
Subject: A solution in implementing a
COM
Hi,
since there seem
to be such an interest in creating COM object for NT, I'll give you a solution
I found to implement one. Hopefully you will find it usefull and you can
implement a COM with all functionnalities.
The biggest
advantage in the way I create the COM is that you don't need to change any of
your OpenSRS client scripts. And even better --> the
COM uses the same opensrs.conf file.
The idea is to
write in Perl a module that contains all OpenSRS methods necessary to define
your component. In my test component, I have written the LookupDomain()
and GetDomainInfo() methods. Simply put, I have went through the client
code of version 2.41 and took out the code to build the functions.
So everything in the code is still the same, I just took out all HTML output
and cleaned the code a bit.
The next step was
to use ActiveState's PerlCtrl which you can download from the web. Since
you must pay a license for this, maybe you can find something equivalent for
free. Let me know. Though I recommend this one, as it does a good
job. So, all you do is write the package TypeLib at the end of your
component Perl file. What's also great with this is that you don't need
to compile the script to test your component. Simply write a
small Perl script that call your module and that's it!
Then compile the
component. Register it and go into your ASP code and like magic, use:
Server.CreateObject().
An other nice
thing is that you can create Properties into your component really
easily. So I have created some properties like ResponseCode,
ResponseText and Status. After running my LookupDomain method,
I get the values from these properties. So no messing around with an XML
object into your ASP code.
So if I get back
on the whole thing: write a script in Perl containing all your component
methods, don't modify your OpenSRS client code, build your component and use
it in your ASP pages.
Now, I would like
to make a suggestion to developpers of the OpenSRS client code. The
above solution would be really fast to implement if there where such a module
in the client code that contains all OpenSRS functions. Actually, all
code of these functions are mixed with HTML output. This makes it hard
to use and, I guess, even harder to maintain the code. Even in the new
SF version, I don't saw this (if i'm wrong, let me know).
Hopefully this
helps. If you have any questions, just write me.
_______________________________________________________
Benjamin
B�rub�, D�veloppeur Applications Web
Versus�
2050, rue De Bleury, bureau
520
Montr�al (Qu�bec) H3A 2J5
Canada
T�l.: (514) 284-9001 ext.
221 Fax.:
(514) 284-9002