Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 46

Al Akhawayn University in Ifrane

School of Science and Engineering

CSC-3324 Software Engineering I

Chapter V:
The Design Phase

Prof. Driss Kettani

Spring 2021
I. Design: Where does it fit???
 The Typical Waterfall model embeds the following
steps:
 Feasibility study
 Conceptual Analysis
 Design
 Implementation
 Maintenance.

Soft. Eng. I, Sp. 17 Dr Driss Kettani, from I. Sommerville 2


II. General Purpose and Rational

 Describe HOW the conceptual solution will be transformed into a


Digital/Automation platform… From A to Z!
 This transformation/translation the conceptual solution shall be based on
the available/current/best:

1. Technology Stack (Platforms, Programming languages, Data sets,


third party apps/Plug-ins, DBMS, OS, Devices, etc.);

2. Implementation practices/configurations…
 Client constraints, Organizational constraints, the requirements, the
software engineer profile, etc…

Soft. Eng. I, Fall 20 Dr Driss Kettani, from I. Sommerville 3


III. Design Tasks / Activities
 System Architecture:
 Technology Stack...
 Physical Architecture…
 Software Architecture…
 Technology Stack...
 Decomposition…
 Functions Interfaces/Stereotypes…
 Functions Interactions Model (call, messages, events, etc.)…
 Logical data model...
 Design Patterns…
 User interfaces...
 Algorithms...
Soft. Eng. I, Fall 20 Dr Driss Kettani, from I. Sommerville 4
III.a. Technology Stack

 Machinery: type of machines, brands, devices, etc.


 Operating System,
 Connectivity and Network,
 Security,
 Programming Language,
 Web tools,
 DBMS,
 User Interface Development tool,
 Etc.

Soft. Eng. I, Sp. 18 Dr Driss Kettani, from I. Sommerville 5


III.b. System Architecture:
What is it?

The fundamental organization of a system,


embodied in its components, their relationships
to each other and the environment, and the
principles governing its design and evolution

Soft. Eng. I, Sp. 18 Dr Driss Kettani, from I. Sommerville 6


System Architecture: What is it again???
•A representation of a system, including a mapping of functionality onto hardware
and software components, a mapping of the software architecture onto the hardware
architecture, and human interaction with these components.[5]
•An architecture consists of the most important, pervasive, top-level, strategic

inventions, decisions, and their associated rationales about the overall structure (i.e.,
essential elements and their relationships) and associated characteristics and
behavior.[7]
•A description of the design and contents of a computer system. If documented, it

may include information such as a detailed inventory of current hardware, software


and networking capabilities; a description of long-range plans and priorities for future
purchases, and a plan for upgrading and/or replacing dated equipment and software.
[8]

•A formal description of a system, or a detailed plan of the system at component level


to guide its implementation.[9]
•The structure of components, their interrelationships, and the principles and

guidelines governing their design and evolution over time.[11]


Soft. Eng. I, Sp. 20 Dr Driss Kettani, from I. Sommerville 7
System Architecture: Evolution over time…

 Standalone…
 Mainframe…
 Client Server…
 N-tiers/Layered…
 Peer-to-Peer

Soft. Eng. I, Sp. 18 Dr Driss Kettani, from I. Sommerville 8


Standalone

Dr Driss Kettani, from I. Sommerville 9


Mainframe

Dr Driss Kettani, from I. Sommerville 10


Client Server

Dr Driss Kettani, from I. Sommerville 11


Peer to Peer

Dr Driss Kettani, from I. Sommerville 12


Guiding Principles in Todays’ Architecture

 Anyone, anytime, anywhere, any device,


any language, any service…
 Just click and get it…
 Plug&Play…
 BYOD…

Soft. Eng. I, Sp. 2020 Dr Driss Kettani, from I. Sommerville 13


SOFTWARE AS A SERVICE…

Soft. Eng. I, Fall 2020 Dr Driss Kettani, from I. Sommerville 14


System architecture: N-tiered Architecture…

 Typical BB/Modules/Layers:
 Presentation layer…
 Business Logic layer…
 Data layer…

 What is a Tier then???

Soft. Eng. I, Sp. 2020 Dr Driss Kettani, from I. Sommerville 15


Soft. Eng. I, Fall 2020 Dr Driss Kettani, from I. Sommerville 16
System architecture: N-tiered Architecture…

I. Presentation Layer/Tier:
1. The client presentation layer: In web applications the user
most often accesses this tier through a web browser, but other
entry points are possible, such as desktop applications or entirely
different devices using e.g. web services. 

2. The Server-Side Presentation Layer: contains the logic that


allows the user to navigate the application. In this layer the
presentation of the content to the user is determined.

Soft. Eng. I, Sp. 2020 Dr Driss Kettani, from I. Sommerville 17


System architecture: N-tiered Architecture…

II. This Server-Side Business Logic layer:


 Contains the business logic of the application.
 The functionality is divided into modular components
(sometimes called beans).
 Each module is responsible for a defined area of the
business logic, e.g. price calculation or customer data. 

Soft. Eng. I, Sp. 18 Dr Driss Kettani, from I. Sommerville 18


System architecture: N-tiered Architecture…

III. Enterprise Information System layer:


 The database Servers containing raw data /tables
 Warehouse of the Business
 Business Intelligence
 BigData /Cloud based data

Soft. Eng. I, Sp. 20 Dr Driss Kettani, from I. Sommerville 19


System architecture: N-tiered architecture…
J2E Platform…

 An open standard
 Umbrella for anything Java-related
 For designing, developing, assembling, and deploying
component-based enterprise applications
 Separation of business logic from presentation
 Reusability, enhanceability, scalability, interoperability

Soft. Eng. I, Sp. 20 Dr Driss Kettani, from I. Sommerville 20


What is J2E?
 J2E is a package of tools to develop, deploy and
support n-tiers architecture applications, using Java
as programming language…
 It mainly consists of:
 Java Servlets
 JavaServer Pages (JSP)
 Enterprise JavaBeans (EJB)

Soft. Eng. I, Sp. 19 21


Typical N-Tiers Architecture using J2E…

Soft. Eng. I, Sp. 19 Dr Driss Kettani, from I. Sommerville 22


Typical N-Tiers Architecture using J2E… The Big
Picture…

Soft. Eng. I, Fall 2018 Dr Driss Kettani, from I. Sommerville 23


Typical N-Tiers Architecture using J2E…
Web
Tier

Business
Tier
Soft. Eng. I, Fall 2018 Dr. Driss Kettani 24
Typical N-Tiers Architecture using J2E… 2
Options…

Soft. Eng. I, Sp. 17 25


Popular N-tiers Architecture IDEs
 J2EE SDK or J2E (Sun before Oracle now…)
 WebLogic (BEA before and Oracle now)
 Glassfish (Sun before and Oracle now…)
 JBoss (Red hat Inc. before and Oracle now…)
 NetBeans (Oracle)
 ECLIPSE (Eclipse Fondation / Sponsored by IBM)
 WebSphere (IBM)
 Visual Studio / .Net (Microsoft)
 Android Studio…

Soft. Eng. I, Fall 2019 26


Database Choices
 There are many popular database management
systems (DBMSs), including
 IBM DB2
 Oracle
 Microsoft SQL Server
 Microsoft Access
 MySQL

 Which one you should use depends on many factors,


including number of expected users, size of the
application and/or the database, budget, etc

Soft. Eng. I, Sp. 17 Dr Driss Kettani, from I. Sommerville 27


Business/Intelligence Tier Choices
 Almost anything is possible, with some common
choices being


Java –
Python
– PHP – C#

– C/C++ – .NET

– Perl – ASP

Soft. Eng. I, Sp. 21 Dr Driss Kettani, from I. Sommerville 28


Interface/presentation Choices
 Thin clients are generally web browsers, so the important choice
was made in the middle tier…
 For thick clients, we might use:
 Java : AWT, SWING, JavaFX, SWT, GWT, etc.
 C/C++ applications with GUI provided by
 MFC (Microsoft Foundation Classes)
 Tcl/Tk (Tool command language)
 GTK (Gimp ToolKit)
 Python: PySide, WxPython, PyQt

Soft. Eng. I, Sp. 2021 Dr Driss Kettani, from I. Sommerville 29


Examples
 You could build a 3-tier application which has
 Oracle DBMS, C++ middle, and C++/MFC client
 MySQL DBMS, PHP middle, and web browser client
(http://cse.unl.edu/~sscott/teach uses these choices)
 IBM DB2 DBMS, JSP middle, and Java applet client
 MySQL DBMS, EJB Business, JSP Remote Client, Java Applet client
 Microsoft SQL Server DBMS with ASP access control, ASP middle,
and web browser client

Soft. Eng. I, Spr. 2019 Dr Driss Kettani, from I. Sommerville 30


Set Functions Interface...
 For every function in the Specifications:
 Parameters (type, number, source);
 Local/Global Variables;
 Central/shared Database;
 Data structure…

Soft. Eng. I, Fall 2020 Dr Driss Kettani, from I. Sommerville 31


Functions Interface/Stereotype
GD1, GD2, … : DT
Function Check-In(Par1: DT, Par2:DT, …): Result: DT
LD1, LD2, …: DT
(

Algorithm (actual set of pseudo code instructions to be followed so


that the problem get solved!)

Check-In=Something
)

Soft. Eng. I, Fall 2020 Dr Driss Kettani, from I. Sommerville 32


Set the functions interactions
 Control models…
 Sequential (Centralized as called by Somerville)
control:
 The call/return model;
 The manager Model;
 Event driven programming…
 Messages based (OO) interaction…

Soft. Eng. I, Spr. 2019 Dr Driss Kettani, from I. Sommerville 33


Set the functions interactions… DFDs
 Data Flow Diagrams (DFDs) are a good way to
graphically represent the functions interactions...
 A DFD shows the processing steps as data flows
through a system...
 We may need separated DFDs and different levels of
abstractions to model all processes…
 Based on the CPMs and the functional architecture…
Soft. Eng. I, Spr. 2019 Dr Driss Kettani, from I. Sommerville 34
Set the functions interaction… DFDs

• A good DFD, must specify for each


function:
• The Input data,
• The entrance conditions (if ever),
• The output data,
• The exit conditions (if ever).

Soft. Eng. I, Spr. 2019 Dr Driss Kettani, from I. Sommerville 35


Set the functions Interaction… DFDs
Checked and
Completed Signed Signed Send to signed order
order form order form order form supplier + order
Order
notification
details + Complete Validate Record
blank order form order order
order form Adjust
Order available
Signed budget
details order form
Order
amount
+ account
details
Orders Budget
file file

Soft. Eng. I, Fall 2014 Dr Driss Kettani, from I. Sommerville 36


Building your logical data Model...

 Database (Relational: E/R- Objects:


UML…)
 Files...
 Arrays...
 Record…
 Files/Queues...

Soft. Eng. I, Fall 2018 Dr Driss Kettani, from I. Sommerville 37


Writing algorithms...
 What is an algorithm?
 What is the link with programming
languages?
 What is the link with software engineering?
 Basic algorithmic constructs…
 How to write a good algorithms?
 Strategies…

Soft. Eng. I, Fall 2014 Dr Driss Kettani, from I. Sommerville 38


Writing algorithms... Basic
algorithmic constructs…
 Alternatives:
 If Condition Then Sequence1 Else Sequence2…
 Case Condition Switch Sequence Break…
 Iterations:
 For IntervalValues Do Sequence…
 Repeat Sequence Until Condition…
 While Condition Do…
 Sequences:
 Begin Inst1 , Inst2, … , Instn End.

Soft. Eng. I, Fall 2014 Dr Driss Kettani, from I. Sommerville 39


Design the user interfaces...

See User Interface chapter slides...

Soft. Eng. I, Fall 2014 Dr Driss Kettani, from I. Sommerville 40


Structured/Quality Programming…
All variables used in the program must be:
 Assigned: must be given a value before being used;
 Initialized: must be given a value before being used
in a loop;
 Precise: must be given sufficient physical space in
accordance with their type;
 Documented: commented at declaration and at use
 Auto-descriptive: significant name…

Soft. Eng. I, Fall 2014 Dr Driss Kettani, from I. Sommerville 41


Structured/Quality Programming…
 All functions/Modules must be:
 Parametrable: all inputs must be given as
parameters;
 Encapsulated: does not use global variables;
 Generic /Abstract : perform a precise task
 that is understandable outside the technical context.
 Documented… minimum 10% ratio Code/Comment

Soft. Eng. I, Fall 2014 Dr Driss Kettani, from I. Sommerville 42


Structured/Quality Programming…
General rules:
 Indention…
 Alignment…
 One instruction per line…
 Avoid spaghetti expressions…
 No transtyping/Casting…
 No more than 2 nested Ifs…
 Use appropriate Iterative/alternative structures…

Soft. Eng. I, Fall 2014 Dr Driss Kettani, from I. Sommerville 43


 The next step of a typical water fall model is to start
implementing the project. The entire previous documents
that we have now starting from the feasibility study
document to the design document gave us the appropriate
tools to start implementing the system. At this right
moment we do have a complete, precise and consistent
requirement of data user and processes for the final
achievement of the project.
 Also we do have a clear conceptual architecture that is
easily understood by our client. The following step of the
design documents is the functional architecture which
provides the theoretical ideas described in the conceptual
architecture.

Soft. Eng. I, Fall 2006 Dr Driss Kettani, from I. Sommerville 44


 Now that we have all the needed functions, their
interfaces and their algorithms, we do have a clear
idea about how to implement the system. The
development of the DFDs gave us a good insight
about how functions interacts which also clarify the
realization of the system.
 As stated above, the algorithms designed by our
team would help us implement the system in a clear
and straightforward way. Using the appropriate
technology enablers would facilitate implementation
task for our team members. What remain ambiguous
at this stage is how to use JDatastore and become
familiar with them in order to efficiently embed them
in our system.

Soft. Eng. I, Fall 2006 Dr Driss Kettani, from I. Sommerville 45


 Define Design phase.

 Name two advantages of this phase.

 What is the importance of the Design Document?

 Why we cannot jump directly to the implementation part?

 Name the steps of the Design Document to produce a good product.

 Explain the importance of technology enablers.

 Define the functional architecture

 What are the functional and system architectures useful for?

 What is a function interface?

 Why do we need to design an ERD?


Soft. Eng. I, Fall 2006 Dr Driss Kettani, from I. Sommerville 46

You might also like