I'm trying to add Ng2 modules to our DNN site. The design principle we are hoping to follow is to deploy each Ng2 module as a client only module which calls out to various WebApi REST URLs to get data as required (standard Angular use).
We will then develop a separate WebApi REST component, packaged into a DLL and deployed on the DNN IIS server. Essentially we are building our own micro-services which we would like to run in the DNN server. These will call out to the DAL libraries to use DNN functionality via the exposed APIs, but will also contain their own business logic, access and maintain their own data/db tables via Entity Framework, and potentially even call out to external Rest APIs.
Is this possible and has anyone tried anything similar? Is there a better way to do this?
So far, we have written a simple Ng2 module (HTML and JS only), and added it to a page. It works fine, even routing between modules and views without page refreshes. The next step to call out to a REST Api though is where we're not sure.
Where should the WebApi DLL be placed, how can we me DNN include it in the same server context and expose the REST URLs? We've experimented by placing it in the dnndev/bin folder but can't access the URL.
I suspect we have massively over simplified this so any advice or shared experiences would be appreciated! Thanks in advance.