The application relates to the computer technical field, in particular to a micro-
service domain algebra
data type construction method based on
functional programming, which comprises the following steps: obtaining a variant
list of a target
business domain; identifying the properties of each variant in the variant
list, and determining the type of each variant according to the properties of each variant; combining all the variants in the variant
list based on the type of each variant to obtain an algebra
data type tree, compiling the algebra
data type tree, verifying the compiled algebra data type tree, and performing business
processing through the verified algebra data type tree. Therefore, the problems of scattered domain
object definition, high
coupling degree, lack of clear boundaries and complex and lengthy
verification logic in the micro-service are solved, the
readability and
maintainability of the code are improved, and the overall reliability and development efficiency of the micro-
service system are enhanced.