When I was in the Neo bank. What the mobile architecture I designed and participated also used shared lib layer to apply clean architecture. What we chose to is using kmm - kotlin multiplatform.
https://docs.google.com/presentation/d/e/2PACX-1vTsuwwY8Q2dFTE39jD_jCKACMNNpwyqIn61FwiwjAyEBFMlB8NTYIFQ2V1hL4AfXrbfbRBj27Xa_2-K/pub?start=false&loop=false&delayms=3000
As the result was great back then. There are advantages as following
1. the model serialization is same to all platforms. There were rarely defect only happened to one platform
2. The business logic also can be written in the same layer and applied the use cases.
3. Reduced the effort of debugging process.
Cons are
1. Every time you modified the shared lib. Your main app also need to update to the lib version code.
2. Big change to the shared lib will also impact all platforms if there's no dependencies inversion or interface segregation on this shared lib.
I would recommend enterprise project using this architecture since pros > cons as my prospective. Especially find the defect through the large scale systems wasn't that easy.
沒有留言:
張貼留言