From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,56a94442d514b905 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!newsfeed.stueberl.de!news-out2.kabelfoon.nl!83.128.0.10.MISMATCH!newsfeed.kabelfoon.nl!newsfeed.multikabel.nl!skynet.be!newspost001!tjb!not-for-mail Date: Fri, 12 Nov 2004 10:53:03 +0100 From: Adrien Plisson User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) X-Accept-Language: fr-fr, fr-be, fr, en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Plugins/Dynamic Libraries References: <41933fb1$0$9742$ba620e4c@news.skynet.be> <2004111119124350073%david@bottoncom> In-Reply-To: <2004111119124350073%david@bottoncom> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <41948730$0$9747$ba620e4c@news.skynet.be> Organization: -= Belgacom Usenet Service =- NNTP-Posting-Host: 1092e875.news.skynet.be X-Trace: 1100252977 news.skynet.be 9747 80.200.22.46:3637 X-Complaints-To: usenet-abuse@skynet.be Xref: g2news1.google.com comp.lang.ada:6166 Date: 2004-11-12T10:53:03+01:00 List-Id: David Botton wrote: > I would not say they are equivalent. COM is also used as a spec for > communication on a much smaller scale. As for being the accepted method, > it depends on what you are trying to achieve. Most of the time COM is in > fact preferable (encased in DLL, ie. an inproc server) since it is an > automatic plug-in to Windows, .NET, VB, etc. DLLs still serve there > place, but COM on Ada is easy to do and the results are far more flexible. you're right, COM is not equivalent to corba, but DCOM is. but i would not say COM are preferable to dll most of the time. COM adds some (somewhat big) overhead which may not be interresting. one thing to notice: coding plugins is ONLY a matter of interface. COM defines a standard interface, but you are free to use yours. i already worked on a small project involving plugins in C: a software that was adding funny movements to your mouse. each kind of movement was implemented in a standard dll, loaded dynamically at runtime. each plugin was implementing an interface consisting of 3 functions. those 3 functions were sufficient and using COM there would have been overkill. on another scale, taking advantage of the ability to put C++ classes in dlls, i wrote an application based on modules. here again i defined an interface (a base class) from which modules derived. the only fancy stuff needed was some factory functions in each dll (this is a standard design pattern called Abstract Factory). you will say that this is exactly what COM does for you, but unfortunately, you cannot strip down COM to remove what is not interesting for your particular project. the worst thing to do is trying to use the ATL (Active Template Library from Microsoft) to code simple COM objects: ATL suffers from a bad design which stopped me most of the time. > I find that in most modern serious projects COM (on Windows and starting > recently for Mac OS X) is in fact being used over a plain dll and in > particular if you are looking to do plug-ins. COM is almost always used over a plain dll. > In fact, on Mac OS X plug-in are also COM in a shared lib just like on > Windows. COM is more of a spec for plug-ins that can interoperate than a > distributed object system like CORBA. that's it: COM is an interface. DCOM is a more refined interface which allows for distribution. > There is no reason not to use the COM "spec" in the same way on Linux > for plug-ins. Take a look at InsideCOM (Microsoft Press) for an > introduction to COM the spec (it doesn't serve as a good intro to COM on > Windows incidentally) The GNATCOM framework though would need a little > bit of work though to make it really viable though for use on Linux, but > is very reasonably doable. I already read "Inside OLE" some years ago... (for those interested: "Inside OLE", 2nd edition, is given in an alectronic format with the MSDN library for Visual Studio 6) > GNATCOM of course :-) as he pointed out. http://www.gnavi.org/gnatcom shortly after i posted it, i made a search on AdaPower.com and found it. -- rien