artyom-beilis / cppcms

CppCMS Framework
Other
444 stars 107 forks source link

How to update/upgrade app while runtime #4

Closed HadesD closed 7 years ago

HadesD commented 7 years ago

Some time I want to edit a code in cpp file, but website is running, in PHP or NodeJS, it so easy to edit at localhost then test, then i can push to github and pull in from server and don't need reset server or turn app to "In construction" status. How to do it in CppCMS?

lee-elenbaas commented 7 years ago

CppCMS is a C++ based framework. as such it is built on a compile phase that translate the code you write (including the templates) into a machine language before the program is being run.

You can automate that process, using stable binary API you can even hot swap components but there will always be changes that will not support such mechanism.

to hotswap templates - you will need to use theme build the template into a theme, and then select the working theme based on some outside input (environment variable for example) then you can build each time into a new theme, and after the build is done, you can change to the new theme, and clear the output cache

but this mechanism is not backed into the framework

HadesD commented 7 years ago

@lee-elenbaas thanks for reply If i create a view file as a lib, then i re-build that libview, can application re-load that libview but does not re-open the app?