JSweet is sweetening the life of Java developers


Now that JSweet is available via open source, it can be used by developers that want to use their Java skills to build JavaScript Web apps. After the JSweet transpiler has recently added  Java syntax to TypeScript, the life of developers is becoming much easier now that they are able to not only improve their Java skills, but also use them to build Web apps in JavaScript.

Developer and Cincheo CEO Renaud Pawlak said that JSweet was mainly created to help developers build Web apps. “In the past couple years, TypeScript has been proving that transpiling to JavaScript to add typing actually works and is efficient. In parallel, some Java developers have been desperately seeking a light and simple approach to program Web applications in Java. Some are frustrated with the idea that everything in Java should run on a JRE,” Pawlak said for JavaWorld. “Some are frustrated by these complex, heavy, and limited Java Web frameworks one can find out there. On the other hand, some are very impressed with what can be achieved with TypeScript/JavaScript on the front end,” he added.

Since many  developers face different problems while trying to build Web apps, JSweet is going to be there for them to make their work easier. “If you want to compare JSweet to TypeScript in a few words, you can say that JSweet is the same as TypeScript, but for Java. It offers an alternative to Java programmers wanting to program real Web applications. The good news is: they don't have to drop Java anymore,” Pawlak explained.

According to JSweet official site, JSweet has over 1000 well-typed JavaScript libraries available from Java and works very well with Node.js too. “JSweet does to Node.js the exact same thing as TypeScript does. [...] A small but quite interesting difference is that it handles commonjs modules in a more transparent way for the Java programmers. We have defined a @Module annotation so that requires' can be generated automatically when using the APIs. Java programmers just need to import the right packages, as they usually do, without having to know at all about JavaScript modules,” Pawlak said for JavaWorld, while confirmed that there are a few problems with his new technology, including difficulties JSweet has with  legacy Java code.

"The main difficulty for JSweet is that Java programmers will have to be open-minded and break with some Java logic when programming with JSweet. For instance, on contrary to Java, in JSweet the hashCode function does not exist and interfaces do not exist at runtime -- only at compile time. Programmers will have to understand that JSweet is not GWT (Google Web Toolkit) at all, because when you program with JSweet you have to think JavaScript, not Java,” Pawlak concluded.


Silvae Technologies Ruse, Bulgaria

44B Borisova Str.
7012, Ruse, Bulgaria

Silvae Technologies Brussels, Belgium

1000 Brussels, Belgium