Coder Social home page Coder Social logo

isabella232 / cefsharp.apphost Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cefsharp/cefsharp.apphost

0.0 0.0 0.0 156 KB

Provides a way to run part of your application out of process, including the UI

License: Apache License 2.0

C# 100.00%

cefsharp.apphost's Introduction

CefSharp AppHost

A Port of Red Gate AppHost specific for use with CefSharp This library provides a way to run much of your application out of process, including the UI.

CefSharp.AppHost.Server: Used in your host application to start the child process and return a handle to the entry point

CefSharp.AppHost.Client: A stub application that will be started with some arguments including the assembly that contains your application which it will load via reflection.

CefSharp.AppHost.Interfaces: Contains the interfaces that you need to implement, starting with IOutOfProcessEntryPoint.

Key Types & Control Flow

This library came out of the need to load multiple versions of a native binary inside a single process. This does not work, so we must load stubs inside the host process and remote in the UI that the native libraries create.

  1. IOutOfProcessEntryPoint: The code that you wish to run out of process implements this interface to create the remote UI. It is called by CefSharp.AppHost.Client via reflection
  2. ISafeChildProcessHandle: The CefSharp.AppHost.Client will take your framework element and adapt it into an IRemoteElement that can be sent across the remoting boundary.
  3. ChildProcessFactory: This will start the remoting channel, the child process and take the IRemoteElement created in the child process and unwrap it back into a FrameworkElement

Examples

There is an example application. It uses WPF to create the Windows chrome, but then the actual content is loaded externally and remoted in. It also shows how to share some services across the remoting boundary.

Use Cases

  • Write your application to take advantage of 64-bit machines with lots of memory, and load inside a 32 bit process
  • Use native libraries in a safe way that don't conflict with other assemblies in the same app domain
  • Isolate badly behaved components

cefsharp.apphost's People

Contributors

kevfromireland avatar adrianbanks avatar andrewhunterredgate avatar amaitland avatar ninjaferret avatar petergerrard avatar cawhitworth avatar jameswrightrg avatar fffej avatar juliahayward avatar redgateadmin avatar nycdotnet avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.