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

Coding practices

There are many best practices that are followed by developers around the world. Some of these can be as simple as following a code convention, or applying a more advanced pattern, principle, or general guideline. When building a microservice, its public APIs need to be designed carefully. The internal structure of a microservice is an implementation detail that doesn't get exposed to others.

You cannot ignore the fact that you are publishing a service, which is the face of your API. REST APIs have certain best practices, which should be followed. It's beyond the scope of this book to cover each of these practices, but standardizing on the resources and the request and response formats will go a long way in making the code consistent and easy to work with. Consider the following practices, which are focused towards this type of architecture:

  • Follow DDD
  • Document it
  • Build for failure
  • Infrastructure as part of code
主站蜘蛛池模板: 手机| 克拉玛依市| 若尔盖县| 张家界市| 吉水县| 拉萨市| 普兰县| 扶绥县| 广东省| 宁安市| 遂宁市| 宁河县| 江津市| 镇坪县| 萨嘎县| 凤城市| 镇远县| 广水市| 商水县| 壤塘县| 讷河市| 宁德市| 三原县| 青冈县| 库车县| 兴和县| 封丘县| 铁岭市| 永仁县| 宜君县| 开远市| 五大连池市| 吴旗县| 古丈县| 尼勒克县| 鄂尔多斯市| 阿坝县| 霸州市| 科尔| 洛隆县| 桃园市|