Best Development Practices

Hi All,

I'm going to begin writing a program that could potentially be used in a webserver. Is it better practice to write it up as an offline application and then make modifications to make it online, or is it better to write it derectly for use online? Or does that vary from person to person, case by case etc. If the latter is true, may I ask why?

Many thanks,
Kev

Typically you would write a library that just exposes functions, and then you can build both a terminal and web frontend around that library.

1 Like

Ahh ok, thank you for your answer. so you wouldn't try to merge the web frontend into the functions? I ask because I would do exactly what you've said, but I've seen instances where functions include aspects of the web frontend, and wanted to make sure that it wasn't common.

It is reasonably common to not separate it from the web api code, but if you expect to ever possibly need the code outside of that web api, it would be better to separate it into a library.

1 Like

Perfect, thank you for the explanation!

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.