บทที่ 2 กระบวนการพัฒนาซอฟต์แวร ์(Software process)
วิชา วิศวกรรมซอฟต์แวร์ (04-06-306-202)
เอกสารประกอบการสอน วิชา วิศวกรรมซอฟต์แวร์ (04-06-306-202) 1
วัตถุประสงค์การเรียนรู ้
• เพื่อให้ผู้เรียนมีความรู้ความเข้าใจเกี่ยวกับแนวคิดกระบวนการผลิตซอฟต์แวร์ และแบบจ าลองกระบวนการผลิตซอฟต์แวร์
• เพื่อให้ผู้เรียนมีความรู้ความเข้าใจเกี่ยวกับกลุ่มของกิจกรรมที่เกี่ยวข้องกันที่เกิดขึ้นในการผลิตซอฟต์แวร์
2 เอกสารประกอบการสอน วิชา วิศวกรรมซอฟต์แวร์ (04-06-306-202)
หัวข้อ
• บทน า (Overview)
• กระบวนการผลิตซอฟต์แวร ์
• ความสัมพันธ์ระหว่างกระบวนการผลิตซอฟต์แวร์และวิศวกรรม
• แบบจ าลองกระบวนการผลิตซอฟต์แวร์
• สรุป (Summary)
3 เอกสารประกอบการสอน วิชา วิศวกรรมซอฟต์แวร์ (04-06-306-202)
บทน า (Overview)
Phase Process Software Process
การสร้างแบบจ าลองกระบวนการผลิตซอฟต์แวร์ (Software Process Model)
ข้อมูลความต้องการ
หลักวิชาการวิศวกรรม
กระบวนการ
4 เอกสารประกอบการสอน วิชา วิศวกรรมซอฟต์แวร์ (04-06-306-202)
กระบวนการผลิตซอฟต์แวร์
• กระบวนการ (Process) เป็นกลุ่มของขั้นตอนการท างาน ประกอบด้วย กิจกรรม ข้อจ ากัด และทรัพยากรที่ใช้ผลิตผลลัพธ์
5
ระบุกิจกรรมให้ชัดเจน ใช้ทรัพยากรภายใต้ข้อจ ากัด
ต่าง ๆ
ประกอบข้ึนจากกระบวนการย่อยอื่น ที่
สัมพันธ์กัน
ทุกกิจกรรมมีเงื่อนไข ในการเริ่มต้นและสิ้นสุด
ทุกกิจกรรมมีเป้าหมายและหลักการท่ีชัดเจน
เงื่อนไขสามารถน ามาใช้ควบคุมการด าเนินกิจกรรม ทรัพยากร หรือผลิตภัณฑ ์
Software product และ Software process
เอกสารประกอบการสอน วิชา วิศวกรรมซอฟต์แวร์ (04-06-306-202)
กระบวนการผลิตซอฟต์แวร์ (ต่อ)
• Software process [Pressman, 2010]
– กรอบการด าเนินกิจกรรมในการสร้างซอฟต์แวร์ที่มีคุณภาพ • Software process [Sommerville, 2011]
– กลุ่มของกิจกรรมและผลลพัธ์ของแต่ละกจิกรรมเพื่อการผลิตซอฟต์แวร์ โดยมีกิจกรรมพื้นฐาน 4 กิจกรรม คือ Software specification, Software design and implementation, Software validation และ Software evolution
• Software process – กลุ่มของกิจกรรมที่เกี่ยวเนื่องกันในการผลิตซอฟต์แวร์ให้ได้คุณภาพ โดยมีการ
ก าหนดล าดับขั้นตอนไว้อย่างชัดเจนและสอดคล้องกัน ซึ่งท าให้เกิดประโยชน์ในการน าไปใช้งานต่อ
6 เอกสารประกอบการสอน วิชา วิศวกรรมซอฟต์แวร์ (04-06-306-202)
กระบวนการ ผลิตซอฟต์แวร์และวิศวกรรมซอฟต์แวร์
กระบวนการผลิตซอฟต์แวร์
Framework
Software engineering
Quality
กระบวนการวิศวกรรมซอฟต์แวร์
Implementation
Assessment
Measurement
Management
Change
Improvement
7 เอกสารประกอบการสอน วิชา วิศวกรรมซอฟต์แวร์ (04-06-306-202)
Layered Technology
CASE (Computer-Aided Software Engineering)
Quality
Tools
Methods Process
8 เอกสารประกอบการสอน วิชา วิศวกรรมซอฟต์แวร์ (04-06-306-202)
แบบจ าลองกระบวนการผลิตซอฟต์แวร์
• Software process model
– การจ าลองภาพของกระบวนการผลิตซอฟต์แวร์ เพื่อให้เห็นถึงการจัดโครงสร้างล าดับขั้นตอนของกระบวนการที่แตกต่างกัน
• พื้นฐานแบบจ าลองกระบวนการผลิตซอฟต์แวร์มี 3 รูปแบบ ดังนี้
• Waterfall Model
• Incremental Development
• Reuse-Oriented Software Engineering
9 เอกสารประกอบการสอน วิชา วิศวกรรมซอฟต์แวร์ (04-06-306-202)
Waterfall model
The waterfall model This takes the fundamental process activities of
specification, development, validation, and evolution and represents them as
separate process phases such as requirements specification, software
design, implementation, testing, and so on.
10 เอกสารประกอบการสอน วิชา วิศวกรรมซอฟต์แวร์ (04-06-306-202)
Incremental Development
• This approach interleaves the activities of specification, development, and
validation.
• The system is developed as a series of versions (increments), with each version adding functionality to the previous version.
Source: http://www.cs.ccsu.edu/
11 เอกสารประกอบการสอน วิชา วิศวกรรมซอฟต์แวร์ (04-06-306-202)
Reuse-Oriented Software Engineering
• This approach is based on the existence of a significant number of
reusable components. The system development process focuses on
integrating these components into a system rather than developing them from scratch.
12
There are three types of software component that may be used in a reuse-
oriented process:
1. Web services
2. Collections of objects, component framework such as .NET or J2EE. 3. Stand-alone software systems
เอกสารประกอบการสอน วิชา วิศวกรรมซอฟต์แวร์ (04-06-306-202)
แบบจ าลองกระบวนการผลิตซอฟต์แวร์ (ต่อ)
• ปัจจุบันมีการปรับกระบวนการผลิตซอฟต์แวร์ให้มีประสิทธิภาพมากขึ้น จึงท าให้แบบจ าลองมีรูปแบบต่างกัน ดังนี้
– Prototype Model: PRM
– Incremental Model: INM
– Boehm Spiral Model: BSM
13 เอกสารประกอบการสอน วิชา วิศวกรรมซอฟต์แวร์ (04-06-306-202)
Prototype Model: PRM
A software prototype can be used in a software development process to help anticipate changes that may be required: 1. In the requirements engineering process, a prototype can help with the elicitation and validation of system requirements. 2. In the system design process, a prototype can be used to explore particular software solutions and to support user interface design.
However, this is usually unwise: 1. It may be impossible to tune the prototype to meet non-functional requirements. 2. Rapid change during development inevitably means that the prototype is undocumented, prototype code, and not good enough for long-term maintenance. 3. The changes made during prototype development will probably have degraded the system structure. The system will be difficult and expensive to maintain. 4. Organizational quality standards are normally relaxed for prototype development.
15 เอกสารประกอบการสอน วิชา วิศวกรรมซอฟต์แวร์ (04-06-306-202)
Incremental Model: INM
- Cost of accommodating changing customer requirements is reduced
- Easier to get customer feedback on the development work that has
been done
- More rapid delivery and deployment of useful software to the customer is possible, even if all of the functionality has not been included
17 เอกสารประกอบการสอน วิชา วิศวกรรมซอฟต์แวร์ (04-06-306-202)
Boehm Spiral Model: BSM LSM + RAD + INM
Risk Management
18 เอกสารประกอบการสอน วิชา วิศวกรรมซอฟต์แวร์ (04-06-306-202)
กระบวนการผลิตซอฟต์แวร์: ส าหรับวิธีการวิเคราะห์และออกแบบเชิงวัตถุ
• Object-oriented analysis and design ใช้ภาษา Unified Modeling Language: UML ซึ่งมีตัวอย่างกระบวนการ ดังน้ี
– Rational Unified Process: RUP
– Component-based Software Engineering: CBSE
– Agile Process • Extreme Programming: XP
• SCRUM
19 เอกสารประกอบการสอน วิชา วิศวกรรมซอฟต์แวร์ (04-06-306-202)
Rational Unified Process: RUP Migration Models: Iteration + Evolution + Increment
3 Perspective: 1) Dynamic 2) Static 3) Practice
Source: http://www.mindcrafts.ch/
20 เอกสารประกอบการสอน วิชา วิศวกรรมซอฟต์แวร์ (04-06-306-202)
Static Workflows in RUP
21 เอกสารประกอบการสอน วิชา วิศวกรรมซอฟต์แวร์ (04-06-306-202)
Component-based Software Engineering: CBSE
แหล่งจัดหา Component
1) COTS 2) ในองค์กร
22 เอกสารประกอบการสอน วิชา วิศวกรรมซอฟต์แวร์ (04-06-306-202)
Agile Process
• ก าหนดขึ้นตามวิธีปฏิบัติของ Agile (Agile Manifesto)
• แตกแขนงมาจาก RAD มีความเป็นอิสระ และคล่องตัวสูง
• ตัวอย่าง
– Extreme Programming: XP
– SCRUM
23 เอกสารประกอบการสอน วิชา วิศวกรรมซอฟต์แวร์ (04-06-306-202)
24
Agile methods have been very successful for some types of system development:
1. Product development where a software company is developing a small or
medium-sized product for sale.
2. Custom system development within an organization, where there is a clear commitment
from the customer to become involved in the development process and where there are not a lot of external rules and regulations that affect the software.
A plan-driven software process:
• Support incremental development and
delivery
• Requirements and plan the design and
development phase as a series of
increments
• not inevitably code-focused, it may
produce some design documentation
• Balance between a plan-based and an agile approach
เอกสารประกอบการสอน วิชา วิศวกรรมซอฟต์แวร์ (04-06-306-202)
The Principles of Agile Methods
25 เอกสารประกอบการสอน วิชา วิศวกรรมซอฟต์แวร์ (04-06-306-202)
Extreme Programming: XP
Coding: - Pair programming Testing: - Unit test - Acceptance test
26 เอกสารประกอบการสอน วิชา วิศวกรรมซอฟต์แวร์ (04-06-306-202)
Extreme programming practices
เอกสารประกอบการสอน วิชา วิศวกรรมซอฟต์แวร์ (04-06-306-202)
27
SCRUM
Scrum Team
Product Owner
Scrum Master
• Sprint: วิธีการท างาน 2-4 สัปดาห์ • Scrum: ไม่เกิน 20 นาที
28 เอกสารประกอบการสอน วิชา วิศวกรรมซอฟต์แวร์ (04-06-306-202)
การประยุกต์ใช้กระบวนการผลิตซอฟต์แวร์
• กระบวนการผลิตมีขั้นตอนที่ส าคัญๆ ดังนี ้• Analysis, Design, Coding, และ Test
• ก่อนเริ่มโครงการ วิศวกรซอฟต์แวร์ควรพิจารณาเลือกแบบจ าลองที่เหมาะสม
• โดยต้องพิจารณาปัจจัยต่างๆ ดังนี ้• ความต้องการ ความเสี่ยง เทคนิคการใช้งาน ขอบเขตองค์ความรู้ และจุด
มุ่งเน้น
29 เอกสารประกอบการสอน วิชา วิศวกรรมซอฟต์แวร์ (04-06-306-202)
สรุป
• Software process กระบวนการที่ประกอบไปด้วยกิจกรรมที่สัมพันธ์กันในการผลิตซอฟต์แวร์ให้ได้คุณภาพ
• Software engineering process การประยุกต์หลักวิชาทางด้านวิศวกรรมและสหวิทยาการจัดการด้านอื่นๆ ในขั้นตอนต่างๆ ของกระบวนการผลิต
• Software process model แบบจ าลองการผลิตซอฟต์แวร์มีพื้นฐานจากแบบจ าลอง 3 ชนิด คือ Waterfall, Evolution Model, และ Reuse-Oriented Software Engineering
30 เอกสารประกอบการสอน วิชา วิศวกรรมซอฟต์แวร์ (04-06-306-202)
กิจกรรมท้ายบท
• Giving reasons for your answer based on the type of system being developed, suggest the most appropriate generic software process model that might be used as a basis for managing the development of the following systems: – A system to control anti-lock braking in a car – A virtual reality system to support software maintenance – A university accounting system that replaces an existing
system – An interactive travel planning system that helps users plan
journeys with the lowest environmental impact
31 เอกสารประกอบการสอน วิชา วิศวกรรมซอฟต์แวร์ (04-06-306-202)
เอกสารอ้างอิง
• กิตติ ภักดัวัฒนะกุล, วิศวกรรมซอฟต์แวร์ (Software Engineering), กรุงเทพฯ: เคทีพี คอมพ์ แอนด์ คอนซัลท์, 2552
• Lan Sommerville, Software Engineering Ninth Edition, Pearson Education, Inc., publishing as Addison-Wesley, 2011.
32 เอกสารประกอบการสอน วิชา วิศวกรรมซอฟต์แวร์ (04-06-306-202)