SE Ch3 - Software Design
SE Ch3 - Software Design
Software design
Outline
• Overview of software design
• Architectural design
• Database design
• Interface design
Overview of software design
Overview
Design Activities
• Architectural Design: Defines the overall structure of
the system, its main components (subsystems or
modules), their relationships, and how they are
implemented.
• Database Design : Design the data structure for the
system and how it is represented in the database.
• Interface Design: Define interfaces between system
components.
• Component selection and design: Look for reusable
components. If not available will design these
components.
Principles of design
Bad Good
Cohesion
Separate display and interaction of system data. The system is structured into
three logical components that interact with each other.
The Model component manages system data and the operations associated
with that data.
The View component defines and manages how data is presented (displayed)
to the user.
The Controller component manages user interactions and passes these
interactions to the View and Model respectively.
MVC model - Example
MVC model
Pros:
• Concurrent (parallel) development : Multiple developers
(devs) can work on Model, View and Controller simultaneously.
• High cohesion : MVC allows logical grouping of related actions
in a Controller, Data manipulation of a table (CRUD) in a Model.
• Loose Coupling: The essence of the MVC framework is that
there is a low coupling between Model, View and Controller.
• Easy to maintain: Easy to change and add features later.
Cons:
• Increases programming complexity and requires more
programmer skills. Not suitable for applications with simple
interaction and data models.
Repository (Data centric) model
Pros:
• Components can be independent, regardless of the existence
of other components. Changes made by one component can
be propagated to all other components.
• All data can be managed consistently and with integrity
because it's all in one place.
Cons:
• When the Repository has problems (security, errors) it will
affect all subsystems.
Client – Server model
Pros:
• The main advantage of this model is that the service servers
can be distributed on the same network.
• Easily add or upgrade services without affecting other
services.
Cons:
• Vulnerable to Denial of Service (DOS, DDOS) attacks.
• Data may be duplicated, redundant
Layered model
Pros:
• Allows replacing the entire layer as long as communication is
maintained.
• Redundancy schemes (e.g., authentication) can be provided in each
layer to increase system reliability.
Cons:
• In practice, it is often difficult to clearly separate classes, and a
high-level layer may have to interact "beyond the level".
Database design
Database design levels
Bảng NhanVienBienChe
Bảng NhanVienCongNhat
Convert class diagram to relational DB
inheritance relation
Convert class diagram to relational DB
inheritance relation - Example
Interface Design
User Interface Design
User Interface
The user interface needs to be designed to
match the skills, experience and expectations
of its users.
System users often judge a system by its
interface rather than its functionality.
A poor system interface can cause users to
make very serious errors..
User Interface Design
Human factor in interface design
• Human's immediate memory capacity is limited.
• System users' needs
• Experience, Competence
• Ability to use keyboard, mouse,…
• Reaction speed, memory ability
• Interests, cultures, ages
• Colors, languages, symbols
• Different types of interactions: images, texts, sounds, etc
UI Design
Easy to learn?
Easy to use?
Easy to understand?
UI Design
Reduce demand
. on short-term memory.
Establish meaningful defaults.
Define shortcuts that are intuitive.
The visual layout of the interface should be based on a
real world metaphor.
Disclose information in a progressive fashion
Make the Interface Consistent
1 2 3 4
Using information Define events (user Depict each Indicate how the
developed during actions) that will interface state as it user interprets the
interface analysis, cause the state of will actually look to state of the system
define interface the user interface to the end-user. from information
objects and actions change. Model this provided through
(operations). behavior. the interface.
Design Issues
■ Response time
■ Help facilities
■ Error handling
■ Menu and command labeling
■ Application accessibility
■ Internationalization (I18n)
Web and Mobile App Interface Design
■ Where am I? The interface should
■ Provide an indication of the Web or Mobie App that has been
accessed
■ Inform the user of her location in the content hierarchy.
■ What can I do now? The interface should always help
the user understand his current options
■ What functions are available?
■ What links are live?
■ What content is relevant?
■ Where have I been, where am I going? The interface
must facilitate navigation.
■ Provide a “map” (implemented in a way that is easy to
understand) of where the user has been and what paths may be
taken to move elsewhere within the Web or Mobile App.
Interface Design Principles-I
■ Anticipation—A Web or Mobile App should be designed
so that it anticipates/predict the use’s next move.
■ Communication—The interface should communicate the
status of any activity initiated by the user
■ Consistency—The use of navigation controls, menus,
icons, and aesthetics (e.g., color, shape, layout)
■ Controlled autonomy—The interface should facilitate
user movement throughout the Web or Mobile App, but it
should do so in a manner that enforces navigation
conventions that have been established for the
application.
■ Efficiency—The design of the Web or Mobile App and its
interface should optimize the user’s work efficiency, not
the efficiency of the software engineer who designs and
builds it or the client-server environment that executes it.
Interface Design Principles-II
■ Focus—The Web or Mobile App interface (and the content it
presents) should stay focused on the user task(s) at hand.
■ Fitt’s Law—“The time to acquire a target is a function of the
distance to and size of the target.”
■ Human interface objects—A vast library of reusable human
interface objects has been developed for Web or Mobile Apps.
■ Latency reduction—The Web or Mobile App should use multi-
tasking in a way that lets the user proceed with work as if the
operation has been completed.
■ Learnability— A Web or Mobile App interface should be
designed to minimize learning time, and once learned, to
minimize relearning required when the App is revisited.
Interface Design Principles-III
■ Maintain work product integrity—A work product
(e.g., a form completed by the user, a user specified list)
must be automatically saved so that it will not be lost if
an error occurs.
■ Readability—All information presented through the
interface should be readable by young and old.
■ Track state—When appropriate, the state of the user
interaction should be tracked and stored so that a user
can logoff and return later to pick up where she left off.
■ Visible navigation—A well-designed Web or Mobile
App interface provides “the illusion that users are in the
same place, with the work brought to them.”
Interface Design Workflow-I
■ Review information contained in the analysis
model and refine as required.
■ Develop a rough sketch of the Web or Mobile
App interface layout.
■ Map user objectives into specific interface
actions.
■ Define a set of user tasks that are associated
with each action.
■ Storyboard screen images for each interface
action.
■ Refine interface layout and storyboards using
input from aesthetic design.
Interface Design Workflow-I
■ Review information contained in the analysis
model and refine as required.
■ Develop a rough sketch of the Web or Mobile
App interface layout.
■ Map user objectives into specific interface
actions.
■ Define a set of user tasks that are associated
with each action.
■ Storyboard screen images for each interface
action.
■ Refine interface layout and storyboards using
input from aesthetic design.
Mapping User Objectives
Interface Design Workflow-II
https://cantunsee.space/