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

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
主站蜘蛛池模板: 丰都县| 高碑店市| 东宁县| 呼伦贝尔市| 张家界市| 姜堰市| 镇沅| 章丘市| 大理市| 桐乡市| 罗甸县| 榆树市| 垦利县| 平远县| 息烽县| 阳东县| 波密县| 固安县| 延长县| 龙陵县| 思茅市| 乐都县| 松桃| 麻阳| 兴山县| 肇源县| 旅游| 新乡县| 同心县| 庆元县| 甘德县| 肇源县| 三穗县| 宜黄县| 营山县| 志丹县| 邯郸市| 海原县| 类乌齐县| 玉门市| 和顺县|