tryphotino / photino.Native

https://tryphotino.io
Apache License 2.0
135 stars 47 forks source link

Possible to use this directly instead of Photino.NET? #119

Open R-Bower opened 10 months ago

R-Bower commented 10 months ago

We have a use case internally that calls for eliminating the C# layer of Photino.NET and using C++ directly. Is it possible to use this native module to create and package applications without a need for the .NET dependency?

philippjbauer commented 10 months ago

Generally yes. But it depends somewhat on how you want to use it and what your use case is. Would you mind elaborating a little bit more?

R-Bower commented 10 months ago

We're looking to implement an Electron-like application using Angular or React. We want to avoid Electron due to its bloat, and Photino looks like an excellent alternative. The issue is that we need to package it up with our C++ backend. We have C++ developers that want to avoid C# completely.

Requirements:

MikeYeager commented 10 months ago

@R-Bower You can absolutely use Photino.Native from any language that can run and interact with a C++ executable. Photino.NET is just a .NET wrapper around Protino.Native to make it easy for .NET developers to use it. .NET is not required to run Photino.Native. The only issue I see is that it can be difficult to run Angular and React apps from the file system. This is mainly due to CORS issues and JS module loading. We recommend running a local web server to accomplish this. We use ASP.NET Core in our samples because we're already loading and running .NET, so there isn't really a penalty. You would need to run a web server compatible with C++ to accomplish this. We would love to see someone create a Photino.CPP project.