New System Development

During the design phase of a new system, it is good practice to keep the main modules of the system as independent as possible and their inter-communications clearly defined. This enables you to change the implementation details of different modules with a minimum impact on other modules.

The different modules of the system can be at the same level of abstraction and functionality, which is referred to as encapsulation at the module level. If the modules are at different levels, the separation is referred to as layering. In either case, you can use interfaces at this early stage to define the point of contact between two modules.

As you develop each module, provide the classes and methods that you intend to satisfy the different interface requirements. When interfaces and classes are paired together, the compiler can then verify that the classes supply the corresponding methods for each interface. This is a kind of compile-time dynamic binding mechanism that you can use to verify that the interaction between modules is well-defined yet you maintain the ability to replace those modules at different times in the system life time.

An accessed interface constant must be qualified as interface-name.constant-name, not class‑name.constant‑name.