Forum Discussion

rjalex's avatar
rjalex
New Contributor
4 years ago
Solved

Super beginner question :)

Dear friends,

<preamble>

in real life I am a medical doctor and as my dark secret I do some programming to take a break from my main job and "distract" myself from it.

I have been playing with OpenAPI a little and find the whole concept of "API first" programming really attractive.

I my probably limited understanding if I take some time to define the APIs and the related data model I can then ensure that BOTH the backend and front-end developers rely on that to develop their stuff right?

For the backend I've been generating flask-servers and using an Atlas MongoDB and all is cute and fine. 

</preamble>

What I'm trying to understand is if there's a toolchain to speed up a front-end development coherent with the API and its data model.

Currently I'm just using the datamodel to build forms and stuff like that but if I did change something in the API or datamodel I currently have to manually review the forms to be sure they reflect the new data.

Is it possible if not automating at least to help in this fronted to API/model consistency?

Hope this is not too dumb a question. Thanks in advance.

4 Replies

  • Very valid question.

     

    Generally speaking, you can use code generators like Swagger Codegen to automate the process of creating boilerplate code. Note that the existing templates may not address your needs out of the box. However, since the templates are highly customizable, you can simply modify them to your own needs and keep using them.

    • rjalex's avatar
      rjalex
      New Contributor

      Well thanks for letting me know I'm not totally misunderstanding πŸ™‚

      I use Codegen to generate the Flask backend but could not find/understand how to use it to also generate a "boilerplate" of an HTML/JS frontend ... is this possible? Can you suggest some  further reading/ideas?

       

      Take care