[HN Gopher] COM+ Revisited
___________________________________________________________________
COM+ Revisited
Author : lowleveldesign
Score : 47 points
Date : 2022-01-29 17:11 UTC (1 days ago)
(HTM) web link (lowleveldesign.org)
(TXT) w3m dump (lowleveldesign.org)
| mwattsun wrote:
| I read about "Software ICs" in Byte Magazine in the 80's. I later
| thought COM was a decent try. The implementation and tooling
| around it was always problematic. People do buy software
| components off the shelf now, like special graphing controls in
| Excel for example, so it continues to be a useful paradigm. The
| Software IC concept got coopted by OOP, which isn't the way I
| first understood it.
|
| Graham Lee blog post about Brad Cox's Object-Oriented
| Programming:
|
| _In 1714, Gottfried Leibniz published La Monadologie, in which
| he proposed that at the fundamental level, objects are made of
| indivisible entities called Monads. You can't see inside a monad,
| it has an internal state that controls its actions and passions.
| Monads can be created or destroyed atomically, but cannot be
| partially built or partially annihilated because they are a
| "simple substance without parts"._
|
| _Cox, on the other hand, opens with the story of Eli Whitney and
| the industrial revolution. For Cox, the industrial revolution is
| not primarily about machinery and the harnessing of steam and
| coal power. It's about the replacement of artisanal, cottage
| manufacture with scaled-up industrial processes that depend on
| well-specified interfaces between standardized, interchangeable
| parts._
|
| https://web.archive.org/web/20191220204822/https://deprogram...
|
| https://news.ycombinator.com/item?id=21833331
| RantyDave wrote:
| COM is (IMHO) one of the great underrated technologies.
| Registering all the classes, interfaces etc. in the registry -
| not so much. But IDL's, versioned interfaces etc. etc. are all
| reinvented every five years or so. And it's fast as hell.
|
| DCOM was awful.
| pjmlp wrote:
| I like COM as concept, what is awful beyond explanation is why
| it being so central to WinDev, it keeps having pre-historic
| support on Visual Studio.
|
| IDL files still lack code completion and syntax highlighting,
| 25 years later, and they cannot settle on any kind of framework
| that makes it easier to use.
|
| From .NET side there are still gotchas to this day, and from
| C++ side it seems we cannot just have nice tools.
|
| Now as a concept it is quite cool, execution could be so much
| better.
| YZF wrote:
| Wasn't that awful ;) In some sense it's maybe a precursor to
| gRPC. DCOM let us (EDIT: us being some old project/team I
| worked on) take a component and make it distributed with very
| little work (COM -> DCOM) almost seamlessly.
| RantyDave wrote:
| Interesting, I was obviously doing something very wrong (back
| in the day).
| smackeyacky wrote:
| I worked on a project around the early 2000s that had a mixture
| of DCOM and Corba in it. Relatively speaking, DCOM was a dream.
| It reminded me a lot of the original RPC generated stubs on
| Solaris.
|
| Corba reminded me that some people should never write network
| code: sometimes the interface would start, sometimes it
| wouldn't (this system was a consumer of something the Corba
| system was generating). The Corba guys had an elaborate startup
| procedure that resembled praying to the gods of Java that it
| would work this time, Bullwinkle pulling a rabbit out of a hat
| style. The DCOM stuff just worked / was able to reconnect when
| something failed.
|
| Corba was possibly the worst tech I have ever had the
| displeasure of using and while I don't remember DCOM especially
| fondly, it wasn't terrible.
| city41 wrote:
| It's been many years for me, but I remember it having nice
| interop with .NET as well. Back then I worked with several APIs
| that were just COM objects brought into .NET.
| Const-me wrote:
| I like many parts of COM, but I believe that example mostly
| demonstrates bad parts, with IDL, registrations, and over-
| engineered support libraries.
|
| There's nothing wrong with exporting factory functions from DLLs.
| Microsoft does it all the time, APIs like Direct3D, DirectDraw
| and Media Foundation don't come with type libraries are they
| aren't registered anywhere.
|
| Speaking about support libraries, I once made my own:
| https://github.com/Const-me/ComLightInterop/tree/master/ComL...
| Compare examples from that article with this one:
| https://github.com/Const-me/ComLightInterop/blob/master/Demo...
| That source file is the complete DLL which implements a
| minimalistic COM object.
| pjmlp wrote:
| With C++/CX and .NET Native they finally got it, after all
| these years Microsoft actually adopted Borland's productivity
| to COM, as done by C++ Builder and Delphi.
|
| Then they just managed to sink that ship with their UWP
| execution and the anti-C++/CX team that managed to deprecate it
| in name of C++/WinRT.
|
| It wouldn't be that bad if IDL tooling had actually improved
| since the ActiveX days.
| jmull wrote:
| Seems crazy to me to use WIL instead of ATL as your C++ COM
| wrapper.
| andyjohnson0 wrote:
| WIL seems to be in more or less active development, according
| to its GitHub page. ATL doesn't seem to have much done to it in
| the last decade or so.
|
| https://github.com/microsoft/wil
| jmull wrote:
| COM isn't changing. The entire point (the only point,
| actually) is interop.
|
| So why is your language-specific wrapper changing? Well, for
| continued language support... but that _does_ appear to be
| happening with ATL.
|
| Call me skeptical, but we now have... let's see... _four_ COM
| C++ API 's to choose from, just considering the ones
| affiliated with MS. (If someone offered me an even bet there
| weren't more without looking it up, I'd take that bet).
|
| Maybe, since the entire point is interop, we should settle on
| one at some point??
|
| (1) raw C API IUnknown/BSTR/VARIANT/etc; (2)
| CComPtr/CComBSTR/CComVariant/etc; (3)
| _com_ptr_t/_bstr_t/_variant_t/etc; (4) WIL's baby COM API
| pjmlp wrote:
| You forgot C++/CX, WRL and C++/WinRT on your list.
|
| Yep it is that bad.
|
| The problem with ATL is that it is stuck in the Visual C++
| 6.0 tooling experience.
|
| The alternatives aren't much better though, although WIL
| seems to be the less painful to use, if we ignore all that
| UWP stuff.
| jstarks wrote:
| Care to elaborate?
| davidpolberger wrote:
| I spent a couple of years (while working a full-time job) writing
| my master's thesis on "component technology" -- COM, CORBA, .NET
| assemblies, OSGi and the COM-inspired object model developed at
| Ericsson and Sony Ericsson for use in cell phones. This was back
| in 2009.
|
| I tried to make sense of how all these disparate technologies fit
| together. Give it a read if you like (CC-licensed):
|
| http://www.polberger.se/components/
|
| http://www.polberger.se/components/read/
|
| http://www.polberger.se/components/thesis.pdf
| gavinray wrote:
| This is really interesting, thank you for sharing. I downloaded
| the PDF of your thesis and put it in my to-read library.
| davidpolberger wrote:
| Nice, let me know if you have any questions or feedback!
| (Email in profile.)
| mandarax8 wrote:
| Do people still code like this?
| mwattsun wrote:
| Yes
|
| Introduction to Fuchsia components
|
| _Components are the foundational building blocks of software
| running in Fuchsia. Each component is a composable, sandboxed
| module that interacts with other components through
| capabilities._
|
| https://fuchsia.dev/fuchsia-src/concepts/components/v2/intro...
|
| COM+ Application Overview
|
| https://docs.microsoft.com/en-us/windows/win32/cossdk/com--a...
| pjmlp wrote:
| Yes, Windows is mostly COM nowadays, when it isn't .NET.
|
| Then you have XPC on Apple platforms, Android IPC and Fuschia
| IDL on Google's, D-BUS on GNU/Linux, and the new cloud fashion
| gRPC.
| wila wrote:
| What is fun is that so many people say "but COM is
| outdated"... when I look around in Windows it is everywhere.
| :)
| 0x0 wrote:
| I always wondered if COM+, the new version of COM, was originally
| going to be named COM2 ... until somebody tried to create a new
| visual studio project in a directory named COM2...
___________________________________________________________________
(page generated 2022-01-30 23:00 UTC)