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?
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.