Git Product home page Git Product logo

netbeans-html4j's Introduction

HTML/Java API

In need of cross platform, client side interaction between Java and JavaScript?

Linux Mac OS X Windows Javadoc Linux Windows

The HTML/Java library provides basic building blocks as well as advanced high level concepts to make communication between JavaScript and Java as smooth as possible.

Read more in the latest javadoc documentation.

Portable Applications

Every browser widget Java API offers ways for communication between Java and JavaScript running in such widget. However, each of them is unique - e.g. one writes different code when communicating with JavaFX WebView, different one when communicating with Android WebView, yet another one when talking to iOS WebView.

The goal of HTML/Java API is to unify this communication. By providing simple and highly portable building blocks one can create sophisticated APIs (like UI bindings, charts, maps, canvas, or SnapSVG) that can be embedded into Swing or JavaFX applications, executed headlessly on a server or executed anywhere HTML/Java API was ported.

Various ports of this rendering pipeline were built including support for pure webkit desktop rendring, Android WebView and iOS WebView developed by DukeScript project.

This technology has also been adopted by some Java bytecode to JavaScript transpilers - for example TeaVM or Bck2Brwsr VM - as such you can also run the same Java application in a pluginless browser.

Porting of HTML/Java rendering pipeline is as easy as implementing Fn.Presenter interface and successfully passing the test compatibility kit. Since version 1.7 the project provides pre-made protocol based ProtoPresenter skeleton to simplify integrations with new platforms.

Getting Started

The HTML/Java API is IDE and build tool neutral. It can be used with Ant, Maven or Gradle. It is easy to edit it with Eclipse, IntelliJ or NetBeans. Here is a short introductory video to get started with NetBeans 11.2 and its Gradle support:

OpenJFX Lite by Geertjan

The most comprehensive getting started guide is available from the DukeScript project website.

Contributing

You can contribute to development of this library by forking its GitHub repository. Change, modify, test:

$ mvn clean install

and create a pull request, which may then be merged into the official Apache repository.

Full History

The origins of the code in this repository are older than its Apache existence. As such significant part of the history (before the code was donated to Apache) is kept in an independent repository. To fully understand the code you may want to merge the modern and ancient versions together:

$ git clone https://github.com/apache/netbeans-html4j.git html+java+both
$ cd html+java+both
$ git log boot/src/main/java/net/java/html/boot/BrowserBuilder.java

This gives you just few log entries including the initial checkin and change of the file headers to Apache. But then the magic comes:

$ git remote add emilian https://github.com/emilianbold/netbeans-html4j.git
$ git fetch emilian
$ git replace 408363d d029b8e

When you search the log, or use the blame tool, the full history is available:

$ git log boot/src/main/java/net/java/html/boot/BrowserBuilder.java
$ git blame boot/src/main/java/net/java/html/boot/BrowserBuilder.java

Many thanks to Emilian Bold who converted the ancient history to his Git repository and made the magic possible!

netbeans-html4j's People

Contributors

bdelacretaz avatar dependabot[bot] avatar dukescript avatar ebarboni avatar eppleton avatar geertjanw avatar jtulach avatar rqu avatar toni-epple avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.