1.4 EC principles
In this section, we look into more details about middleware, SOA, application architecture, and component-oriented programming. These are the principles for EC system and application design, implementation, and deployment.
1.4.1 The concepts of middleware
1.4.2 Concepts of SOA
Service-Oriented Architecture (SOA) is an architectural style to design, develop and deploy a group of applications that share some common services. SOA facilitates the development of modular business services that can be easily integrated and reused, thus creating a flexible and adaptable infrastructure.
SOA defines a way to make a software component reusable by making it as a service with service interfaces, so that the service can be called by other services or application components. The service interfaces provide loose coupling, they can be called with little or no knowledge of how the integration is implemented underneath.
SOA services can be built from scratch but are often created by exposing functions from existing systems with new service interfaces. Each service in an SOA embodies the code and data required to execute a business logic function. The service interfaces use common communication standards so that they can be incorporated into new applications effectively. For examples, SOA services are often exposed as Web Services using standard network protocols such as SOAP (simple object access protocol) or JSON to for service call. They are published to let developers find them and reuse them to assemble new applications.
Advantages of using SOA include:
- Reduce development time : SOA services are easily reused and can be rapidly assembled into new, composite applications.
- Lower cost: Reusable services reduce the number and internal complexity of enterprise services. Standardized services know how to work together, enabling disparate applications to quickly and easily connect.
- High-quality services: Increased service reuse creates high-quality services through multiple testing cycles from different service consumers. Fewer, reusable services provide greater control over corporate and IT governance policies, and reduce the overall compliance risk to an enterprise.
Middleware & SOA
SOA services are usually built on top of middleware, using the services provided by middleware and deployed on middleware web servers or application servers. On the other hand, the architecture of middleware software system is of SOA. SOA is for application design. Middleware focuses on the runtime environment to run applications.
1.4.3 Multi-tier architectures
In software engineering, multi-tier architecture (also called n-tier architecture or multi-layered architecture) is a client-server architecture in which components of different purposes (e.g., presentation, application processing, and data storage) are logically/physically separated.
The terms layer and tier are often used interchangeably. However layer is a logical structure view, and tier is a physical structure view. When tier is used, components of different tiers can be on different machines.
The n-tier architecture provides a model by which developers can create flexible applications using existing components, services, local and remotes. For example, Figure 1 shows the 4-tier architecture/model of enterprise applications. It is composed of client tier, presentation tier (web tier), application (business) logic tier, and data tier. The presentation tier (web tier), application (business) logic tier, and data tier are on server side, which are often viewed as 3-tier model when the sever side is concerned.

An integrated enterprise information system needs to support multiple n-tier applications. SOA and middleware provides a platform to run multiple multi-tiered applications. That is, components of tier of applications are deployed to run on middleware runtime on different machines and provides service interfaces. A multi-tiered application is built on these components. Components can be shared by different applications.
1.4.4 Concepts of Components
We have used the term component (or software component) many times. What is a component?
In the book, Component Software: Beyond Object-Oriented Programming (2002) Clemens Szyperski describe it as “A software component is a unit of composition with contractually specified interfaces and explicit context dependencies only. A software component can be deployed independently and is subject to composition by third parties”.
Conceptually, a component is a composition entity of a system or application with the following basic properties.
- Has interfaces to be used by other components.
- Has dependency context for using other components.
- Can be deployed independently on a runtime environment (container or application server)
- Can be assembled to create objects being used by applications. A component is instanced to an object at runtime after assembling dependency components.
The dependency of two components is defined by their interaction relation. Component A depends component B if B is used in A. The interaction is typically a procedure call of B in A. If A and B are on different machines or A cannot access B directly. Then A needs to make remote procedure call of B. This involves following basic steps.
- Component A connects the host of component B.
- Component A sends a request to find the component B.
- If found, component A sends a request to call component B’s procedure.
- Component B sends the result of procedure call to component A.
The communication between two components is referred to as inter-component communication. The inter-component communication is usually done through middleware services. Component models are technologies introduced to simplify the processing of component programming.
1.4.5 Component models
A component model defines the properties and methods that components must satisfy, the mechanisms for the composition of components. Several component models have been developed, e.g., Common Object Request Broker Architecture (CORBA) component model, Enterprise JavaBeans (EJB) model, Microsoft developed Distributed Component Object Model (DCOM). (supplementary link).
1.4.6 Component-oriented programming
You may have learned a few programming paradigms (styles) such as procedural programming, and objected-oriented programming. In this subsection, we look into the concepts of component-oriented programming.
1.4.7 Summary
In summary, PP, OOP, COP are the results of evolution of programming technology to address the increasing complexities of computing applications. OOP is an extension to PP, and COP is an extension to OOP by adding features for RPC/RMI and deployment. Choice programming style depends on application problems. For large, complex, and distributed EC applications, COP is the top choice.
We will study and practice COP with Java EE, use JBoss-AS (WildFly) as application server (middleware) for component/application deployment. In addition, we will also look into Spring framework in Lesson 7 and OSGi framework in Lesson 8 for alternative EC platform solutions.
References
1.4.8 Exercises
Self-quiz
Take a moment to review what you have read above. When you feel ready, take this self-quiz which does not count towards your grade but will help you to gauge your learning. Answer the questions posed below.