နားလည်ထားရမယ့် အချက်
Native app ဆိုသည်မှာ target mobile operating system တစ်ခုတည်းအတွက်သာ ၎င်း platform ကိုယ်ပိုင် SDK, language, framework များကို အသုံးပြုကာ တည်ဆောက်ထားသော app တစ်ခု ဖြစ်သည်။
Android ပေါ်တွင်ဆိုလျှင် ပုံမှန်အားဖြင့် Android SDK အပေါ်ရှိ Kotlin (သို့) Java ကို ဆိုလိုပြီး၊ iOS ပေါ်တွင်ဆိုလျှင် iOS SDK အပေါ်ရှိ SwiftUI (သို့) UIKit ပါသော Swift ကို ဆိုလိုသည်။
Syntax သင်ခန်းစာ မဟုတ်ပါ
ဤသင်တန်းသည် ထို syntax ကို လုံးဝ သင်ကြားမည် မဟုတ်ပါ -- hands-on native development အတွက် ဤဆိုက်ရှိ Android Development (သို့) iOS Development သင်တန်းများကို ဆက်လက်လေ့လာပါ၊ ၎င်းတို့သည် ထို stack များကို အနက်ရှိုင်းစွာ ဖုံးလွှမ်းထားသည်။
Concept အရ native ကို ရွေးချယ်ခြင်းသည် အမှန်တကယ် အားသာချက်အချို့ ရရှိစေသည်။ platform ၏ API surface အပြည့်အစုံကို ၎င်း release ဖြစ်သည်နှင့်တစ်ပြိုင်နက် framework layer တစ်ခုမျှ စောင့်ဆိုင်းစရာမလိုဘဲ တိုက်ရိုက် access ရရှိသည်။
Platform ကိုယ်ပိုင် ecosystem -- widget, notification system, background execution rule, design convention တို့ -- နှင့် ပေါင်းစပ်မှုသည် native ဖြစ်နေသောကြောင့် native ခံစားချက် ရရှိတတ်သည်။ performance potential သည် ပုံမှန်အားဖြင့် အမြင့်ဆုံးအဆင့်တွင် ရှိနေသည်၊ အောက်ခြေတွင် call များကို ဘာသာပြန်ပေးနေသော cross-platform abstraction layer တစ်ခုမျှ မရှိသောကြောင့် ဖြစ်သည်။
အပြန်အလှန်အားဖြင့် အနိုင်ကျပ်လှသော tradeoff များလည်း ရှိသည်။ Android နှင့် iOS နှစ်ခုစလုံးကို native ဖြင့် တည်ဆောက်ခြင်းသည် ပုံမှန်အားဖြင့် language နှစ်မျိုးဖြင့် codebase နှစ်ခု ခွဲထားရလေ့ရှိပြီး feature တိုင်းအတွက် implementation နှင့် testing အလုပ်ကို နှစ်ဆ ဖြစ်စေသည်။
team ပေါ်တွင် platform-specific အသိပညာကိုလည်း တောင်းဆိုသည်- Kotlin developer တစ်ဦး၏ ကျွမ်းကျင်မှုသည် Swift ဆီသို့ တိုက်ရိုက် လွှဲပြောင်းလို့ မရသလို ပြောင်းပြန်လည်း ဖြစ်သည်။ product တစ်ခုသည် နောက်ဆုံးပေါ် platform feature (သို့) deep OS integration ကို များစွာ မှီခိုနေပါက native သည် အားကောင်းသော ရွေးချယ်မှု ဖြစ်ပြီး၊ team ငယ်တစ်ခုသည် feature set တူညီကို platform နှစ်ခုပေါ်တွင် လျင်မြန်စွာ ထုတ်ဖော်ရန် လိုအပ်ပါက ရောင်းချရန် ခက်ခဲသော ရွေးချယ်မှု ဖြစ်လာနိုင်သည်။
- Native App
- Kotlin/Java ကို Android ပေါ်တွင်၊ Swift ကို iOS ပေါ်တွင် အသုံးပြုသကဲ့သို့ target mobile operating system တစ်ခုတည်း အတွက်သာ ၎င်း platform ကိုယ်ပိုင် SDK နှင့် language ဖြင့် တည်ဆောက်ထားသော app တစ်ခုကို ဆိုလိုပြီး၊ cross-platform codebase တစ်ခုတည်း မျှဝေအသုံးပြုခြင်း မဟုတ်ပါ။
NATIVE APP STACKS: ANDROID AND IOS, IN PARALLEL
-----------------------------------------------
ANDROID NATIVE
Kotlin / Java
|
v
Android SDK
|
v
Android OS
IOS NATIVE
Swift
|
v
iOS SDK
|
v
iOSလက်တွေ့ scenario နဲ့ ချိတ်ကြည့်မယ်
stakeholder တစ်ဦးက 'native ကို သွားသင့်လား' ဟု မေးလာသောအခါ ဟုတ်/မဟုတ် တစ်ခုတည်းဖြင့် ဖြေဖို့ ရှောင်ပါ။ ယင်းအစား ပိုကျဉ်းသော မေးခွန်းသုံးခု မေးပြီး အဖြေပုံစံကို လမ်းညွှန်ခိုင်းပါ။
- app သည် ၎င်း release ဖြစ်သည်နှင့်တစ်ပြိုင်နက် platform feature တစ်ခု -- camera capability အသစ်, widget type အသစ်, background API အသစ် -- ကို cross-platform framework စောင့်ဆိုင်းမည့်အစား လိုအပ်ပါသလား?
- product သည် heavy background service, ရှုပ်ထွေးသော home-screen widget, (သို့) တင်းကျပ်သော system-level permission ကဲ့သို့ deep OS integration ကို မှီခိုနေပါသလား?
- team တွင် Android နှင့် iOS specialist သီးခြားစီ ရှိပြီးသားလား၊ (သို့) native သွားခြင်းသည် stack နှစ်ခုအတွက် တစ်ပြိုင်နက် ငှားရမ်း (သို့) training ပေးရန် ဆိုလိုပါသလား?
အဖြေအများစုက 'ဟုတ်တယ်၊ ကျွန်ုပ်တို့မှာ skill ရှိတယ်' ဆိုပါက native သည် အားကောင်းသော fit ဖြစ်သည်။ team ငယ်ပြီး timeline တင်းကျပ်ကာ feature set အများစုသည် shared UI နှင့် business logic ဖြစ်ပါက ထိုပေါင်းစပ်မှုက cross-platform approach ကို ပိုနှစ်သက်လေ့ရှိသည်၊ ၎င်းကို နောက်သင်ခန်းစာတွင် ဖော်ပြပါမည်။
ဒါကို fit check တစ်ခုအနေနှင့်သာ သဘောထားပါ၊ ဘယ် approach က ယေဘုယျအားဖြင့် ပိုကောင်းသည် ဆိုသည့် စီရင်ချက်တစ်ခု မဟုတ်ပါ။
အတူတူ စမ်းရေးကြည့်မယ်
function isNativeAGoodFit(requirement) {
const {
needsLatestPlatformFeature = false,
needsDeepOSIntegration = false,
teamHasPlatformSpecificSkills = false,
} = requirement;
const signalsForNative = [
needsLatestPlatformFeature,
needsDeepOSIntegration,
teamHasPlatformSpecificSkills,
].filter(Boolean).length;
if (signalsForNative >= 2) {
return {
goNative: true,
reason:
"Multiple signals point to native: platform depth and/or team skills favor building on each OS's own SDK directly.",
};
}
if (signalsForNative === 1 && teamHasPlatformSpecificSkills) {
return {
goNative: true,
reason:
"The team already has the platform-specific skills, which removes native's biggest practical cost.",
};
}
return {
goNative: false,
reason:
"Too few signals for native's extra cost to pay off -- a cross-platform approach is worth evaluating instead.",
};
}
const cuttingEdgeCameraApp = isNativeAGoodFit({
needsLatestPlatformFeature: true,
needsDeepOSIntegration: true,
teamHasPlatformSpecificSkills: false,
});
const smallStartupMvp = isNativeAGoodFit({
needsLatestPlatformFeature: false,
needsDeepOSIntegration: false,
teamHasPlatformSpecificSkills: false,
});
const experiencedPlatformTeam = isNativeAGoodFit({
needsLatestPlatformFeature: false,
needsDeepOSIntegration: false,
teamHasPlatformSpecificSkills: true,
});
console.log(`Cutting-edge camera app: goNative=${cuttingEdgeCameraApp.goNative} -- ${cuttingEdgeCameraApp.reason}`);
console.log(`Small startup MVP: goNative=${smallStartupMvp.goNative} -- ${smallStartupMvp.reason}`);
console.log(`Team with existing platform specialists: goNative=${experiencedPlatformTeam.goNative} -- ${experiencedPlatformTeam.reason}`);Cutting-edge camera app: goNative=true -- Multiple signals point to native: platform depth and/or team skills favor building on each OS's own SDK directly.
Small startup MVP: goNative=false -- Too few signals for native's extra cost to pay off -- a cross-platform approach is worth evaluating instead.
Team with existing platform specialists: goNative=true -- The team already has the platform-specific skills, which removes native's biggest practical cost.၅ မိနစ် စမ်းကြည့်
isNativeAGoodFit ကို သင့် team ၏ တကယ့်အဖြေများဖြင့် run ကြည့်ပါ။ ထို့နောက် input တစ်ခုချင်းစီကို တစ်ခုစီ ပြောင်းပြီး recommendation သည် cross-platform မှ native ဆီသို့ ဘယ်အချိန်တွင် ပြောင်းလဲသွားသည်ကို လေ့လာပါ။
သတိလေးတစ်ချက်
native ဆိုတာ ကိစ္စတိုင်းတွင် performance ပိုကောင်းသည်ဟု ယုံကြည်ခြင်း၊ UI အများစုသာပါသော ရိုးရှင်းသည့် app များတွင် ကွာခြားချက်ကို user များ သတိပြုမိနိုင်စွမ်း မရှိသော်လည်း။
team တွင် Kotlin/Java နှင့် Swift skill နှစ်ခုစလုံး တကယ်ရှိမရှိ ရိုးသားစွာ မစစ်ဆေးဘဲ platform နှစ်ခုစလုံးအတွက် native ကို ရွေးချယ်ခြင်း။
Wikipedia: Mobile app development — How Mobile Apps Work