Section 1: Application Design Concepts and Principles
System split in different levels of abstractions. Visualized as a stack.
- Lower layers: low-level details. Not dependable on higher layers.
- Higher layers: abstract business details. Dependable on lower layers.
System split in stages of processing. Tiers can be replaced by other implementations. Example: client/server is a two-tier system.
Separation of Concerns
Clearly defined distinct responsibilities of different parts of a system.
- Layered design: separates over abstractions of data and processing.
- Tiered design: separates over business processing steps.
Explain the main advantages of an object-oriented approach to system design including the effect of encapsulation, inheritance, and use of interfaces on architectural characteristics.
- Encapsulation: Details and behavior hidden. Interaction only through (narrow) defined interface. Increases modularity.
- Inheritance: class extended in a new class with additional data/behavior. Increases code reuse.
- Polymorphism: type could refer to different types. Through inheritance and implementing different interfaces. Increases abstraction of classes (hides implementation details).
- Use of interfaces: contract between class and outside world. Increases better design, promotes readability, promotes maintainability, increases flexibility.
Describe how the principle of "separation of concerns" has been applied to the main system tiers of a Java Platform, Enterprise Edition application. Tiers include client (both GUI and web), web (web container), business (EJB container), integration, and resource tiers.
Tiers of a Java EE System
- Client (GUI and Web): GUI directly interacts with web tier. Web uses browser, applets to interact with web server through HTTP. Responsible for direct presentation and interaction with user.
- Web components: processes web requests. Acts as mediator between clients and business components.
- Business: (solves domain-specific) business problems. The abstract business logic processing happens in this tier.
- Integration and Resource: handles connectivity with data stores and other (legacy) systems.
Describe how the principle of "separation of concerns" has been applied to the layers of a Java EE application. Layers include application, virtual platform (component APIs), application infrastructure (containers), enterprise services (operating system and virtualization), compute and storage, and the networking infrastructure layers.
Layers of a Java EE System
- Virtual platform (component APIs): used to implement/support business logic. API Components include: JavaBeans, Java Servlets, JavaServer Pages/Faces, Java Message Service API, Java Transaction API, etc.
- Application infrastructure (container): responsible for executing the application. Also provides services like: security, transactions, JNDI, and other connectivities.
- Enterprise services (OS): responsible for the execution environment of the application infrastructure. Provides computing time and access to (abstract) hardware.
- Compute and storage: the hardware or physical server. Provides computing power for the OS.
- Networking infrastructure: responsible for networking services.