Facebook????????Android Flux??????
???????????? ???????[ 2015/8/27 11:03:33 ] ??????????????? ??????
??????Android?????????????????????????????顣??????????????????飬?????????????????Activity ???????????????????й?????????
??????????????????????????????????????????????????κ??????????????????????????????????????????????????????????
????: Clean Architecture
?????????????????Uncle Bob??2012???web??????????飺 Clean Architecture??
?????????????Clean Architecture??????????????????????е??????????
????????????????web??????????????????????????????????е?app?????????????????????
????????????????????????????????????????????????????????????API?????????????????????????????????д??
????????????????????????????????????????????????????????????????????棬?洢???????????????磬??λ??????????Щ??????????????????app??????Щ??????
???????????????app?????????????????????????????????????????л??檔
?????????????????????????????????????Ч???????????????????bug??
????Flux ???????
????Flux ??? ??Facebook??????????????????web??á???Clean Architecture??????????????????????????????????????????????????????????в??á?
????????Flux????????????????
???????????????????????????????? ?? Flux ???????????????????????????????????????????ò???????????????????????
???????????????????????
????View: ??????檔??????????????????action??
????Dispatcher: ????????????????е?action?????????????????Store??
????Store: ?????????application domain????????????????????action?????????????????????????????change???????????????view????????檔
????????????????????Action?????????????????????????????????????????????????????
????Flux Android ???
??????Android?????????Flux???淶????????????????????????????????????????????
??????????????Flux??????app??????????
??????????????????????????????
????View: Activity o????Fragment
????Dispatcher: ??????????? event bus??????????????н????Otto???????????κ??????????ok???
????Actions
????Actions?????????????????POJO?????????????????????
????Type: ???String??????????????????
????Data: ???map?????????β?????
???????磬?????????????????action???£?
????Bundle data = new Bundle();
????data.put("USER_ID"?? id);
????Action action = new ViewAction("SHOW_USER"?? data);
????Stores
???????????Flux?????????????
?????????????ù?Clean Architecture??????????????????Stores?е?????????????????Ρ?
????Stores??????application????????????????????????????rich data models??????????????????????????????????????
????Stores???Dispatcher??????Action?????????????????change?????
????Stores?????????????????change????????Store??????????????????????????????????????????????????
???????в???????κ??????齨????application???κ????????
??????stores???????????????application?????????????view????????Stores???????????UI??
???????磬?????Pub Discovery App ?У?SearchStore?????????????????item???????????????????????????????У????ReviewedStore????????????pub???б???????????????????review????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11