Desktop application development based on Cefglue

Source: Internet
Author: User

Original address: http://johnnyfee.github.io/csharp/2013/12/21/cef-glue/

Objective

If you want to use web technology to develop desktop clients, and the language you want to use is also C #, be patient and look down. The core of developing a desktop client using Web technology is to use a component that can run the Web front-end independently, such as the webview of the Webbrowser,android platform in WinForm, the webview provided by QT, and so on. For desktop client development, the use of WebBrowser space relies on the client-installed version of IE browser, and the various criticisms of IE itself are daunting. Today, Chrome has grown by leaps and bounds, and its core CEF and WebKit are open source. Some chromium-based browser controls came into being when chromium was developed in C/s + + to be used in C # and needed to be encapsulated again. Today, the chromium-based C # package available on the market is:

    • xilium.cefglue
    • cefsharp
    • o.n.e
    • webkit.net
    • open-webkit-sharp

about the merits and demerits of these projects,   between Ox A and ox C   Do a very detailed comparison, please see  . NET multiple WebKit kernel/blink kernel Browser Preliminary evaluation report  . The final winner is   xilium.cefglue  . Previously, the author used   cefsharp   The obvious advantage is that the intermodulation between JS and C # is very handy, because this author is only using Cefsharp to develop a gadget, so performance and publishing issues are not met for the time being.

    • CEF1 is single-process. More features, less memory usage, and a more perfect combination with client applications, using the WebKit API, but Flash does not play properly in this framework, does not support HTML5 audio and video, only supports NPAPI plugins. For NPAPI plug-in knowledge, see here:  http://developer.chrome.com/extensions/ Npapi.html . The

    • CEF3 is multi-process. The use of asynchronous messaging to complete communication between the main process and other processes (other processes may be webkit or V8 parsing engine processes), using the chromium official-Content rendering API, support for NPAPI and Ppapi plugins, a separate process for debugging, Compared to CEF1, although can play Flash and other video, but there are many problems have not been disposed of, the community people think CEF1 more stable.

Here we Analyze the problems that need to be solved in Xilium.cefglue development desktop applications.

Run official democlone or download Cefglue

Cefglue Source address is https://bitbucket.org/xilium/xilium.cefglue/ , inside in addition to the source code, also contains WinForm and WPF demo. Clone or download it down.

After downloading, unload or delete the CefGlue.Demo.GtkSharp Project, this project is used on the Linux platform. will be CefGlue.Demo.WinForms set as the startup Project.

Download CEF dynamic Link library

Cefglue dependent CEF version support please refer to http://xilium.bitbucket.org/cefglue/ . Cefglue the latest version of CEF currently supported is 3.1650.1503, which is the latest version of the current CEF (not the development Branch) for http://cefbuilds.com/ .

CEF also provides Linux, MAC, Windows platform x86, x64 version, all of this author's experiments are done on the Windows platform, using the system for  Windows8 x64  . If your machine is x64, then the CEF versions of x64 and x86 can be used. The only difference is that if you are using the x86 version, you will need to cefglue the project  cefglue.demo.winforms   Engineering properties    target of the >build

  • Willcef_binary_3.1650.1544_windows64/Release/  or cef_binary_3.1650.1544_windows64/debug/   content copied under the Cefglue project under the Span class= "Apple-converted-space" > cefglue.demo.winforms/cefglue.demo.winforms/bin/debug/   directory. Of course, in actual projects we may copy these files to a folder in the project catalog, and then copy them to the debug directory using the Build Event option under Project Properties, as described in   how to use Cefglue to develop a simplest browser  .

  • Will  cef_binary_3.1650.1544_windows64/resources/locales   directory to copy the file to the Code class= "Prettyprint" style= "padding:2px 4px; border-radius:3px; Border:currentcolor; Color: #333333!important; Font-family:monaco, Menlo, Consolas, ' Courier New ', monospace; White-space:normal; Background-color: #f7f7f9; " >cefglue.demo.winforms/cefglue.demo.winforms/bin/debug/locales   directory.

Run can be successful, if you have any problems, welcome to discuss together, or join QQ group 244840771, group master for 牛A与牛C之间 .

Desktop application development based on Cefglue

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.