by 16bytes · 4y ago · 0 comments
As it turns out, if you want to create a great front-end, you need to know javascript & css. You need to understand the difference between what is running on the client and what runs on the server. Corner cases which are super easy to fix with web-tooling turn into an impossible slog of trying to figure out how to get GWT do what you want it to do.
GWT interfaces are famously brittle ugly huge monoliths that send a million AJAX requests that are almost impossible to debug or optimize. There are no separations of concern. There's no defined "API".
It's like having nobody on your team know SQL and only ever use an ORM. At some point you need to break the layer of abstraction.
My take away from my time working in GWT is that the main thing it was trying to do is fundamentally misguided. It tried to make Web development more like desktop UI development by erasing the client/server boundary. But that’s a natural and important boundary that needs to be clearly visible. And, in its effort to do so, the project ended up also creating a new artificial boundary that isn’t helpful and shouldn’t exist.
The problem isn’t writing client code in Java, BTW. There are plenty of projects like Elm that use the same language for both client and server code, and work well. The problem is trying to hide the Web behind a Swing-like API.
In particular, @GWTIncompatable made the leaking between frontend and backend an absolute nightmare. Their whole application was built on the idea that your models would be the same from the presentation layer all the way through to the database layer for 'DRY' reasons. It was horrible to work with and security was a disaster.
As soon as it comes to browser-specific issues or very detailed customer requirements you need the flexibility to look behind the abstraction layer. Then, if you do not have the necessary expertise, you are lost.