GithubHelp home page GithubHelp logo

j4ts-quickstart's Introduction

j4ts-quickstart

A quickstart project to get started with Java library support for TypeScript/JavaScript

DISCLAIMER: this project is under construction and is open for contributions.

Expected content

  • A basic support for a simple Java API (for instance the BigDecimal class) so that users can clone the project and get started from there
  • A HOWTO (in this README), that explains all the steps for creating a new Java API support.

HOWTO

(Still under construction)

In this section, we explain how to create a new support for an existing Java API and the required steps to create/compile/publish the project.

  • Step 1: Create the J4TS project Just clone this repo to start from an existing minimalistic project.

  • Step 2a: Import the source code of the Java API If you have the source code of the Java API you need to support, one way to start is to import the Java source code as is and try to compile it with JSweet (mvn generate-sources). It is likely that it will not compile as is because it will miss dependencies to other Java API. In that case, go to step 3.

  • Step 2b: Write a minimalistic version of the Java API in Java This is the preferred choice if you don't have/own the source code, or if the source code is too Java-platform-dependent to be transpiled easily.

  • Step 3: Solve external dependencies If you imported existing source code, it is most likely that it depends on a Java library. If this Java library is already supported, you can just add it as a Maven dependency. Otherwise, you also need to provide support for this library. This is where it can become complicated... It is likely that an existing JavaScript library will make the implementation much simpler (for instance, for implementing Java BigDecimal, using the JavaScript library big.js will save you a lot of time - eventhough the behavor might not be fully similar to Java).

  • Step 4: Compile and share TBD

j4ts-quickstart's People

Contributors

renaudpawlak avatar

Watchers

 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.