Code Monkey home page Code Monkey logo

chromate's Introduction

Chromate

Chromate helps you embed a HTML5 user interface in an app.

  • The user interface is standard HTML5/CSS/JavaScript.
  • The UI runs in a CefSharp browser control.
  • The back-end presents a RESTful web API.
  • Chromate provides the glue to handle resource requests from CefSharp and route them to the web API.
  • There is no TCP/IP transport overhead and latency.
  • There is no server to install or manage.

This project is in the form of an example, a Toaster app. A toaster is simple, but it has multiple UI controls, and the toasting process is asynchronous. This example uses:

  • Angular 4 UI
  • RxJS - reactive extensions for JavaScript
  • ASP.NET web API
  • C#/.NET back-end
  • Rx - reactive extensions for .NET
  • Build integration using MSBuild.Npm

Building and Running

Currently the Toaster example can be built using Visual Studio 2015 and NodeJS (6.9.x or later). It runs on 64-bit Windows.

To build and run just the user interface:

  • Navigate to the ToasterHTML folder
  • npm install
  • npm start

To build the complete C#/.NET application:

  • Open Toaster.sln in Visual Studio
  • Make sure the target platform is x64
  • Select ToasterApp as the Startup Project
  • Choose Build > Rebuild Solution

Using Chromate

To use Chromate in another Windows application:

  • Projects with "Chromate" in the name can be used by reference.
  • Projects with "Toaster" in the name are examples. You can create similar projects and selectively copy the code you want.

The build integration uses a custom MSBuild task in ToasterHTML.csproj. Unload the project and search for NpmRun to see where it was added.

The Toaster app happens to use Ninject, NLog4, NUnit 3 and Rhino Mocks. You don't have to. Chromate does not use them, except for one unit test project.

Wish List

  • Optimize MSBuild integration - sometimes it triggers on incremental builds
  • Enable building the HTML5 UI on a TFS/VSTS server
  • UI test integrated app
    • Microsoft Test Manager has a Selenium plugin
  • Web socket support
  • CefSharp support for Touch Keyboard
    • Need to expose input field type to Accessibility API
  • Refactor example code for better reusability
    • Does the web API requester have to be in the web API project?
    • Can EnableHighDPISupport be called in the form instead of the main program?
    • NuGet package for MSBuild.NPMRun
    • What else can be split off into NuGet packages?

Suggestions are welcome. Please create an issue or a pull request.

Would love to see similar projects for other environments.

chromate's People

Contributors

tombecker-bd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 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.