3 ms·
See also GWT if you are just hell bent on running Java in the browser. As one of our developers commented, 'it is webforms all over again'. Also see https://www
by kenoyer130 9y ago
See also GWT if you are just hell bent on running Java in the browser. As one of our developers commented, 'it is webforms all over again'. Also see https://www.joelonsoftware.com/2002/11/11/the-law-of-leaky-abstractions/ https://www.joelonsoftware.com/2002/11/11/the-law-of-leaky-a...
For legacy apps or if your back end is Java and you need to share code, GWT and this concept is a good solution. If you are just trying to avoid learning JavaScript/CSS this will leave you very unhappy.
- rpeden 9y agoYou don't have to use GWT webforms-style: you can also use something like GWTReact[1]. It ends up being more verbose than JS or TS, of course, but might be useful if you've got a lot of business logic in Java that you want to be able to use easily in a modern web app. There's also JSweet[2], which compiles Java to TypeScript. I believe it can automatically convert TypeScript definitions into Java, so it's a good way to write Java that calls existing JS libraries. Granted, writing Java to run in the browser probably isn't the best solution for most people. But there are certain situations where it makes sense, and it doing so doesn't mean you're condemned to write an application that feels like crufty legacy garbage. [1] https://github.com/GWTReact/gwt-react-examples https://github.com/GWTReact/gwt-react-examples [2] http://www.jsweet.org/ http://www.jsweet.org/