Building Microservices then below are the best practices to build a service in simple and clear way.
-Level 3:When you use HATEOS
Its Recommended.
Top 1 :Try to Achieve Fully Restful API
Writing an API then follow RMM (The Richardson Maturity
Model)
RMM is used for checking API is fully Restful or Not.
Fully Restful API ↑
-Level 3:When you use HATEOS
-Level 2:Use of right HTTP methods(Get,Put,Post,Delete)
-Level 1:Resource URI-Profile Request to internal URI
-Level 0:Swamp of POX (No HTTP Contents only XML)
Top 2:Use HATEOS-Hyper Media As Engine of Application State
{
"id":
"123",
"name":
"Employee",
"links": [{
"rel":
"emp",
}, {
"rel":
"empDetails",
}]
}
So that
everytime you specify URI client cannot hardcode.
Top 3:Documenting API
Ex: Swagger
Always
document API’s so that it can be used to share documentation among product
managers, testers and developers, but can also be used by various tools to
automate API-related processes.
Top 4: Continuous Delivery
Continuous
Delivery is extension of Continuous Integration,where teams ensure that every
change to the system is releasable.
Its Recommended.
0 comments:
Post a Comment