且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

合并不同语言的程序

更新时间:2023-12-05 16:37:16

我认为***的/最简单的事情你可以做的是只有在C#中的GUI,在Windows客户端,你可以使用Windows窗体或WPF,在网络上,你可以使用ASP.NET WebForms或ASP.NET MVC。

$除了MVC(Razor),你在Visual Studio中设计和自定义GUI的工具是非常好的。

C ++代码可以包装在类库中,或者如果你通过某种类型的IPC访问它,如果它必须作为应用程序运行,同样为Java,但如果你是100%***写和重写的东西你也可以想象到端口Java代码到C ++,这可能是容易,困难或不可能根据java代码的作用。



如果C ++和Java应用程序必须保持分离,必须在同一台或另一台机器上运行,并且你仍然想从你的C#GUI消费他们的服务或方法,如你所提到的,IPC可能是方式,不知道你可以做什么在Windows与Java和IPC,肯定java可以公开或使用XML Web服务。


I have three programs (one in C++ + WinAPI, another one in C# .NET and the last one in Java) with different functions. I am about to choose one and implement functions of the other two. Is it possible to somehow merge them? I need to have them in one GUI, under one process (at least visually). IPC isn't a problem.

Thanks for anything

I think the best/easiest thing you could do is make the GUI only in C#, in windows clients you could use Windows Forms or WPF, in web based you can use ASP.NET WebForms or ASP.NET MVC.

in all these cases except MVC (Razor) you have really good tools for designing and customizing the GUI within Visual Studio.

Your C++ code can be wrapped in a class library or as you say accessed via some kind of IPC if it has to run as application, same for Java but if you are 100% free to write and re-write things you could also imagine to port the Java code to C++, this could be easy, difficult or impossible depending on what the java code does.

at last resort if both C++ and Java applications must stay separated and must run in background on same or another machine and you still want to consume their services or methods from your C# GUI, as you mentioned, IPC is probably the way, not sure what you can do in Windows with Java and IPC, surely java can expose or consume XML web services.