GithubHelp home page GithubHelp logo

lvxingtu / webfx-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from brunoborges/webfx

0.0 1.0 0.0 14.55 MB

WebFX runs FXML and Javascript based JavaFX applications remotely

License: Other

Java 89.71% JavaScript 5.46% CSS 2.55% Groovy 0.23% HTML 2.06%

webfx-1's Introduction

WebFX

The purpose of this project is to investigate both the possibility of building a JavaFX-based web browser, as well a new concept of web pages designed using JavaFX components (by coding, and remotely serving FXML + JS + CSS files) instead of using HTML, to build rich "web pages". With the new Javascript engine, Nashorn, the performance of a JavaFX page in FXML and the controllers in JS will be much higher than it is today. The goal of this project is to build a fully capable JavaFX-based browser, with a security layer, a navigation scheme, and then common web browser features such as bookmarking, cookie management, etc.

Inverted Browser Control Concept

JavaFX contains a feature called WebView, which enables applications to use an embedded version of WebKit to render HTML5 content. As a result, developers can create applications that use this browser to access remote applications. By combining this concept, developers can continualy build web applications that may have extensions built in Java to be executed in the client-side, as long these Java-based extensions are part of a JavaFX desktop application.

Figure 1 represents the legacy of Applets and Web Browsers. It is well known that Applets are no longer supported by all browsers, and that NPAPI is being slowly removed.

Figure 1

Figure 2 representes the inverted browser control concept, where developers build their own "embedded" browser to run remotely served web applications, while expanding the capability of their desktop applications in the client-side with rich features using JavaFX, or even reusing existing Applets codebases.

Figure 2

Running Applets in a JavaFX-based browser

The WebView component does not support the execution of Applets out-of-the-box. Graphical embedded applets (those that would show within a web page) are impossible to run, but for non-graphical Applets it is possible to load them and even have them interacting with your web page's Javascript code. For an example of such use case, see project webfx-appletsupport-sample for more information.

JavaFX-based Web Browser

FXML is the JavaFX markup language used to define user interfaces. UI components can be any JavaFX core component or any 3rd-party component available in the classpath. JavaFX also supports CSS for styling the UI. A web browser powered by JavaFX is then capable of running both regular W3C web pages as well FXML-based web pages remotely served.

YouTube Demo Videos

Hybrid JavaFX Application Architecture

The image below gives developers an idea on how they can leverage existing code, both legacy Applets, and web applications, with modern development approaches of JavaFX Desktop RIA applications.

For more information, check my presentation Migrating from Applets to Java Desktop Applications

Figure 3

webfx-1's People

Contributors

brunoborges avatar pjbooms avatar dependabot[bot] avatar

Watchers

James Cloos 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.