API
API development
Action
create/delete/update
set
For example :
setProperty()
get
str = getProperty()
Always return value. Avoid call be reference -- that just hard to trace.
to :
toUppoercase
use :
useEffect()
//reactother verb : convert
Condition
is :
isNew
contains
Avoid to have number in the function/method name
Module
Just follow the others.
Most of package/module naming already have general practice.
Or if you want to classify your modules, just base on your visual of layers and groups.
How to start your code?
Documentation
markdown : for README and pure documentation. README.md is the general practice of your github project.
API document
javadoc
jsdoc
python : docstring
Open API and Swagger UI
To be more efficient code, understand to use swagger API to create boilerplate codes.
Last updated
Was this helpful?