Modularity - types of connection
This page extends the material in the book by discussing other types of interconnection between modules that are provided by various languages and operating systems.
Dynamic linking (binding)
Java and some other languages, including Smalltalk, use dynamic binding. The link from code calling a subroutine is not made until run time. Only then is the code for the subroutine found and the link made. This supports polymorphism (see page 162 and page 274).
Question for discussion: "what type of coupling (page 95) is dynamic linking?"
DLL (Dynamic Linking and Loading)
This is a Microsoft term used in their Windows operating systems. Sometimes a facility can be identified as being useful to a number of programs - e.g. Word, Explorer, Access. The facility can be made into a DLL. A DLL normally contains a collection of facilities - a collection of subroutines. A DLL sits on disc until the first program requests it. The parameter to request it is a text string giving the name of the DLL. Then it is loaded into memory. The operating system keeps a record of what is loaded and where. The DLL can then be shared by any other program (or the same program) that requests it. (One, re-entrant copy of the DLL is shared by any number of programs that want to use it.)
Question for discussion: is DLL simply dynamic binding?
Question: what type of coupling is represented by the DLL facility?
RMI (Remote Method Invocation) or Remote Procedure Calls
In a distributed software system, programs and parts of programs sit on different computers, sometime separated by large distances. Some systems support the facility for a program to call a procedure that is resident on a different machine. Any parameters need to be passed (across the network) and return values and parameters returned. It is a bit more difficult than this because sometimes a parameter will be a complete object - and this needs to be passed along with all its data and methods.
Question: which type of coupling does this represent?
Network programming
Client - server computing is about placing parts of a software system on different computers connected in a network or connected across the internet. The commonest example is that of a web browser (a client) communicating with a web server (a server). Communication is via a serial stream of data. One program outputs data and the other inputs it. Some protocol is needed so that each program knows what to send, when to send, when to receive. In the case of web browsing the protocol is called HTTP (Hyper Text transfer Protocol).
Question: which type of coupling does this represent?