7 Giai Đoạn Của SDLC - Giống Như Xây Nhà Vậy!

7 Giai Đoạn Của SDLC - Giống Như Xây Nhà Vậy!

7 GIAI ĐOẠN CỦA SDLC - GIỐNG NHƯ XÂY NHÀ VẬY!

Chào các kỹ sư! 7 giai đoạn của SDLC bằng cách so sánh với việc xây nhà - cái mà ai cũng dễ hình dung.

Mở đầu: Tại sao phải có 7 bước?

Bạn có thể hỏi: "Sao phức tạp thế? Code xong chạy được là được rồi!"

Ừ, nếu làm app cá nhân thì OK. Nhưng nếu làm app banking cho 10 triệu users? Skip một bước = mất tiền tỷ đấy!

1. PLANNING - Lên kế hoạch xây nhà

Làm gì?

  • Xác định: Xây nhà cho ai? Bao nhiêu người ở? Ngân sách bao nhiêu?
  • Kiểm tra: Đất có xây được không? Pháp lý OK chưa?
  • Lên timeline: Bao lâu xong? Ai làm gì?

Trong software:

  • App này cho ai dùng? Giải quyết vấn đề gì?
  • Ngân sách bao nhiêu? Team bao nhiêu người?
  • Deadline khi nào? Có khả thi không?

Output: Project Charter (giống như hợp đồng xây nhà)

Diagram illustrating the Planning Phase for house construction, depicting key activities including requirements identification, feasibility study, budget planning, schedule planning, and team formation. Actors include stakeholders, the project manager, and the business analyst, with outputs including project charter and risk register.

Sai lầm thường gặp:

  • "Cứ làm đi, tính sau" → Hết tiền giữa chừng
  • Không tính rủi ro → Mưa bão delay 3 tháng
  • Team 3 người nhận dự án cần 10 người → Chết!

2. ANALYSIS - Thiết kế chi tiết ngôi nhà

Làm gì?

  • Hỏi kỹ gia chủ: Mấy phòng ngủ? Bếp kiểu gì? Có garage không?
  • Vẽ sơ đồ chi tiết từng phòng
  • Check xem yêu cầu có mâu thuẫn không

Trong software:

  • User cần features gì? Login như nào? Payment ra sao?
  • Vẽ wireframe, user flow
  • Functional vs Non-functional requirements

Output: SRS Document (bản vẽ chi tiết nhà)

A diagram illustrating the Analysis Phase of a project, showing the involvement of actors: End Users, Business Analyst, and System Analyst in the Analysis Process. The process includes gathering requirements, analyzing business processes, defining use cases, creating user stories, and validating requirements. The outputs of the process are the SRS Document, Use Case Diagrams, User Flow, and Wireframes. Notable functional and non-functional requirements are highlighted in the SRS Document.

Ví dụ thực tế: App food delivery cần:

  • Functional: Tìm quán, order, tracking
  • Non-functional: Load < 2 giây, chịu 1000 users cùng lúc

3. DESIGN - Thiết kế kiến trúc

Làm gì?

  • Kiến trúc sư vẽ bản thiết kế 3D
  • Chọn vật liệu: Gạch gì? Sơn màu gì?
  • Thiết kế hệ thống điện nước

Trong software:

  • Chọn tech stack: React hay Angular? MySQL hay MongoDB?
  • Vẽ system architecture
  • Design database schema

Output: Design Document (bản vẽ kiến trúc)

Diagram illustrating the design phase of a system architecture project, featuring roles such as Solution Architect, Tech Lead, and UI/UX Designer. It includes design activities like System Architecture, Database Design, API Design, UI/UX Design, and Tech Stack Selection, along with corresponding design outputs like Architecture Diagram, Database Schema, API Specification, UI Mockups, and Tech Stack Document. Additionally, there's a note detailing the chosen tech stack components, which include React for frontend, Node.js for backend, MongoDB for database, Redis for caching, and RabbitMQ for queuing.

Tips:

  • Đừng over-engineering! Nhà 2 người ở đừng xây 10 phòng
  • Think about scale: Sau này mở rộng có dễ không?

4. DEVELOPMENT - Xây nhà thôi!

Làm gì?

  • Đổ móng, xây tường, lợp mái
  • Làm theo đúng bản vẽ
  • Báo cáo tiến độ hàng ngày

Trong software:

  • Bắt đầu code!
  • Follow coding standards
  • Daily standup meeting

Output: Source code (ngôi nhà đang xây)

A diagram illustrating the Development Phase of software construction, featuring actors: Developer, Team Lead, and DevOps. It outlines the Development Process including steps like Setup Environment, Write Code, Unit Testing, Code Review, Integration, and CI/CD Pipeline. It also includes a Version Control section with Git Repository, Feature Branches, and Pull Requests, highlighting the workflow and interactions between these elements.

Best practices:

  • Git commit thường xuyên (như chụp ảnh tiến độ xây nhà)
  • Code review (thợ phụ check thợ chính)
  • Unit test (test từng viên gạch chắc chưa)

5. TESTING - Nghiệm thu nhà

Làm gì?

  • Check điện nước chạy không?
  • Cửa có đóng được không?
  • Có chỗ nào nứt, thấm không?

Trong software:

  • Test chức năng: Login được không? Payment work không?
  • Test performance: 1000 người dùng cùng lúc OK không?
  • Test security: Có lỗ hổng không?

Output: Test Report (biên bản nghiệm thu)

A UML diagram illustrating the Testing Phase in software testing, featuring actors such as QA Engineer, Test Lead, and End User. It includes Testing Levels like Unit Testing, Integration Testing, System Testing, and UAT Testing, along with Test Types such as Functional Test, Performance Test, Security Test, and Usability Test. The diagram highlights the flow of responsibilities and outputs like Test Reports, Bug Reports, and Test Metrics, with additional notes on test coverage, bugs found, and pass rate.

Levels of testing:

  1. Unit test - Test từng viên gạch
  2. Integration test - Test tường có dính với nhau không
  3. System test - Test cả ngôi nhà
  4. UAT - Gia chủ test thử

6. DEPLOYMENT - Dọn vào nhà mới

Làm gì?

  • Chuyển đồ đạc vào
  • Setup điện nước internet
  • Hướng dẫn mọi người dùng thiết bị

Trong software:

  • Deploy lên server production
  • Setup monitoring, backup
  • Training users

Output: Live application! (Nhà ở được rồi!)

A diagram illustrating the deployment phase of an application. It includes actors such as DevOps Engineer, System Admin, and Support Team, alongside deployment steps like preparing production, database migration, deploying the application, configuring services, setting up monitoring, and user training. It outlines three deployment strategies: Blue-Green, Canary Release, and Rolling Update. The production environment consists of web servers, a database, and a message queue. The diagram notes the Canary Release strategy details for managing traffic and monitoring during rollout.

Chiến thuật an toàn:

  • Soft launch: Cho 10% users dùng trước
  • Rollback plan: Có vấn đề thì quay về version cũ
  • Monitor 24/7 tuần đầu

7. MAINTENANCE - Bảo trì nhà

Làm gì?

  • Sửa chỗ hỏng: Ống nước bể, bóng đèn cháy
  • Nâng cấp: Sơn lại nhà, thêm phòng
  • Bảo dưỡng định kỳ

Trong software:

  • Fix bugs users report
  • Thêm features mới
  • Update security patches
  • Optimize performance

Output: Updates, patches (nhà luôn mới)

Flowchart depicting the Maintenance Phase of a system with actors: Support Team, Developer, and User. It outlines four maintenance types: Corrective, Adaptive, Perfective, and Preventive, each linked to specific activities such as Bug Fixing and Feature Updates. Monitoring includes uptime and performance metrics.

Fun fact: 60-80% cost của software là ở Maintenance!

Tổng kết: Skip được bước nào không?

KHÔNG! Mỗi bước đều quan trọng:

  • Skip Planning = Xây nhà không phép → Bị phạt
  • Skip Analysis = Xây xong gia chủ không thích → Đập đi xây lại
  • Skip Design = Xây lung tung → Nhà xấu, không tối ưu
  • Skip Testing = Ở được 1 tháng nhà sập → Kiện tụng
  • Skip Deployment = Nhà đẹp nhưng không ở được
  • Skip Maintenance = Nhà xuống cấp nhanh

Lời khuyên cuối

  1. Làm đủ 7 bước ngay cả với project nhỏ - Tạo thói quen tốt
  2. Document everything - Sau này maintain dễ dàng
  3. Communication is key - Nói chuyện với stakeholders thường xuyên
  4. Learn from mistakes - Sai ở project này, đừng sai ở project sau

Bài sau: Mình sẽ so sánh Waterfall vs Agile - cái nào phù hợp với project của bạn? Hint: Không phải lúc nào Agile cũng tốt đâu!