📙
Programming
  • Best Practice of Programming
  • Language Fundamental
    • String
    • Operators
    • Condition
    • Loop
  • Data
    • Exercise JSON Data
    • Array
  • Coding
  • API
  • Source Code Control
  • IDE
  • Httpd and Web
    • Exercise django
Powered by GitBook
On this page
  • API development
  • How to start your code?
  • Documentation
  • Open API and Swagger UI

Was this helpful?

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() //react

    • other 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.

PreviousCodingNextSource Code Control

Last updated 4 years ago

Was this helpful?