Communication with external application.

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Communication with external application.

Postby vitorrent » Mon Sep 21, 2015 10:31 pm

Best regards.

I am a noob using this framework, so my question either very basic or is completely impossible.

I need integrate a web application (embedded for URL) with a desktop application. You can help CEF?

I thought it was possible to run the webapp from CEF. and perhaps, CEF has tools for writing and reading in the database of the desktop application, depending on the requests / responses of the embedded web page.

Thanks in advance.
vitorrent
Newbie
 
Posts: 5
Joined: Mon Sep 21, 2015 9:37 pm

Re: Communication with external application.

Postby magreenblatt » Tue Sep 22, 2015 2:41 am

Yes, it is likely possible with CEF. See the Wiki pages for usage information.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Communication with external application.

Postby vitorrent » Tue Sep 22, 2015 9:14 am

Thank you very much for the quick response.

It's great! Now I start the read the documentation to learn.

I mentioned that I am a noob. I would like you to explain to roughly as CEF able to. (without any code).

I would not fit on the head. I'm used to see the browser as a sandbox, which send and receive requests and responses to the server, how I can intercept that flow, out of the sandbox, and communicate with other applications, operating system or dll?
vitorrent
Newbie
 
Posts: 5
Joined: Mon Sep 21, 2015 9:37 pm

Re: Communication with external application.

Postby magreenblatt » Tue Sep 22, 2015 11:26 am

What exactly are you trying to do?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Communication with external application.

Postby vitorrent » Tue Sep 22, 2015 12:39 pm

The company I work for has an old web application. I think that we should upgrade to a modern API that is consumed by a frondtend uncoupled. But they do not want, and the truth is that very large application.
We have a new client who has an existing system, to manage its stores, is a desktop application that runs on Windows, it has its own database. It is also quite large.

I was assigned to me, the task of integrating both applications, and thought he could do with CEF.

I imagine CEF, as a set of tools that act on the Chromium source code. Then I thought I could intercept certain responses in the browser and take the information I need, then use it on the desktop application.

I want to illustrate with a little example that has nothing to do with the actual application:

Imagine that I use CEF to embedded a URL like www.google.com
Can I use CEF for take the queries made to google? I say take because I need to use outside the browser, eg send it to the operating system: "echo 'query' >> file.txt"

Another simple example would be (it's a small part of the requirement):
The customer has industrial scales, that communicate with computer by serial port. Can I use CEF to make that the existing web application read and write to the serial port ?.
there are dlls for comunicarce with the scales,Can I use CEF to make that the existing web application to communicate with the dlls?

I apologize, I not master the English language and therefore I can hardly explain the situation. I hope to guide me a bit. I always wanted to learn to use CEF, I think this is the opportunity.
vitorrent
Newbie
 
Posts: 5
Joined: Mon Sep 21, 2015 9:37 pm

Re: Communication with external application.

Postby magreenblatt » Tue Sep 22, 2015 12:53 pm

Using CEF you can create a front-end in HTML/JS and have it execute C++ for the back-end (talk to a database, dll, etc using C++). The JavaScriptIntegration and GeneralUsage wiki pages explain how this can work.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Communication with external application.

Postby vitorrent » Tue Sep 22, 2015 1:11 pm

But, it is the client side where I have to read the dlls.

The servers are in the company. The client uses the application from the browser, through the internet, the computer where the browser is running is connected to a scales. to communicate with the balance I need to access the dll or directly to the serial port.

The browser is a sandbox and will not let me access to any, for security.

I can communicate with CEF outside sandbox?
vitorrent
Newbie
 
Posts: 5
Joined: Mon Sep 21, 2015 9:37 pm

Re: Communication with external application.

Postby magreenblatt » Tue Sep 22, 2015 1:20 pm

Your application would embed CEF as the browser. The main process is not sandboxed. You would perform the access in that process and use IPC or network stack to communicate with the renderer process where web content runs.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Communication with external application.

Postby vitorrent » Thu Sep 24, 2015 9:23 pm

Thank you very much my friend,

He had been unable to answer, because some issues occurred with an application.

In your explanation, I understood that I can intersect the responses and requests in the rendering process, using for that IPC or network stack.

Will I find all this information in GeneralUsage?

Tomorrow I will put to work.
vitorrent
Newbie
 
Posts: 5
Joined: Mon Sep 21, 2015 9:37 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 55 guests