What is the best way to integrate your backend with CEF? - c++

I am currently trying to develop a Windows program using CEF. So I want to integrate the backend in the app and then send the information to the UI via javascript bindings.
I have already integrated my project into CEF as it says in the instructions so like this:
Create a new "myproject" directory in the root cef-project directory (e.g. "/path/to/cef-project/myproject").
Copy the contents of the "third_party/cef/cef_binary_*/tests/cefsimple" directory to "myproject" as a starting point.
Only currently I don't know exactly how to integrate the backend into the code, because it has to run in an external thread, since CEF needs a thread? Or do I see this wrong (I am not yet so familiar with CEF and c++)? Does anyone perhaps have code examples of how to integrate their own c++ code into CEF?

Related

Flutter Windows Desktop: Integrate with the File Activation API

I am looking for some guidance on implementing the Windows File Activation API with my Flutter App, that is, a user able to open a file associated with my App and have that file path passed to my app instance on startup and during runtime if the user opens a file whilst the app is already started.
I have found the following link from Microsoft that details how to achieve this within a UWP Application. However I have no been able to implement it completely with my limited knowledge of C++.
https://learn.microsoft.com/en-us/windows/uwp/launch-resume/handle-file-activation
It seems that the File Activation API relies on the WinRT API. Is this already bundled with the Flutter runner project or does this need to be imported separately?
To hook into the File Activation API, I need to create a class that is derived from the Application class, Is it possible to achieve this whilst still having a reference to the Platform Channels provided so that the events can be passed into the Dart code?
Is it even a valid approach to use the WinRT API's or is there another API I have missed?

Autodesk Forge _ Using Postman

After Coding in Postman how to use in Visual studio for creating Forge App? i am unable to understand
Any specific logic please help with respect to arrange the folder structure in visual code for forge
Regards
Prakash Pisipati
Forge itself doesn't require any specific folder structure or project setup. That will typically depend on the programming language you want to use, and the project type.
For example, if you're building a server application using Node.js, consider using Express.js, and following its Getting Started. And for an ASP.NET app, try this tutorial.
Or, let's say you're building a .NET Core console app. In that case, try following https://learn.microsoft.com/en-us/dotnet/core/tutorials/with-visual-studio-code.

MacOS - How to deploy C++ application

I'm having really hard time figuring out, how to deploy C++ application in macOS. By deploying I mean a package which contains frameworks, resources and an unix executable so anyone who downloads my app will be able to run it without any further configuration.
Thanks in advance for all responses.
One solution should be to download Xcode from the appStore (free) : all needed tools to build an application bundle, a command line tool, a framework or a library are available in the software.
When building an application having a user interface, some codes in objective-c or swift are required at some point to communicate with the Cocoa frameworks, but for a command line tool it could be pure C/C++. Here is a link to a tutorial about that specific case.

website with c++ backend on Windows server

Background: I have developed a c++ program in Visual Studio which takes a image as input, do some computer vision analysis and then create some results in txt files. Right now I am developing a website as a GUI for the c++ program. So the website will allow user to upload the image to and retrieve the analysis result from the server. And I have already finished the web programming part with wamp in my desktop.
The only problem now is the communication between the frontend website and the c++ program in the backend. I have never worked with server-client system before, so here are my questions:
How do I set up the communication framework between my website and c++ program? How does the website sends a message to c++ when the image has been uploaded and tells c++ where to look for this image? How does c++ send a message to the website when it has finished running? I don't have much time left for this project, so is there any basic web-c++ communication framework that I can download and develop on it?
How does the website check if the c++ program is running without error? How to check the progress in the backend c++ program?
If the user of the websites decides to cancel the previous request, how does the website stop the c++ program when it's already running?
How does the c++ support multiple request from different users? How does the c++ start another instance of the program and run on a different request?
Sorry that I am new to this area. Would really appreciate if someone can answer my questions!
Look at Wt (pronounced "witty", short for web toolkit.) it might provide more than what you want (it also does the web programming for you, but you can link css into it.) but it seems to be around what you want.
I have no personal experience with Wt, but I have tested it and it seems to work very well.
As far as I know, it uses boost.asio as the backend port framework, which might be a place to start if you would like to write your own.
The common practice is C++/CLI wrapper for a native code. You need to design an API for your code and it will be available for using in .NET applications including ASP.NET.

Host a c++ desktop application on a webpage

I am having a desktop application which having a UI interface made in Qt linked with a library which is doing all the calculation stuff. Values from UI is taken and pass to the API's in the DLL to get the output which is shown on Screen.
Now i want to do the same thing by transferring my application UI to a web page so that people can access the tool from anywhere without any installation process.
I want to retain my c++ DLL code so i don't have to do a lot of work. I am thinking of just converting this DLL to a C++ server by any communication Process(Sockets). I want to host this application on my company's website. (We have to make the website also so we are open to any set of tools).
I want to know what will be the best set of tools to do this stuff. Also there will be lot of data exchange between the webpage and server so the wholething should be optimized also. I goggled a bit and find stuff like silverlight and ASP.NET, But i am still not very clear which option will be more suitable.
I am a c++ programmer with no web application development experience. I am open to learn any new technology.
Thanks
Why not use Qt on the web directly? There are several projects like this one: http://qtwui.sourceforge.net/
There is a netscape plugin that will host a QT application and an ActiveX control wrapper on the QT website. You could use one of those to wrap your application. Note that this approach would require the user (or their administrator) to download and install the plugin.
An alternative approach might be to run your application through a remote desktop such as XVNC, NX or an RDP based layer. IIRC browser based remote desktop clients are available for most such protocols.
A few options:
pick a messaging/queue implementation (like http://www.zeromq.org/) and provide a service
implement a Windows Web Service if you want to be more enterprise friendly: http://msdn.microsoft.com/en-us/magazine/ee335693.aspx
I would not expose the implementation on the internet. Enough to have a simple buffer overflow and the machine can be taken over quickly. Adding a layer between the app and the web provides an easy way to validate input, access, stats ...
You should be able to use your DLL from an wt or cppcms application. Then you do not have to learn something new and can just use C++.
The way I'm currently doing this is with Boost.Python + django