I just read about the java 2 javascript parser and the demo with scala.
Do you have any experience with this framework?
What about performance?
Can i use existing JS code/frameworks?
I appreciate any help.
This is a very good scala to javascript cross compiler: https://www.scala-js.org/
Scala. js lets you write Scala code that is compiled to JavaScript code that can then be used in the browser. The approach is similar to TypeScript, ReScript, and other languages that are compiled to JavaScript.
Today, Scala is our language of choice for writing backend services.
You can use Scala for frontend development, but you're no longer forced to work with Node. js for the backend because you want to maintain shared code between your server and your frontend.
Scala. js belongs to "JavaScript Compilers" category of the tech stack, while TypeScript can be primarily classified under "Templating Languages & Extensions". Scala. js and TypeScript are both open source tools.
I did this more than a year ago. Performance is ok, but code size tends to be big. I would not recommend it for production, but can give away the code if usefull. There are other efforts to run Scala on the browser. Best would be to create a JavaScript backend to an existing Scala compiler.
Here are some other projects to look after:
http://greedy.github.com/scala/
https://github.com/scalagwt
https://github.com/alvaroc1/s2js
https://github.com/kripken/emscripten
http://jscala.org/
I've never found these "language X to JavaScript" tools to be worth using. Debugging, quality of code generation, interfacing and using native JS libraries, etc., etc. mostly get compromised. CoffeeScript is an exception, because it is a new syntax for JavaScript, not an entirely separate and unrelated language.
If you need to use JS (or another language for that matter), embrace it and learn it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With