The kdbuswreck
The kdbuswreck
Posted Apr 27, 2015 15:17 UTC (Mon) by hp (guest, #5220)In reply to: The kdbuswreck by lsl
Parent article: The kdbuswreck
An interface is implemented by N objects, so for example an interface might be implemented by each open document in a word processor. I would say you do not want "some document that implements the Document interface" when you call `org.whatever.Document.Delete()`, you want the specific document you plan to delete :-)
*Services* are generally pluggable - i.e. the entire word processor application, could implement a set of objects (each with a set of interfaces) conforming to some sort of standard, potentially, and then you could interop with whichever word processor owns a certain `org.whatever.WordProcessor` service, or something.
Well-known name: like a DNS entry, a way to find an entire *program* to talk to (service locator)
Object path: equivalent to a pointer ... a specific instance of an object in the "object-oriented programming" sense of object
Interface: means same thing as in Java (set of methods on an object instance)
The fact that some programs have only one object instance with only one interface, in no way means that these are redundant.
Yes you can write a program in Java that only contains `class MyProgram` and `static MyProgram theInstanceOfMyProgram = new MyProgram()`.
This does not mean that Java should _only_ provide support for singleton objects!
