Web Services Development

Best Current Practices (2018)

Document #PLPC-180053
Version 0.1
June 27, 2018
This Document is Available on-line at:
http://www.by-star.net/PLPC/180053
Neda Communications, Inc.
Email:
http://www.by-star.net/contact

What Are The Best Current Practices To Build Web Services

Contours Of Chosen Key Ingridients

  • Invoker Language – Python 3
  • Performer Language – Python 3
  • Operations Protocol – http Web Services
  • Service Specification – Open API 3 (fka Swagger)

What Are The Best Current Practices To Build Web Services

Contours Of Chosen Key Ingridients

  • Python Interactice Command Modules (ICM) Framework
  • Swagger Tool Chain:
    • Swagger-Editor – Used For Looking At Operations Specification – Not For Editing Them
    • Swagger-UI – Auto included in every service
    • Swagger-Verifier – (validator-badge) to help verify that Operations-Specification is correct
    • Swagger-codegen – Only Performer Side Python3 feature is used – Flask+Connexion+ServerStubs
  • Python Bravado – Equivalent of Invoker Codegenartor But Better

Model And Terminology – Data Communications Vs Software Engineering

ROSE: Remote Operations Services Element

  • Remote Operations Services Model And Terminology Was First Introduced In 1988 By Data Comm Experts
  • Models and Terminology Inferior To It Has Been Used By Software Engineers (Hacks)

The Best Current Practice is to use proper, complete and correct model and terminology with discipline.

We will be using ROSE’s model and terminology.

Development Workflow

  1. Develop Your ICM As An Ordinary Local Command Line Module – With ICM Parameters And Args
  2. Use/Test Your ICM On Command Line Or With A ICM-Player
  3. Augment Your Local ICM With Swagger Annotations – Similar To Java’s @Api
  4. Create A Swagger Operations-Specification And Validate It
  5. Pass The Swagger Operations-Specification Through codegen which will use the ICM’s Operations
  6. Run The Performer As A Service
  7. Point the ICM-Invoker To The Performer’s Operations-Specification
  8. Build Your Application Based On The ICM-Invoker Cmnds

Database Oriented Performers

For Database Oriented Apps, The Stack Is:

  1. Flask
  2. Connexion
  3. Performer-ICM (Based On Swagger Codegen)
  4. Sqlalchemy
  5. Mysql