156 Internet of Things
machine can be understood as a machine that is capable of defining various states of an object
and these states can be controlled by internal or external events. These diagrams are used to
model the lifetime of an object.
Why Do We Use State Chart Diagrams?
The State Chart Diagrams come under the five other UML diagrams utilized to model the
dynamic nature of the system. State chart diagrams are very useful in modeling reactive systems.
A reactive system is characterized by a system that could respond to internal or external events.
These diagrams help us to explain the flow of control from one state to another. A state can be
understood as a condition under which an object can exist and it can change itself under the trig-
ger of some event. Thus, a State chart diagram could be used to portray the lifetime of an object
from its birth to death. Some people also use these diagrams for forward and reverse engineering
of a system. However, the main purpose remains the same as modeling reactive systems.
We can use a State Chart Diagram in the following:
It can be used to portray the dynamic aspect of a system.
It can model the lifetime of a reactive system.
It can describe how an object transformed into different states during its lifetime.
It can explain a state machine to portray the state of an object.
How Can We Draw a State Chart Diagram?
So far, we understood the motive of State Chart Diagram. We should also know that the
emphasis is also drawn on the state changes by some internal and external event. These states
of the objects are very important to evaluate and implement them accurately. States can be
classified as the condition of objects when a particular event takes place.
We must clarify on these three points:
Identifying the important objects to be evaluated,
Identifying the states, and
Identifying the events.
The State Chart Diagrams give control to model states and also the events that are operating on
the system. When we are implementing a system, it is very crucial to know the dierent states of
an object during its lifetime, for this requirement we use State Chart Diagrams. These diagrams
are mainly utilized to analyze the object states that are influenced by the events. Together this
analysis of the objects is very helpful in order to understand the behavior of the system.
Component Diagrams
Component diagrams are a bit dierent from the other UML diagrams in terms of behavior
and nature. They are very helpful in breaking down the actual system under development into
dierent high levels of functionality. Each component in the system has one clear goal and
only interacts with other essential elements. Component diagrams are utilized to portray the
physical attributes of a system. In these physical attributes, we include elements such as librar-
ies, executable, files, and documents. These diagrams are utilized to envision the organization
and relationships between components in a system. We can also use such diagrams to create
executable systems.
Internet_of_Things_CH06_pp141-170.indd 156 9/3/2019 10:14:20 AM
Chapter 6 Essential Elements for Designing IoT Architecture 157
Card Reader
ATM Network
ATM
ATM Transaction
Cash Dispenser
Card validator
Customer Console
Bank
DataBase
Account Information
Client Deskto
pClient Desktop Transaction
Why Do We Use Component Diagrams?
Component diagrams do not explain the functionality of the system, instead they help us to
explain the components used to create such functionalities. These components could be
packages, libraries, files etc. These diagrams can also be explained as a fixed implementation
Internet_of_Things_CH06_pp141-170.indd 157 9/3/2019 10:14:20 AM
158 Internet of Things
view of a system. Fixed implementation serves as the organization of the components at a
particular time. Thus, one single component diagram won’t be sucient to represent the entire
system, but a collection of component diagrams could be used to represent the whole.
The Main Purpose behind Using a Component Diagram:
It could help us to visualize the various components of a system.
By using forward and reverse engineering, we can construct executable.
They help us to explain the organization and relationships between the components.
How Do We Draw a Component Diagram?
Component diagrams are prepared well in advance to visualize the best implementation details.
In the early stages, the system is developed by using dierent UML diagrams and once its artifacts
are prepared, then we use the component diagrams to a brief idea of the implementation. The
application cannot be implemented eciently without the use of these diagrams. Component
diagrams come very handy when dealing with other aspects such as application performance
and maintenance.
Before Drawing a Component Diagram, We Must Identify the Following Artifacts:
The nature of the files utilized in the system.
Libraries and other artifacts related to the application.
Relationships between the artifacts.
Once You Identify the Artifacts, We Must Remember the Following Points:
Using a proper name to identify the component for which we are going to draw the
Component diagram,
Creating a mental layout before laying hands on the tools, and
Using notes to highlight important points.
We can say that Component diagrams are useful to explain the organization of the components
in a system. An organization can further be explained as the position of the components in
a system. Together these components are arranged in a special order to meet the system
requirements. From implementation perspective, Component diagrams are very important.
Thus, we must have the proper knowledge of the component details.
How Can We Use Component Diagrams?
We can use them to prepare the model of the database schema.
They can be used to portray the executable of an application.
We can also model the source code of the system by using them.
Advantages of Using Component Diagrams
It might seem a bit complicated to use component diagrams. However, their advantages are truly
invaluable when it comes to building a healthy system.
Component diagrams help to predict the system’s physical structure.
By using them, you can pay more attention to the system’s components and how they
relate to each other.
You will emphasize better service behavior as it relates to the interface.
Internet_of_Things_CH06_pp141-170.indd 158 9/3/2019 10:14:20 AM
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.213.128