DEV Community

Perm Chao
Perm Chao

Posted on • Edited on

1

มุมมองของสถาปัตยกรรมซอฟต์แวร์

จากหนังสือ Fundamentals of Software Architecture

ได้พูดถึงมุมมองทั้งสี่ด้านเพื่อมองสถาปัตยกรรมของซอฟต์แวร์นั้นๆ

  1. โครงสร้าง (Structure)
    สมมุติว่ามีคนบอกว่าเราวางสถาปัตยกรรมของระบบไว้แบบ Microservices นั้นแปลว่าเค้ากำลังบอกคุณแค่โครงสร้างของระบบแต่ยังไม่ใช่สถาปัตยกรรมของระบบ
    ซึ่งโครงสร้างในระบบมีหลายหลายแบบเช่น Microservices, Layered, Microkernel

  2. คุณสมบัติ (Characteristic)
    เป็นเกณฑ์ของซอฟต์แวร์นั้นๆที่ควรจะมีเช่น

    • พร้อมใช้งานเสมอ (Availability)
    • มีความน่าเชื่อถือ (Reliability)
    • ทดสอบง่าย (Testability)
    • ทนทานต่อการมีข้อผิดพลาด (Fault Tolerance)
  3. การตัดสินใจ (Decision)
    เป็นเหมือนกฏที่สร้างขึ้นมาในระบบว่าอะไรทำได้ อะไรทำไม่ได้ ค่อนข้างชัดเจน เช่น ใน Presentation layer ห้ามมีการเข้าถึง Database แต่จะอนุญาติเฉพาะ Business และ Services Layer เท่านั้น เป็นต้น
    กฏบางอย่างสามารถเปลี่ยนแปลงได้แต่ต้องได้รับการอนุญาติจากหัวหน้าหรือที่ประชุม (แล้วแต่ระดับขององค์กร)

  4. หลักการ (Design Principle)
    เป็นคำแนะนำสำหรับการทำงานกับระบบนั้นๆ ซึ่งจะไม่ใช่เชิงบังคับว่าให้ทำเหมือน การตัดสินใจ (Decision) แต่เป็นคำแนะนำปลายเปิด เช่น สำหรับการส่งข้อมูลกันระหว่าง Services แนะนำให้ใช้เทคนิค asynchronous messaging เพื่อประสิทธิภาพของการทำงาน นั้นหมายถึงไม่ได้จำกัด รูปแบบการสื่อสาร (Protocol) หรือ เครื่องมือที่ใช้ นักพัฒนาสามารถเลือกได้ตามความถนัด

Billboard image

Deploy and scale your apps on AWS and GCP with a world class developer experience

Coherence makes it easy to set up and maintain cloud infrastructure. Harness the extensibility, compliance and cost efficiency of the cloud.

Learn more

Top comments (0)

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay