https://www.npmjs.com/package/react-native-telephony
And it’s nowhere near these neat 3 lines. Same for ui.
I agree that the spirit of VB/Delphi is in theory easily transferrable to any modern runtime. But in practice we suck at it and there’s nothing even remotely close to just dropping a component on a form. All we have is miles of vaguely explained boilerplate and the most convoluted idioms that don’t connect. The basic technology is lost and only miraculously exists as a windows support artifact.
It's a grandiose vision. It just didnt work out because of how complicated it is in practise to implement the COM interface(s), and not enough apps did it anyway.
It is slightly different from a library, since that library would have to be useable from your language (or have some sort of FFI mechanism).
Many things were designed at the level of Microsoft App 1 (e.g. Word), and then when they needed something different for another app (e.g. Shell) they extended the interface in a different interface, and so on. The only authority for interfaces was Microsoft. Nobody else was really able to come along and make a set of interfaces that would become universal for something new, so you had to wait for Microsoft's design, and then it would be designed to support the way it was implemented in Word, Excel, or Internet Explorer, and they would not release the implementation details, just an interface specification and some hastily-written documentation.
Naming things was hard for Microsoft, so they came up with idiotic names like "IClassFactory" because they couldn't decide if they wanted to call something a Class (Smalltalk-style) or a Factory.
It took forever to learn because the documentation was not oriented around practical things, it was toy examples that didn't even work within the system. As a young programmer, it took me a long time to understand how everything was registered, what the difference between a CoClass and an interface really was, where to get that initial IUnknown pointer, etc., because the books were so focused on vtables and toy examples, etc.
The system was mostly replicated by Netscape/Mozilla for XPCOM, so it had areas where you could apply the same principles on other platforms. It also had superficial similarity to SOM/CORBA so learning those systems (thankfully mostly gone now) was also somewhat easier after learning COM.
There were several categories of applications.
- Those that used COM/OLE fully, as the underlying basis of everything they did, used structured storage, and exposed components and automation to the rest of the world.
- Those that implemented some sort of automatability and things like shell preview.
- Finally, those that used the minimal amount to support drag and drop and the like.
After a while, Microsoft's habit of introducing the next big thing and mostly abandoning it a few years later caused Windows application development to decline. COM has always been around, but many related technologies come and go. .NET blurred the lines between COM and the .NET runtime, and then Microsoft started making substantial overhauls of the Windows runtime without, IMO, getting buy-in. Why write WPF when it's similar to but incompatible with UWP? Why write UWP when Win32 works just fine? I wonder if they're going to introduce yet another? Oh, sure, Windows App SDK. Should we use GDI+ or Direct2D? Which one is going to "win"? Why do any of this when Microsoft themselves is using Electron in VS Code?
I wanted to use Excel from within Delphi - I wasted more than a few weeks and ultimately failed. I always suspected that the COM/OLE integration had problems with some of the advanced features I was trying to use (I was trying to do something rather complicated). Plus the documentation and support was lacking for Delphi - Microsoft best supports Microsoft tools. I did use Delphi and COM successfully in many other situations but that one failure really soured me towards COM and Delphi together. I am typically capable of making complex integrations work, so I was surprised to fail.
And you don't even need COM. You could do the same things today with RAD components in, say, Java. But it's just no longer a fad. Programmers nowadays don't think that dragging a component that makes phone calls and linking it to a button.
Nowadays, they would just write "npm install telephony" and then add a couple of lines that they got from the README.md on GitHub (or from their AI assistant) to make a call: