Design Principles

เพิ่งแนะนำทีม modeler ของ DeepOcean ให้ศึกษา Design Principles เลยเอามาฝากในกลุ่มด้วยครับ

หาเวลาเข้าไปอ่านและศึกษา design principle กันครับ ผมเชื่อว่าจะช่วยให้ออกแบบและเขียนโค้ด bot & model และส่วนอื่นๆ ได้ดีมากเลย

72 Design Principles & 60 Architectural Tactics
https://minimallife.wordpress.com/2012/06/10/72-design-principles-กับ-60-software-architectural-tactics/

Intro to Design Principles and Architectural Tactics
https://minimallife.wordpress.com/2013/12/12/intro-to-design-principles-architectural-tactics/

General & Object-Orientation Design Principles
https://minimallife.wordpress.com/2014/09/25/general-oo-design-principles/

General Architectural Design Principles
https://minimallife.wordpress.com/2014/09/25/general-architectural-design-principles/

Software Architectural Design Principles
https://minimallife.wordpress.com/2014/09/25/software-architectural-design-principles/

==================

หาเวลาอ่านและจินตนาการตามในแต่ละ principle กันเองนะครับ ไม่เข้าใจตัวไหนให้จดเก็บไว้ แล้วไว้นัดปรึกษาและอธิบายออนไลน์กันครับ

design principle ไม่มีตัวอย่างโค้ด ไม่มีรูปอธิบาย เป็นการฝึก ความคิดและจินตนาการ ล้วนๆ แต่ละตัวต้องขบคิด จินตนาการให้เห็นภาพ แล้วลองนึกถึงเรื่องราวรอบๆ ตัวง่ายๆ เปรียบเทียบก็ได้

เช่น

  • นาย ก เป็นนักกฏหมายที่เคร่งครัดกับกฏในตำรากฏหมายมาก แสดงว่ามี Coupling สูง Cohesion น้อย ทำให้นาย ก ทำงานแบบไม่ยืดหยุ่นต่อสถานการณ์เท่าไหร่
  • นาย ข เวลาทานอาหารจีนใช้ตะเกียบ ทานอาหารทั่วไปใช้ช้อน ทานอาหารอินเดียใช้มือ แสดงว่า นาย ข มี Polymorphism ที่ดี สามารถ override method ได้อย่าง dynamic ไปตามสถานการณ์ (context)

Leave a Reply

Discover more from

Subscribe now to keep reading and get access to the full archive.

Continue reading