12 ms·
Ask HN: Why isn't GWT or Vaadin more popular among Java developers?
When I think about TypeScript and Angular I break out in a cold sweat. When I remember creating UI's in GWT and it just worked, in Java, it brings back fond memories. So I'm relegated to the backend. Any other Java devs out there who'd like to to more in the front end but in Java, the language we know and love?
- PaulHoule 4y agoWhen GWT came out it was a rather unique way to write widget-based applications that run in the browser. There wasn't anything like Angular, React, Vue or Svelte. So competition is much fiercer than when it came out.
- jmartrican 4y agoI ask the same question. I use Vaadin extensively. What I really love about it is that I am able to code my frontend apps just like my backend microservices apps... e.g. with Spring Boot. You can really leverage the years of experience in Java backend on your frontend. So far I have not ran into a problem I could not fix yet. Vaadin does have a learning curve. After using it for a while, I find myself wanting to use my own components, versus the many components Vaadin provides out of the box. Vaadin has support for PWA for single site apps. For multiple site apps, I had to create my own solution that relied heavily on Servlet Filters to dynamically return the PWA files. Vaadin has a really cool testing library. It makes it really easy for me to do TDD on my frontend code. TDD is a MUST. So I quickly create a breaking test using the Vaadin testing framework... which uses Selenium underneath the hood. Using Selenium is huge cause I can get answers to my questions about testing by searching for the Selenium answer that I can apply in my tests. Vaadin also supports PUSH technology out of the box. Its super easy to use. I use it extensively to have my web pages op up quickly, then slowly get filled out as the APIs return. No need to mention how awesome PUSH technology is. Though you need to be good at multi-threaded coding. FYI, I don't work for Vaadin. Plus I am also a REACT programmer. I love REACT and find it very elegant. I shed a tear first time I used REACT. I think REACT and Vaadin are similar for me (in the sense that I can get a lot of high quality work done quickly). For personal projects I will always use Vaadin. For paying clients, they typically request REACT.... lol.
- ihateolives 4y agoDo all those things you mentioned apply to Vaadin free plan or pro?
- jmartrican 4y agoFree version. I do use pro but not for the things i mentioned. For example I use Vaadin Charts which is pro. Its ok, i might switch to another chart library but not a high priority right now.
- darkcha0s 4y agoThe is little intersection between people who do frontend development and people who are comfortable at that level with Java. Considering the tooling for almost any frontend framework is leaps and bounds ahead any of those two frameworks, it's a no brainer why no one uses it, in my opinion.
- oldjavacoder 4y agoThe fact that the pile of tools required to get a web to do anything useful is such a terrible mess including Angular and React is why I'm in full dismay that they are used by otherwise intelligent developers at all.
- ecshafer 4y agoI think the biggest reason is that they are really bad frameworks. GWT isn't really supported anymore, but for a while it was a creative way to build UI in a world where Javascript frameworks weren't that advanced. You might not like Angular, but React, Vue, Ember, Meteor, and many many others exist. If you want types and don't like the JS style, you can use Typescript. I have used GWT, I wouldn't use it again. I tried Vaadin, and it was so terrible I would never touch it again. >So I'm relegated to the backend. You are not relegated to backend. You can always learn JS Framework stuff. You shouldn't pigeonhole yourself into one area. Many many many developers do both.
- roguas 4y agoFurther frontend is a lot about developing intuitions and mindset of user. The underlying thing doesn't change, you have components, events, pages/routes. All you need is a bit of html+css.
- testbjjl 4y agoI used Vaadin a couple of years back converting a flash based app. Getting plug-ins to work was not fun, at all. Using JavaScript yourself/directly is much easier. Now I write Java and Typescript and have even more fun writing the right code for the problem while increasing my value/compensation.
- jouni- 4y agoHilla (https://hilla.dev https://hilla.dev) should be a nice match then, for Java+TypeScript.
- Traubenfuchs 4y agoFunny, I pretty much consider Angular with TS the frontend version of Java with Spring. I love working with both.
- recursivedoubts 4y agoi have an alternative suggestion (of course I do): https://htmx.org https://htmx.org rather than trying to build web front ends in a language-specific builder syntax server side and dealing w/the impedance mismatch between your language of choice and the actual realities on the ground in HTML, you use a more powerful hypertext instead this lets you accomplish more in HTML, but also moves a lot of logic back to the back-end, so you are able to spend more time in your preferred language and framework its an alternative approach to spending more time in your preferred language, it is just a hop skip and a jump beyond the normal HTML everyone knows anyway, and it transfers to any back-end that can produce HTML/hypermedia (nearly all of them) </shill>
- spacemanmatt 4y agoHTMX kept making my radar until I learned React. Now I consider Next/Mithril/SolidJS ahead of HTMX. I'm not sure how legit it is to track the evolution of items I don't get around to trying. :)
- Induane 4y agoI'm not sure they solve the same problems; if you NEED the REST api and want to keep all of that consistent then something like react makes more sense. If you're just building a webapp then you can do a low-js SPA app that's often significantly simpler AND more performant with HTMX. But as always, different projects have different needs. <3
- smallerfish 4y agoI think GWT lost the plot when they moved to browser based debugging (the initial version supported IDE debugging of frontend code, which was awesome.) Kotlin.js is getting pretty close to the ideal. Look into KVision, which is a framework on top of Kotlin.js, which is pretty ergonomic.
- gwbas1c 4y agoI did a few learning projects in GWT when it was new, in 2007. It was truly groundbreaking. Fast forward to 2022 and GWT is completely obsolete. Today, systems like this compile to WASM. (IE, C# in the browser is done with WASM.) Furthermore, manipulating the DOM in code, as done in GWT, is extremely tedious and time-consuming compared to template-based approaches. GWT's live debugging leaves a lot to be desired. Finally: Google abandoned GWT development. When I looked at its site in 2020, it looked like a hobby project; or something maintained by a small group of developers who still had projects using it. Honestly: Don't be afraid to try a new language! In-browser development with C# (via Blazor) is really awesome, and coming from Java, it'll be an easy transition. (And it really is much, much better than GWT.)
- zasdffaa 4y agoI don't know. Learning a new language isn't to be taken lightly and while I sort-of like C# I'm constantly aware that it's MS's property and shit is going to change and break. Also it seems Blazor is by MS, so ditto twice. I do not trust MS not to screw anyone over. Caveat emptor. If you want to learn a new lang and still have java access, maybe look into scala. I really did like that but I don't know what state it's in now.
- gwbas1c 4y ago> while I sort-of like C# I'm constantly aware that it's MS's property and shit is going to change and break You can say the same about Sun. There's also the Mono project, which is kind of the analog of OpenJDK.
- kaba0 4y agoWhile the GUI frontend part in GWT is indeed mostly abandoned by Google, they still use the Closure compiler (which is the evolution of GWT in a way) very heavily in all of their flagship web applications. That way, most of the business logic is written in Java on every platform (backend, frontend with the aforementioned compiler (which produces crazy good output), android, and ios with a similar objc compiler), and the frontend can be native everywhere, which is imo the best tradeoff.
- notwhatyouthink 4y agoHad a peer the other day tell me he wanted to use Microsoft Blazor on a new project. I didn't know what that was so I did some research. After some research I finally determined that it was basically some kind of frankenstein between Vaadin and GWT for C# developers. My first thought was yep we tried this before with Java.
- xxs 4y agoMicrosoft had Silverlight, it's end of life now... that pretty much tells the story.
- 16bytes 4y agoI can't speak to Vaadin, but adopting GWT was a huge mistake at my old company. We bought into the promise that you didn't need front-end developers or retrain on front-end tech, you can just use Java that you know and love! 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.
- moasda 4y agoExactly. The abstraction is good to have quick first results. 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.
- bunderbunder 4y agoAlso, GWT makes interacting with JavaScript libraries VERY painful. You have to go through a JNI-like FFI to do it. 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.
- n00bskoolbus 4y agoAgreed, this was the same pitch at my old job. "We can all keep writing Java and have a consistent front end". Which was true to some extent but we had very few people who were proficient with CSS/HTML so when we had to build out new components it always went to them or was time consuming for other people. They use React/Redux now and have a few dedicated front end teams.
- gedy 4y agoI used to love Java and was very into server side UI frameworks like these and Wicket. Issue was though UIs started becoming a lot more stateful, and trying to manage complex state on server and synced to client brings a ton of complexity and scalability issues. (Memory was tough to manage with wicket, etc) Browsers and JS engines became way more powerful too and it just made a lot more sense starting about 10 years ago to do more UI on client. If you actually enjoy UI development, the modern JS options are way better than the alternatives and you should try them out. (I'm talking applications, not old school websites with no state between views)
- zactato 4y agoYou're relegated to the backend not because you know Java instead of Typecript, but because you don't understand the problems of frontend development. Thinking about how a user interacts with a page, how asynchronous data loads, different screen sizes, how to handle intermittent connections are very different problems than most backend developers deal with. They are all very complex topics that have been evolving over the last 15 years. Modern frontend frameworks focus on addressing these complexities. Because JS/TS are the language of the frontend, the best frontend frameworks are written in these.
- jeroenhd 4y agoAsync data loading and intermittent connections are something backend developers should actually be prepared for, even though some of them like to pretend everything is always available quickly and reliably because of "cloud". In my experience as a "full stack developer" frontend likes to reinvent itself rather than find new solutions to problems. We've had responsive design policies for years now and touch screens have been the norm, I don't think you need a "modern" library for anything, really. Just one that works well enough and a big chunk of well thought-out CSS. I think technologies like Blazor are more useful to practical application development than a new version of React/Svelte/Vue where the widgets are now Fogo-based rather than Bar-based because the library developers considered it a better API. In a perfect world, you don't need two languages for frontend and backend. You can torture yourself by adding the Node stack to the backend, or try something like that new Kotlin project, but it's clear we're still quite a ways away from well integrated web application development.
- papruapap 4y agoI dont think you have checked Blazor runtime libraries size. Last time I tried, it downloaded 5MB wasm files to the client in a simple hello-world screen.
- jeroenhd 4y agoPersonally, I don't think Blazor is really finished, I wouldn't use it in production. It's more of an example of what can be. Ultimately, I don't think 5MB blobs are all that bad for web applications that need the enormous complexity these libraries provide. Classic Django/Symphony/Spring Boot with some CSS animations and Javascript glue can work perfectly for the smaller apps. For things that aren't applications, you shouldn't need any framework at all, websites can/should just be static files to make everyone's lives easier.
- api 4y agoTried it once. It was clunky but interesting for its time. The big draw was to get away from JavaScript, but today you can do that in better languages like Go or Rust using WASM or you can use TypeScript to get a JavaScript that doesn't suck as bad.
- oldjavacoder 4y agoThe only languages worth their weight are Java and C.
- dangerboysteve 4y agothere seems to be a good push for server side front end development in other languages like LiveView (Phoenix/Elixir) , Livewire (PHP/Laravel) and Stimulus Reflex (ruby). There are many more.
- invalidname 4y agoWe built our startups web UI on GWT. It was super easy to get started and we had a decent looking UI in no time. Then newer JS frameworks came along and our site looked obsolete and crappy by comparison (I'm talking circa 2014-15 or so). We started looking at making the GWT code look good visually. The pain was too big, styling this thing vs. just using ready made JS and HTML to create a simple UI. We eventually dumped GWT which was easier than going through the pain of adapting the UI. It seemed the community was dead and Google abandoned this long ago. Vaadin seemed nice but overly focused on the server aspect which we didn't feel we needed. Even they moved off of GWT eventually. Today we still use TeaVM as part of Codename One itself to create web UIs. It works great and since we have the UI aspect working its good. But this works more like a Flash applet and isn't meant to be a website or typical web app.
- oldjavacoder 4y agoSomeone else mentioned TeaVM and SnapKit, I plan to look into those.
- MrBuddyCasino 4y agoWe use Vaadin for admin frontends in Spring Boot backend services written in Kotlin - this way the BE team can build admin UIs without frontend dev involvement. For that, it works ok. Everything user-facing is React.
- ihateolives 4y agoThere's also https://j2html.com/ https://j2html.com/. I've been wanting to try it.
- gordaco 4y agoI miss GWT. Glad to see I'm not the only one. Then again I don't like web programming at all and I'd rather write a desktop UI, which explains it, I guess. I miss the times when UI didn't necessarily mean web. I guess I'm obsolete.
- bootcat 4y agoI don't know why but I do feel there is a gap here to empower backend developers to take over the full stack. ( I am one of the developers looking out for a good maintained, component rich, completely supported JVM java based FE framework ) One of my reasons not to pick Vaadin was that it was backed by a company rather than a open source community. ( this seems better now in terms of support ) I do see other JVM languages like Kotlin seeing some success here. Did you guys see dart and flutter ? I am pretty sure Java can do a comeback in terms of compiling to JS and taking the power from react/typescript guys !
- oldjavacoder 4y agoKotlin is not and never will be on my list of languages.
- tannhaeuser 4y agoFYI, GWT lives on as J2CL and is integrated with closure-compiler. Only the front end lib that was GWT is gone - arguably what people used it for though. AFAIK J2CL is still heavily used for gmail and gdocs ie those projects haven't been rewritten from scratch. J2CL sees less use than GWT used to since there are alternatives today for typed large-scale browser app development (such as ts), and also because J2CL is wrapped in Bazel build scripting, though J2CL and closure-compiler can be used from regular Java build tools or the command line as well via plain "java -jar ..." invocation. Technically, J2CL/closure-compiler, and the level of optimization and minification it can provide is unmatched by the likes of TS et al last I checked. Why one would use Vaadin (or Echo before) is a mystery to me though - these latter tools are putting too much weight into Java the language/ecosystem, for Java traditionalist developers who can't be bothered to learn something else IMO.
- jeffreportmill1 4y agoI'm interested in J2CL, but surprised by the sparse implementation of the JRE. I currently use TeaVM and CheerpJ which have both managed a much more complete JRE implementation despite less backing. I don't have the resources to help much myself, but I hope the JRE gets more support in the future.
- tannhaeuser 4y agoThe JRE emul stuff is from the gwt times so as old as the hills; I wouldn't hold my breath it'll ever get major official updates for things like java.io and similar.
- maldev 4y agoAs others have said, GWT was really groundbreaking, but it ended up making codebases turn to mush really fast. I would look into Blazor if I were you. It lets you use C# with javascript to make not only webapps, but apps on pretty much any platform with no tweaks. It's pretty much GWT done right.
- oldjavacoder 4y agoI do Java as I've done for several decades. I tried C# years ago despite Microsoft. Java and the JVM are superior, technologically and morally to anything they can come up with.
- labrador 4y agoGoogle came up with Dart so they could move away from GWT and now use Dart extensively internal to the company. Why would I want to use GWT and not Dart?
- kaba0 4y agoWhere exactly is that extensive usage? I am fairly sure Java is more used inside Google on every front than Dart is.
- labrador 4y agoGoogle engineers use Dart to create many apps, including some that are essential to Google’s business. For example, if you use the Google Ads web or mobile app, you’re using a Dart app that supports much of Google’s revenue. Also, the Assistant team at Google uses Dart for features in Smart Displays, as described in this announcement. https://dart.dev/community/who-uses-dart https://dart.dev/community/who-uses-dart Flutter 1.0 is officially announced on Dec 04, 2018. After that, the demand of dart programmers is gaining popularity now. Because entire flutter app development is completely based on a dart. It seems that tech-giant Google has some big plans with the language. That’s why dart is implemented on two big projects including flutter and fuchsia OS. https://dev.to/harshuinc/dart-the-language-behind-flutter-and-fuchsia-os-4pi2 https://dev.to/harshuinc/dart-the-language-behind-flutter-an...
- ihateolives 4y agoThe fact that after all these years that page only lists AdWords, is not encouraging. I too write Dart (not Flutter), but let's not kid ourselves, Dart is not extensively used anywhere, even within Google.
- labrador 4y agoIt must sometimes be demoralizing for a respected member of the programming community (Bob Nystrom - munificent) who worked on Dart at Google, most recently adding null safety, for people to constantly sh*t on Dart on Hacker News, especially since it's a really nice language that is going unappreciated
- throwawaymap 4y agoGWT was great for boring tech stories back in the day. It was briefly alluded to in one of the comment I think but, at least to me, GWT's killer feature was porting big legacy battle-tested core GUI SDKs to HTML5 compliant browsers. e.g., circa 2010, we were porting 50k+ LOC mapping/GIS libraries to the browser and it worked way better than we thought it would. This was a unit tested codebases that were being used for at least 5 years on the desktop. We were also able to get touch gestures working decently on it. To second another comment, these days WASM would make more sense, but back in the day customers would be taken aback when were able to provide niche mapping features they were used to seeing on the desktop pop up on the browser.
- Rezwoodly 4y agoJust because it makes you break out in a cold sweat doesn't necessarily map to others. I can work comfortably on both ends of the stack. I despise gwt and vaadin. Why would I want to pick an inferior technology because someone has an inability to program in a different syntax or spend a few weeks on the job learning about a new framework. Jesus.
- AtlasBarfed 4y ago"inferior technology" .... I turn my head and look at javascript. GWT had a place back when the frontend capabilities of browsers were very very badly balkanized and pathetic. Now it doesn't. .... and don't look now, but server-side rendering, like bellbottoms is trendy again! " spend a few weeks on the job learning about a new framework" ... um, have you seen React? and in the few weeks you spend learning it, the entire javascript ecosystem has moved onto a new micropackage manager.
- jimsmart 4y ago> GWT had a place back when the frontend capabilities of browsers were very very badly balkanized and pathetic. Everything that GWT did, frontend-wise, could be done just fine in any of the 'pathetic' browsers back then. Frontend capabilities of browsers were pretty good, if you knew what you were doing. (After all, GWT ran on top of that exact tech) GWT's USP was that it enabled Java programmer's to build browser-based frontends, and not worry about HTML/CSS/JS. In theory at least — in practise: you'd eventually meet the edge of what GWT could do, the shit would hit the fan, and then you'd have to jump through hoops to e.g. integrate some JS library. > server-side rendering, like bellbottoms is trendy again! Modern server-side rendering actually still serves a modern JS SPA, with the exception that it hydrates (pre-populates with data/etc and renders) the page it serves. — Your bellbottoms might look about the same at first glance, but it's a long way from being a simple apples-to-apples comparison. > React? and in the few weeks you spend learning it, the entire javascript ecosystem has moved onto a new micropackage manager. I've built apps for big clients using React (and SSR, FWIW). You pick your package manager and build system at the start of the project, and then you generally stick with it until (well after) the end of the project. Tech always changes. But for many big projects, you stick your stake in the ground, and work with that — it's a fool's errand to try and keep updating a real-world project to always use this week/month's fashion, and no decent management should even entertain the thought. Doesn't mean you can't build a project on pretty recent versions of s/w though (e.g. React). Upgrades and changes to systems (e.g. package managers, build systems) should be managed properly, not chased like some primary goal of s/w development.
- smrtinsert 4y agoI remember JSF being big around the same time and working well enough (especially a4j ajax for jsf) so I think people preferred that as an interface since it was more similar to what they already knew, jsp.
- smrtinsert 4y agoI'm really interested in https://hilla.dev/ https://hilla.dev/ these days but I doubt any company I'll work at will use it as everyone seems to be react focused. I remember the hilla devs saying they were going to work on it compiling to wasm.
- oneplane 4y agoMostly because today, a Java application is either a back-end application or a dead-end project. Everything a user touches is either native or web, and you can't get proper UX if you skip steps and try to magically render a useful UI as a non-UI developer. It used to be much more acceptable to have "any" UI, but today, if you can't make a generic bootstrap, tailwind or react based UI, you might as well stop and hand that task over to someone else. Dojo (the JavaScript framework) and ExtJs essentially died the same death (yes, there are still UIs based on those, and the instantly feel like 2006) because of the same reasons, while being completely web-targeted; they tried to make a Swing/AWT/WinForms type of application design a "thing" for the web, which didn't really work out long-term. It was great while it lasted.
- mike_hearn 4y agoThe language you write an UI in, isn't directly connected to how it feels. There are plenty of old feeling web, native and mobile apps out there. Some years ago I wrote a desktop app in JavaFX. This is a Java UI toolkit (though I wrote in Kotlin), but, you can style it with CSS. It was a piece of cake to give it a GitHub-ish feel. The result felt a lot like a web app, just without the browser chrome. The app in question was a peer to peer app that benefited from some libraries written in Java, so it was a good fit for what the app needed to do. At the moment it's a bit painful to do this sort of thing because of a lack of good distribution tools. But, that's about to change ...
- oneplane 4y agoJavaFX was about to be revolutionary for over a decade ;-) First it was availability, then it was integration, then it was build tooling and now it's distribution. Most of the Java-for-the-user only exists on Android and niche markets (like some financial software). And while it's true that the language doesn't determine the UX, the different things I mentioned (frameworks, languages etc.) are mostly relevant due to the mindshare, adoption and general availability of up-to-date resources to get the job done.
- mike_hearn 4y ago
- javajosh 4y agoThe biggest reason IMHO is that it was yet another GUI toolkit unrelated to Swing. It might have done better if it was more Swing-ish. This may be common knowledge, but I want to point out that Java's biggest problem was and remains distributing the runtime. And it's on this basis alone that JavaScript has won. Swing is a good toolkit - Swing is still used by Netbeans and IntelliJ, and a handful of other popular tools. Both of those tools have good round-tripping interactive form builders. It's a lot of value, but yeah, distribution is so bad you can't realistically access that value. (Compiling to native with Graal is an interesting option.)
- jeffreportmill1 4y agoI use SnapKit to do Java desktop development which compiles easily to JavaScript using TeaVM. SnapKit is both modern and conventional, a good middle ground between Swing and JavaFX. But most importantly, it combines the traditional win of desktop Java UI dev with the ease of web deployment. SnapKit: https://github.com/reportmill/SnapKit https://github.com/reportmill/SnapKit Demos: https://reportmill.com/snaptea/ https://reportmill.com/snaptea/ Disclaimer: I am the primary author, so this is self-serving. But it doesn't mean it sucks. :-)
- jitl 4y agoThe demos feel fast on my iPhone, but deeply weird to squint at a teeny tiny 2000s style UI on my smartphone. Have you thought about “retina” or “responsive” UI patterns? I guess if you’re explicitly targeting only 2000s desktop users you don’t need it, but more and more consumers have 13” HiDPI tablets or touch laptops, and all consumers have touch phones.
- jeffreportmill1 4y agoSnapKit does support Retina/HiDPI, but most of the demos assume a larger default screen. The look is a little dated, much of it due to the gray backgrounds. It just needs a couple months of work from someone with more aesthetic design sense than me.
- oldjavacoder 4y agoDefinitely worth a look thank you! On another note, I've experimented successfully with https://www.jsweet.org/ https://www.jsweet.org/.
- jouni- 4y agoWhile this looks impressive technically (everything rendered using <canvas>), it seems completely inaccessible to anyone else than users with a pointing device.
- TeaVMFan 4y agoTeaVM is faster and more web-centric than either of the mentioned options: https://blogs.oracle.com/javamagazine/post/java-in-the-browser-with-teavm https://blogs.oracle.com/javamagazine/post/java-in-the-brows... * Super fast builds * Complete Maven builds, no JS build nightmares * Minifying, obfuscating * Full, fast, HTML/CSS-based component framework. * Works with any JVM language, not just Java See a TeaVM-based game, Wordii: https://frequal.com/wordii/ https://frequal.com/wordii/
- oldjavacoder 4y agoThis sounds encouraging, yours is around the third comment I've seen so far about TeaVM.
- MockObject 4y agoI started a GWT project last winter, but abandoned GWT and replaced it with Bootstrap + JS, because * There was an odd bug I had no clue about, where the top 2/3 of the page was unclickable, until I added enough elements on the page to cause scrolling * Ugly layout, which the docs advised me to fix using CSS, which was exactly the approach I was trying to avoid * No native support for server push, like websockets * Pinned to Java 8 * Innate layout issues, like the clipping of panel edges
- KronisLV 4y agoI think that creating UIs in Java is only doable (well) when you have appropriate design tools - so in theory even Swing or OpenJFX (https://openjfx.io/ https://openjfx.io/) are okay. But once you start creating web apps, it all kind of breaks down. I'd say that Vaadin was one of the less painful attempts at getting that architecture to work: it was only hard to customize when you tried doing something lower level, especially table display with custom row/column groups and how components look, as well as only had weird issues with reloading data often, like a progress bar during long processes and only certain parts of it broke when attempting version upgrades and it only was kind of slow when you needed to recompile the widget set and it only seemed to have some non-critical resource issues in some environments and it only sometimes failed in weird ways on the server. Contrast that to PrimeFaces (which is based on JSF), the bane of my existence in legacy projects: complicated life cycle that generally causes bugs with dynamic pages and complex use cases, dynamic component ID generation but querying that only works sometimes properly (the whole naming container distinction), the need to bind front end state to back end fields, but also needing to expect lots of getter/setter calls, especially when you also need to throw in serialization for objects that you'd like to connect to your dropdowns, which in practice will more often look like storing the IDs from another list of options (though even simple things can break, like your dialogs disappearing after AJAX if someone didn't bind the visibility parameter), just generally a hard time creating custom components with their own back end behavior, especially when trying to reuse those in different contexts, problems if you ever need to mix JSF and JSP tags and even libraries like OmniFaces breaking on you, especially after updates. Honestly, I'm afraid that I don't recall most of the particular details, but on a 5-10 year old project my experience with PrimeFaces could be summed up with one word: pain. I'm not saying that you absolutely cannot write good applications with a server side rendered approach, even with the more complex state management solutions (e.g. what Vaadin or PrimeFaces/JSF have), it's just that in practice you might be biting off more than you can chew - because once you venture off the beaten path, you'll find that the abstractions will leak their details and you'll be dealing with things that would have been easy with JS/TS/CSS/HTML becoming hard. That said, Angular also feels a bit more complicated than it needs to be (though it does have a nice amount of functionality out of the box), personally I'd look more in the direction of React, or more recently, Vue (since it seems to do hooks a bit better than React), with simple RESTful API in the middle. That way, you have a clear separation between the front end and the back end, both remain testable and debuggable in separation, there's no leaky abstractions to deal with (or at least the ones that are there are mostly well known and you also won't kill your career by becoming a developer of a largely obsolete tech either). Even with all of that, I might still look in the direction of Ruby on Rails, PHP with Laravel or even Java with Vaadin for when I need an admin panel and there are few design requirements to speak of - only functional ones for the most part.
- efxzsh 4y agoNot Java, but close. With Kotlin, there is a version of Jetpack Compose (Android UI framework) ported for the Web. It's still experimental. Produced size is a bit too much (because of Kotlin/JS not being super optimized yet). https://compose-web.ui.pages.jetbrains.team https://compose-web.ui.pages.jetbrains.team Vaadin has been around for a while now. I don't know how people feel about it. There is still some room for them on the market. It's "just" a backend service (Spring/VertX/etc) + a UI library (Vaadin's one/etc). It could look like Next.js but for JVM languages. Just thinking out loud.
- jojule 4y agoVaadin Flow works great with Kotlin.
- oldjavacoder 4y agoI've no interest in any Russian connected project including Kotlin, IntelliJ or nginx these days.
- jojule 4y agoCheck out Vaadin Flow framework. Modern single page web app in 100% in Java. Everything just works. And looks beautiful by default.
- oldjavacoder 4y agoI'll give it a look, it's been years since I checked Vaadin out.
- Rosalia 4y ago[dead]
- skyzyx 4y agoGWT can fuck right the fuck off.