Wisej App - Monolith to microservices - Docker support

1
0

Hi,

currently I am able to successfully run Wisej3 app in linux docker container (.net6).

Current app is actually multiple apps that are joined under one umbrella with separate wisej app acting as portal.

this means that I am able to run app within portal app by referencing other app assembly and user control using reflection (see code below)

var rootDir = Path.GetDirectoryName(Application.ExecutablePath);
String filePath = System.IO.Path.Combine(rootDir, “other_app.dll”);
System.Reflection.Assembly asm = System.Reflection.Assembly.Load(File.ReadAllBytes(filePath));

Type type = asm.GetType(“other_app.ucMain”);
Wisej.Web.UserControl mainUC = (Wisej.Web.UserControl)Activator.CreateInstance(type);

var container = this.mainPanel;
container.Controls.Clear(true);
mainUC.Dock = DockStyle.Fill;
mainUC.Parent = container;

 

This is neat trick and works flawlessly so far. The only drawback is that as projects are referenced published app contains all other project outputs.

From micro services/segmentation perspective you can develop app separately, but still when publishing this is all merged to single app/container.

Is here a way to reference userControl from separate apps from some kind of portal app if apps are running separately (as separate dotnet processes/containers)?

Thanx,

D

  • You must to post comments
0
0

Dino,

this is not possible. LoadComponent can load from a different assembly but not from an url.
A related option would be to use an iframe where you could include a URL but it may not exactly be what you´re looing after.

Best regards
Frank

  • You must to post comments
0
0

if I understand correctly LoadComponent() will load from current assembly (requires file name).

I am wondering if we can have portal.example.com and component1.example.com, so that from portal I can reference component1 using uri?

Thanx,

D

  • You must to post comments
0
0

Hi Dino,

using Microservices with Wisej is fine, it works like with any other app.
You might also want to look at Application.LoadComponent as an alternative way to dynamically load a control.

Best regards
Frank

  • You must to post comments
0
0

Hi Dino

Thanks for write us

I comment you soon about your question

Best regards

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.