官术网_书友最值得收藏!

The module benefits

Using a similar organization provides several advantageous things for you and your team:

  • High degree of usability: By designing a low-level CoreModule, you and your team have the opportunity to design how you like to work with commonly used services, in a unique way, across not only the app you are building now but more in the future. You can easily move CoreModule into a completely different app and gain all the same unique APIs you have designed for this app when working with low-level services.
  • Viewing your own app code as a 'Feature Module': Doing so will help you focus on just the unique abilities your app should provide outside of what the CoreModule provides as well as reduce the duplication of the code.
  • Encourages and enhances rapid development: By confining commonly used functionality to our CoreModule, we relieve the burden of having to worry about those details in our feature modules. We can simply inject those services provided by our CoreModule and use those APIs and never repeat ourselves.
  • Maintainability: In the future, if an underlying detail needs to change because of how your app needs to work with a low-level service, it need only be changed in one place (in the CoreModule service) versus having redundant code potentially spread across different sections of your app.
  • Performance: Splitting your app into modules will allow you to load only the modules you need at startup, then later, lazily load other features on demand. Ultimately, this leads to a faster app startup time.
主站蜘蛛池模板: 舞钢市| 岢岚县| 舒兰市| 晋宁县| 柯坪县| 五指山市| 长垣县| 河北省| 丘北县| 嫩江县| 开远市| 乌拉特后旗| 兴宁市| 普兰县| 佳木斯市| 读书| 乐平市| 云阳县| 汝南县| 湄潭县| 永昌县| 城步| 海盐县| 沁源县| 北安市| 西青区| 曲阳县| 昭通市| 赞皇县| 城市| 台中市| 会宁县| 易门县| 广丰县| 东乌| 威远县| 汶上县| 宁城县| 苗栗市| 昌都县| 湄潭县|