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

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
主站蜘蛛池模板: 隆子县| 鹤峰县| 盘锦市| 天水市| 南陵县| 大化| 台北市| 迭部县| 盐山县| 秦皇岛市| 甘孜县| 阿克陶县| 余姚市| 武夷山市| 横峰县| 项城市| 沾化县| 平阴县| 隆安县| 宜兰县| 台北市| 惠安县| 体育| 忻城县| 乐陵市| 开平市| 建始县| 南汇区| 余姚市| 屏东市| 柳江县| 湘潭市| 定襄县| 丰城市| 佛山市| 沧州市| 乐清市| 泾源县| 象山县| 贞丰县| 禹城市|