Typescript on JVM passing by Nashorn
Yes, this means that I’m becoming a full stack developer using, mainly, ionic/angular for front-end development and nodejs for back-end development.
3. Is it possible to have a module system that allow to arrange application in separate well-defined modules ?
4. Is it possible to keep the same productivity achieved developing in java by using IDE like Eclipse ?
- The answer here is not so simple at all because we have to define what we mean as productivity.
In this case I’ve considered just the IDE features provided to develop code and in particular the intellisense one. So, after such assumptions, the question become:
For answer to the last question and accomplish all the points I’ve developed the Java2Typescript
The Java2typescript project
Diagram of solution
The project’s purposes are:
It use a java annotation processor that scans the given classes from project’s classpath and generate the equivalent typescript declarations that make possible to develop an application in an assisted way using a preferred typescript enabled IDE.
Developing application in such way you can :
- Reuse all pre existing Java stuff
- Use an Object oriented & type safe language (ie. typescript)
- Enable Modularisation
When use it
Currently I’m using it mostly for playground and testing purposes continuously refining/improving to make it production ready.
I think that the best use cases are for unit & integration tests but it could be very useful to develop simple workflow (or extension points) that could be updated at run time increasing configurability and extensibility of your app
I’ve realised also a Demo app available on line that has been developed using typescript on jvm provided by this project itself (dogfooding). The code is available here