Thread: [Cppcms-users] Compile templates into several "view libraries"
Brought to you by:
artyom-beilis
From: <jo...@em...> - 2021-03-16 01:18:23
|
Hello folks, I am starting to prepare a skeleton for a larger web-platform we’re planning to build that will be based on CppCMS. Due to the size of the application I want to split different modules into different modules. To illustrate this, imagine something like a collaboration platform. It has different functionalities such as: * Task management * Repository/code management * Knowledge base / Wiki * Q & A * Chats * … >From a code structural point of view I’d like each of these features to be plugins in forms of shared libraries (*.so, *.dll, *.dynlib, …). The main application will provide a plugin interface to implement the different functionalities. To achieve this properly, a plugin should be able to provide everything including the various views (compiled CppCMS templates). The main application will then load the plugins and provide menu items in the main navigation so the user can jump to those functionalities. My question: Is there a way that each plugin can compile its own templates with the template compiler? As I see things right now the template compiler needs to know all the templates (views?) What I want is that each plugin compiles its own templates into the C++ views code and then provides that to the main application via the plugin interface. Unfortunately, I was unable to figure out whether this can be achieved – and if so how. Is there a technical limitation that prevents me from achieving this? I saw the documentation of “Dynamic Loading of Views” but as far as I understand that does not really cover my use case as it seems like all the templates/views need to be known when running the compiler. Best regards, ~ Joel Bodenmann |
From: Artyom B. <art...@gm...> - 2021-03-19 20:24:03
|
Yes plugin can, Take a look there: http://cppcms.com/wikipp/en/page/cppcms_1_2_plugin_api In general you can compile view together with the plugin an load it dynamically Artyom On Tue, Mar 16, 2021 at 3:19 AM <jo...@em...> wrote: > Hello folks, > > > > I am starting to prepare a skeleton for a larger web-platform we’re > planning to build that will be based on CppCMS. > > > > Due to the size of the application I want to split different modules into > different modules. > > To illustrate this, imagine something like a collaboration platform. It > has different functionalities such as: > > - Task management > - Repository/code management > - Knowledge base / Wiki > - Q & A > - Chats > - … > > > > From a code structural point of view I’d like each of these features to be > plugins in forms of shared libraries (*.so, *.dll, *.dynlib, …). > > The main application will provide a plugin interface to implement the > different functionalities. > > To achieve this properly, a plugin should be able to provide everything > including the various views (compiled CppCMS templates). The main > application will then load the plugins and provide menu items in the main > navigation so the user can jump to those functionalities. > > > > My question: Is there a way that each plugin can compile its own templates > with the template compiler? As I see things right now the template compiler > needs to know all the templates (views?) > > What I want is that each plugin compiles its own templates into the C++ > views code and then provides that to the main application via the plugin > interface. > > > > Unfortunately, I was unable to figure out whether this can be achieved – > and if so how. > > Is there a technical limitation that prevents me from achieving this? > > > > I saw the documentation of “Dynamic Loading of Views” but as far as I > understand that does not really cover my use case as it seems like all the > templates/views need to be known when running the compiler. > > > > > > Best regards, > > ~ Joel Bodenmann > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: <jo...@em...> - 2021-04-06 10:57:04
|
Thank you for this information, Artyom! Best regards, ~ Joel From: Artyom Beilis <art...@gm...> Sent: Friday, 19 March 2021 21:24 To: cpp...@li... Subject: Re: [Cppcms-users] Compile templates into several "view libraries" Yes plugin can, Take a look there: http://cppcms.com/wikipp/en/page/cppcms_1_2_plugin_api In general you can compile view together with the plugin an load it dynamically Artyom On Tue, Mar 16, 2021 at 3:19 AM <jo...@em... <mailto:jo...@em...> > wrote: Hello folks, I am starting to prepare a skeleton for a larger web-platform we’re planning to build that will be based on CppCMS. Due to the size of the application I want to split different modules into different modules. To illustrate this, imagine something like a collaboration platform. It has different functionalities such as: * Task management * Repository/code management * Knowledge base / Wiki * Q & A * Chats * … >From a code structural point of view I’d like each of these features to be plugins in forms of shared libraries (*.so, *.dll, *.dynlib, …). The main application will provide a plugin interface to implement the different functionalities. To achieve this properly, a plugin should be able to provide everything including the various views (compiled CppCMS templates). The main application will then load the plugins and provide menu items in the main navigation so the user can jump to those functionalities. My question: Is there a way that each plugin can compile its own templates with the template compiler? As I see things right now the template compiler needs to know all the templates (views?) What I want is that each plugin compiles its own templates into the C++ views code and then provides that to the main application via the plugin interface. Unfortunately, I was unable to figure out whether this can be achieved – and if so how. Is there a technical limitation that prevents me from achieving this? I saw the documentation of “Dynamic Loading of Views” but as far as I understand that does not really cover my use case as it seems like all the templates/views need to be known when running the compiler. Best regards, ~ Joel Bodenmann _______________________________________________ Cppcms-users mailing list Cpp...@li... <mailto:Cpp...@li...> https://lists.sourceforge.net/lists/listinfo/cppcms-users |