歡迎來到 MOPCON 2023 共筆
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
共筆入口:https://hackmd.io/@mopcon/2023
手機版請點選上方 按鈕展開議程列表。
從這開始
What's E-Bike
App支援E-Bike:
電量、當前電量支援的公里速、定位、旅程計算、騎乘資料、調整騎乘感、歷史資料
E-Bike SDK
相同的需求但有不同的UI
APP
SDK
SDK開發重點 - 通訊協定
Open Standard
- 標準、公開、不同裝置間互通
- XML、JSON
- UTF-8/16、BIG5
不同層面的通訊協定
- 網路通訊協定(HTTP、POP3…)
- 硬體協定(CAN Bus、UART…)
跨平台技術的選擇
Flutter、KMM
選擇KMM原因
- 不干涉原生平台特色UI
- 產出SDK提供原生應用
- 對原生平台可拓展、易操作性
手機無線通訊的選擇 - BLE 特色
關注 KMM interface 給予的承諾
物件導向 vs 命令式
物件導向 - 重點在資料
分析資料-OOA問題領域、責任劃分
透過硬體劃分,軟體需求的問題領域
不同類負責不同的硬體功能
給予每個 class 身份
OOD行為劃分 - 從結果開始
共用模塊方案 A 繼承之缺
電燈不需要更新
- 封裝是強迫的
- 靜態方法
- 破壞封裝
- 需要注意 super class
共用模塊方案 B 聚合
需求:權限
考量你的實作有沒有對介面承諾,還是需要動到修改
Interface Segregation
高內聚
直接訪問 sdk - 缺乏彈性
中間層設計 - 保障穩定、彈性
中間層/外部介面(穩定)
↓
內部介面(彈性)
例:C 語言的 system call
中間層拓展出的價值
License 主動驗證
暴露
License 被動驗證 IOC
- 編譯期間注入
What is Open SDK?
單元測試,是程式的使用者
聯絡資訊
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →