Chapter_11_(new)
Chapter_11_(new)
COMPONENT-BASED
SOFTWARE ARCHITECTURE
Objectives
Introduce concepts of the software
components
Discuss UML notations for component-
based architectures
Introduce principles of component-based
design
Introduce quality attributes of component-
based design
Overview
• Divides the problem into sub-problems each
associated with component partitions.
• The interfaces of the components
– play important roles.
• The main motivation is
– component reusability;
• a component encapsulates functionality and behaviours of
a software element into a reusable and self-deployable
binary unit.
Overview…
• Designers can
– Use existing reusable components
• Commercial off the shelf (COTS)
• In house-developed
– May produce reusable components for future reuse.
• This increases overall system reliability
– Since the reliability of each individual component
enhances the reliability of the whole system via
reuse.
Overview…
• There are many standard component frameworks such as
– COM/DCOM,
– JavaBean,
– EJB,
– CORBA,
– .NET,
– Web services,
– Grid services.
• These target component technologies are widely adopted in local
desktop GUI application design
– Graphic JavaBean components,
– MS ActiveX components,
– COM components
Overview…
• The combination of service-oriented and
component technologies
– Getting more attention today
– include of
• Web services.
• Grid services.
What is A Component
• A component is
– A modular (i.e., cohesive)
– Deployable software package (i.e., portable)
• provide services to its clients;
• require services from other components
– Replaceable (e.g., plug-and-play)
– Reusable set of well-defined functionality
• that encapsulates its implementation and exporting it as a
higher-level interface.
• A component should be
– self-contained
– substitutable
• as long as its interface is unchanged.
Component-oriented design
• Is at a higher level of abstraction
– Than object-oriented design.
• A component is a higher-level concept
– incorporating more than one class.
• We identify all components and their
interfaces first
– instead of identifying classes and their
relationships.
Component-oriented design
Component-oriented advantages :
( compare with object-oriented ):
• Reduced by reuse of existing components.
– Time to market and
– The development cost
• Increased reliability
– With the reuse of the existing components.
Component-Based Design Principles
• Decomposed the software system into
– Reusable,
– cohesive and
– encapsulated component units.
• Each component
– Has its own interface
– Hides its detailed implementation.
• Each component can be seen as a black box
building block grouping functionalities and data
cohesively
Component-Based Design Principles
• Components interaction can take the form of
– Method invocations
– Asynchronous invocations
• Event listener and registrations
• Broadcasting, message driven interactions
– Data stream communications
– Other protocol specific interactions.
• The interaction type
– Is specified by the interfaces of the components.
• Figure 11.4 shows a component-based software
architecture.
• The manager component gets service support
from a single component (requests) and a
combined service component sub-system
(Service 1 and Service n), and the latter gets
data access service from a database.
• The whole software system is a set of
components connected by their interfaces.
• Each component may be replaced or updated
without any changes of the other part of the
system.
Component-Based Design Guidelines
• Map Use Case diagrams to the provided service
interfaces of the first-cut component specification.
• The business concept diagram depicts the relationships
of the business process entities in the domain,
– Extract these business process entities that can exist
independently
• without any associated dependency on other entities.
• The current component needs these provided services from
-> Can recognize and discover these independent entities as new
components.
Component-Based Design Guidelines
• A collaboration is any identifiable slice of functionality
– that describes a meaningful service, involving, in general,
several concepts.
• A collaboration can be seen as the implementation of a
use case!
– Thus, for each use case U there will be a collaboration diagram
“encapsulated” in a component C (one or more sequence
diagrams will be drawn to exercise the use case through
scenarios).
• Figure 11.5 illustrates the component implementation of
Use Case U (that happens to lay in between two other
use cases).
Component-based architecture
• Applicable domain:
– Applications where the interface contracts
between sub-systems are clear.
– Applications that require loose coupling
between the components and many reusable
components are available
– Suitable for the class library system
organization.
• .NET class library and Java API themselves are
built in component architecture.
Component-based architecture
• Benefits:
– Reusability of components
– System maintenance and evolution
• Easy to change and update the implementation without
affecting the rest of the system.
– Independency and flexible connectivity of components
– Independent development of components by different
group in parallel
– Productivity for the software development and future
software development
– Many OO design tools can also be used for
Component-Based Software Development.
Component-based architecture
• Limitations:
– Sometime it is difficult to find suitable
available components to reuse.
– Adaptation of components is always an issue.
– Not many component-oriented design tools
are available.