July 2001
Intermediate to advanced
656 pages
15h 51m
English
As has been briefly discussed, applications are organized into logical layers that separate the major concerns of the application, such as the UI layer (for UI concerns) and a “domain” layer (for domain logic concerns).
Common designs by which objects in the UI layer obtain visibility to objects in the domain layer include the following:
An initializing routine (for example, a Java main method) creates both a UI and a domain object, and passes the domain object to the UI.
A UI object retrieves the domain object from a well-known source, such as a factory object that is responsible for creating domain objects.
The sample code shown before is an example of the first approach:
public class MainRead now
Unlock full access