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

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.
主站蜘蛛池模板: 陇南市| 遵义县| 健康| 伊春市| 建湖县| 绍兴市| 新沂市| 广西| 石棉县| 临颍县| 濉溪县| 水富县| 万全县| 邳州市| 湘乡市| 弥渡县| 长治县| 德庆县| 绩溪县| 收藏| 乌兰察布市| 赞皇县| 江阴市| 忻州市| 方正县| 新乡市| 郧西县| 安陆市| 来凤县| 汕头市| 鄂州市| 淮南市| 禄劝| 奎屯市| 翼城县| 张家口市| 固始县| 鹤壁市| 凌云县| 仁布县| 大连市|