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

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
主站蜘蛛池模板: 峨山| 天门市| 磴口县| 湟源县| 青海省| 蒲城县| 襄樊市| 宜兴市| 乐平市| 满洲里市| 遵化市| 葵青区| 临清市| 山阳县| 浏阳市| 白沙| 滕州市| 马尔康县| 永年县| 宝丰县| 越西县| 烟台市| 无为县| 定陶县| 洱源县| 蚌埠市| 苍山县| 南充市| 开江县| 康保县| 康马县| 陇川县| 兰考县| 阳曲县| 申扎县| 芜湖市| 新竹市| 河东区| 汶川县| 太谷县| 罗江县|