4 ms·
Imagine if programs were more like plugins to the operating system, they'd register the stuff they could do, and the stuff they need to be done, and ultimately
by dusted 4y ago
Imagine if programs were more like plugins to the operating system, they'd register the stuff they could do, and the stuff they need to be done, and ultimately let the OS and user chose.. it could be that my text editor registers that it can edit text of ascii and utf-8 encoding.. it might register that it has plaintext files of that encoding available for printing, saving and viewing..
My browser can register that it can also display files of those encodings, and so I could effortlessly open a "viewer" in context of my text-editor, have it be my browser, and then when I edit the text-file, it is automatically shared (maybe even accessing same memory by pointer if I'm living dangerously) with the browser so I get live preview of my html.
The preview functionality in this case is not something that's explicitely supported by the text-editor, nor the browser.. It's just that since my OS already knows that the editor provides a source of text, and that the browser can view a source of text, then I can chose to open a browser perspective into the editor-source..
It might be that the operating system provides a "save file to disk" source, that I can then use to save the file from any program that provides a source of data.. It'd work the same way, instead of opening a browser as a perspective into my editor-text, I'd open a file destination into it, or I could open a LZ77 compression destination into it, which then opens a file destination, and my file is automatically compressed and saved, no program needs anything but tell the os what it can read and write..
- majewsky 4y agoTo a certain extent, you're describing the KParts framework from KDE 3/4 times (I don't know if it still exists today). Many people remember Konqueror as a file manager and web browser, but it was actually a generic URL navigator that would load the right KParts component for whatever thing was being displayed. For an HTML file, the web browser component. For a directory, the file browser component. For a video, the media player component. When I was developing Palapeli (a puzzle game that ships as part of KDE Games), I did a KParts version of it for fun in a few lines of code. That made it so that if you had a puzzle file stored in a folder, you could navigate to it in Konqueror and the game view would come up inside of Konqueror. Back in the day, I dreamed of a fully document-oriented computing experience. Sadly the world has settled on the service-oriented experience of today, largely controlled by a small number of gigantic fiefdoms.
- dusted 4y agoOh, I do remember that Konqueror had this really cool way with URLs, but I didn't realize the depth of it at the time!