Skip to content
GitHub

Architecture ကို အကဲဖြတ်ခြင်း နှင့် Architectural Fitness Functions

ပြဿနာ - Architecture ပုံစံ သွေဖည်သွားခြင်း (Architectural Drift)

Section titled “ပြဿနာ - Architecture ပုံစံ သွေဖည်သွားခြင်း (Architectural Drift)”

သင်က အကောင်းဆုံး Architectural ပုံကြမ်းတွေ၊ ဆုံးဖြတ်ချက်တွေ ချမှတ်ထားနိုင်ပါတယ်။ ဒါပေမဲ့ အချိန်ကြာလာတာနဲ့အမျှ၊ Code အသစ်တွေထပ်ထည့်လာတာ၊ Deadline တွေနီးကပ်လာတာတွေကြောင့်၊ တကယ့် System က ရည်ရွယ်ထားတဲ့ ဒီဇိုင်းကနေ တဖြည်းဖြည်း “သွေဖည်” သွားနိုင်ပါတယ်။ စည်းမျဉ်းတွေ ချိုးဖောက်ခံရပြီး၊ Architecture က တဖြည်းဖြည်း ယိုယွင်းလာပါတယ်။

ဖြေရှင်းချက် - Architectural Fitness Functions

Section titled “ဖြေရှင်းချက် - Architectural Fitness Functions”

Fitness Function ဆိုတာက Architectural စည်းမျဉ်းတစ်ခုကို လိုက်နာနေသလားဆိုတာကို စစ်ဆေးပေးတဲ့ Automated Test တစ်ခုဖြစ်ပါတယ်။ ဒါကို “ကိုယ့် Architecture အတွက် Unit Test တစ်ခုပဲ” လို့ မှတ်ယူနိုင်ပါတယ်။

  • ဘယ်လိုအလုပ်လုပ်လဲ - ဒါတွေက သင့်ရဲ့ ပုံမှန် CI/CD Pipeline (သင့် Code ကို Build လုပ်ပြီး Test လုပ်တဲ့ Automated Process) ရဲ့ အစိတ်အပိုင်းတစ်ခုအနေနဲ့ Run တဲ့ Automated Check တွေပါ။

  • Fitness Function များ၏ ရိုးရှင်းသော ဥပမာများ -

    • Dependencies များကို စစ်ဆေးခြင်း - PaymentService Code က UserService Code ကို တိုက်ရိုက်မှီခိုဖို့ ကြိုးစားခဲ့ရင် Fail ဖြစ်သွားမယ့် Test မျိုး (ဒါက Loose Coupling စည်းမျဉ်းကို ချိုးဖောက်တာဖြစ်တယ်)။

    • Metric များကို စစ်ဆေးခြင်း - Performance Scan တစ်ခုကို Run ပြီး အရေးကြီးတဲ့ API တစ်ခုရဲ့ Response Time က 100 milliseconds ထက်ကျော်သွားရင် Fail ဖြစ်သွားမယ့် Test မျိုး။

    • Security ကို စစ်ဆေးခြင်း - သင့် Library တွေမှာ လူသိများတဲ့ Security အားနည်းချက်တွေ ရှိမရှိ Scan လုပ်တဲ့ Test မျိုး။

ဒီ Functions တွေက အရေးကြီးတဲ့ Architectural နိယာမတစ်ခုကို ချိုးဖောက်မိရင် ချက်ချင်း Feedback ပေးပြီး၊ “ဘေးကင်းဖို့ အတွက်ပိုက်ကွန်” တစ်ခုကာထားသလို ဆောင်ရွက်ပေးပါတယ်။

Fitness Functions