MTAT.05 07405.074 Introduction to Informatics Software ...MTAT.05 07405.074 Introduction to...
Transcript of MTAT.05 07405.074 Introduction to Informatics Software ...MTAT.05 07405.074 Introduction to...
MTAT 05 074MTAT.05.074Introduction to Informatics
Software Design: Flowcharts, Modular Design and Beyond
Marlon Dumas
marlon.dumas ät ut . ee
Course ObjectivesCourse Objectives
f f• To introduce the flowchart notation and one of its modern variants (BPMN)
• To introduce the concepts of modular design and• To introduce the concepts of modular design and information hiding
• To give a “flavor” of current research issues in the field of gsoftware systems design
2
Prelude: FlowchartsPrelude: Flowcharts
3http://fishbowl.pastiche.org/archives/pictures/life-lessons-flowchart.png
Boom Gate FlowchartFlowchart
4http://visl.technion.ac.il/projects/2004sum04/flowchart1.jpg
D.L. Parnas: On the Criteria to Be Used in Decomposing Systems into Modules
• One of the foundational papers in the field of software design
• At the time, implementation was the main concern, design was rather primitive, g p
• Major milestone in the emergence of OOP
5
Principles of Modular DesignPrinciples of Modular Design
• A module is a “piece of software” with a well defined interface
• It should be small and simple enough to be thoroughly understood and well programmedg y p g
• It is meant to hide design decision(s) from other modules in the systemmodules in the system
• Many ways to decompose a system into modules: which one works better?modules: which one works better?
6© Drexel University Software Engineering Research Group
What do we mean by “better”?What do we mean by better ?
• Productivity: individual modules can be developed concurrently – they are specified by their external behavior and interfacestheir external behavior and interfaces
• Changeability: individual modules should be able to be changed without radical impact to theable to be changed without radical impact to the rest of the system
• Comprehensibility: possible to study the p y p ysystems more abstractly – by understanding the modules prior to understanding the code
7© Drexel University Software Engineering Research Group
Parnas ExampleParnas Example
Input
CircularShift
Alphabetize
Output
8
Parnas Example: Flowchart ModularizationParnas Example: Flowchart Modularization
Input
CircularShift
Controller StAlphabetizing
Controller Storage(File/Memory)
Output
Criteria for Decomposition: Processing Steps
9© Drexel University Software Engineering Research Group
Parnas Example: Information Hiding Modularization
Input
Storage(Fil /M )Line Storage
Ci lController
(File/Memory)
CircularShifter
Alphabetizer
Output
Criteria for Decomposition: Information Hiding
10
p g
© Drexel University Software Engineering Research Group
Benefits of Information HidingBenefits of Information Hiding
• Productivity – Information Hiding interfaces are more abstract and have “less surface” better for concurrent developmentp
• Changeability – Information Hiding supports change much easier. The classical technique would require modifications to many modules to support mostmodifications to many modules to support most changes
• Comprehensibility – When using IH, less detailed understanding of the overall system is required inunderstanding of the overall system is required in order to understand a particular module
11© Drexel University Software Engineering Research Group
Exercise…
12http://visl.technion.ac.il/projects/2004sum04/flowchart1.jpg
Beyond Information Hiding –The Model-View Controller (MVC) Pattern
J W b A li ti D l t G ti 1 S l tJava Web Application Development – Generation 1: Servlets
http• Simple approach
towards web-based Servlet
httpsystem development– Servlet does not hide very
h i f timuch information• Manages the entire UI, all
of the control logic, all of the business logic, and any database interaction
13© Drexel University Software Engineering Research Group
The MVC Pattern (cont )The MVC Pattern (cont.)
J W b A li ti D l t G ti 2 S l t & JSP’
• Better separation of input
Java Web Application Development – Generation 2: Servlets & JSP’s
http
• Better separation of input and output processing
• Support for different outputServlet • Support for different output formats
• Servlet still “knows” too much
http
Servlet still knows too much about overall system– Its hard to reuse certain JSP
httpaspects of a system using a servlet/jsp solution
14© Drexel University Software Engineering Research Group
The MVC Pattern (cont )The MVC Pattern (cont.)
15Java Web Application Development – Generation 3: MVC Approach
Where’s the Model View Controller?Where s the Model, View, Controller?
Input
Storage(Fil /M )Line Storage
Ci lController
(File/Memory)
CircularShifter
Alphabetizer
Output
16© Drexel University Software Engineering Research Group
The Death of Flowcharts?The Death of Flowcharts?
• Does Parnas’s paper implies that flowcharts are useless?
17
Modern Manifestation of Flowcharts –Business Process Modeling Notation
Reject order
Check stock availability Send invoice
Confirm order
Ship goodsShip goods
18
Business Process Management (BPM)g ( )
Body of methods to design, analyze, execute and monitor business operations involving humans, software, information and physical artifacts using process models.
19
Examples of Business Process?p
• Order-to-Cash• Procure-to-Pay • Fault-to-Resolution
20
“My washing machine won’t work!”
Warranty?
TechnicianCall Centre
CustomerP t
Technician
CustomerCustomerPartsStoreService
Dispatch
LUE
fault-report-to-resolution process VAL
21© Michael Rosemann
BPM Research QuestionsBPM – Research Questions
• How to use process models to integrate systems consisting of dozens or hundreds of “modules”?H t d l t th i• How to use process models to assess the economic value of a systems or its modules?How to use process models to justify investing EUR 2• How to use process models to justify investing EUR 2 million into modernizing a system?How to use process models to prioritize changes to aHow to use process models to prioritize changes to a system?
• How to manage repositories consisting of hundreds or g p gthousands of process models?
22
Problem: Enterprise System Integration
SupplierPurchaser
OrderProcurement
InventoryInventoryManagement
Ordertracking
Order Response
Change Order
ProcurementPlanningManagementg
Change ConfirmationSupplierRelationshiFinancial
Approval Logistics
CustomerRelationshipsMShipment Notice
Invoice
pManagement
pp gManagement
In oicingAccounts Payable Invoicing
23
Services and Processes in Action
Purchaser’sSystem
Supplier’sSystem
Process
Order
Order Response
ServiceEndpointProcess
Instance
ServiceEndpoint
ProcessInstance
Process RecordOrder Response
Change Order
InstanceProcessInstance
Create
SendOrder
ReceiveOrder
Order
CheckStock
Change Response
Shipment Notice
Order
ProcessInstance
Stock
SendResponse
ReceiveResponse
ProcessResponse Shipment Notice
InvoiceProcessInstance
InstanceProcessInstanceProcess
Instance
Response
sta ce
Process Service Service Process
24
ProcessModel(s)
ServiceInterface(s)
ServiceInterface(s)
ProcessModel(s)
Service-Oriented Architecture (SOA)
Supplier
Inventory ControlService
Procurement Service
Invoicing Service
25
Modular Design Nowadays
• Closer communication between business & IT sharing common concepts and models
• Shift from “programming in the small” to “programming in the large” with emphasis on:– Integration– Adaptation– Configurationg
Functions, Procedures ObjectsModules ServicesComponentsProcedures ObjectsModules Components
26
Want to join the fun?Want to join the fun?
• http://sep.cs.ut.ee/• http://math.ut.ee/~dumas/p
27