3 ms·
Funny to read this--talk about the benefits of strong-typing, etc. The dynamic nature of JS was once a benefit. Granted, it wasn't initially purposed for full-o
by unclebucknasty 9y ago
Funny to read this--talk about the benefits of strong-typing, etc. The dynamic nature of JS was once a benefit. Granted, it wasn't initially purposed for full-out browser facing SPAs, etc.
Still, strong-typing has been with us forever and, in general, I feel like we've solved this problem. I'd like to see a light-weight VM framework that supports Java code compiled down to JS, with an in-browser Swing-like component framework (no, not applets). But a lot of the tenents of async, event-driven Swing style dev (including using workers to keep i/o off the event thread), actually overlay nicely with the challenges that modern JS frameworks are attempting to solve.
I know there's not a lot of Java-love around here, but, pick any language that has modeled out this problem and has a cadre of seasoned developers. Then, rather than re-invent the wheel, just port that to the browser.
- abalashov 9y agoIt's funny: I'm not even a web developer by trade, and perhaps precisely because of that fact, every other day at least I have a conversation with a colleague that goes something like, "Wouldn't it be great if there were Swing for browsers?" The idea of pre-styled and easily laid-out widgets holds a great deal of appeal. Vue and Bootstrap come close to giving me that, but not quite.
- unclebucknasty 9y agoYeah, Swing is actually fun to write. Possibly because its paradigm is elegant and such a natural fit for the problem that you don't spend time fighting to fit a square peg in a round hole. Shame it came with such an unwieldy deployment model that it never gained more traction.
- abalashov 9y agoFor me personally, the biggest selling point is not having to evolve the skill set of design and layout. I'm a developer, not a designer, and the ROI on me learning the fine points of CSS is very low. I already know the bottom 80% of CSS, but who doesn't? It's the top 20% where the "magic" happens, as with so many things. Pre-styled, if unremarkable componentry is what I need to deliver business outcomes. Bootstrap is made for people like me, but something like Swing would make it even easier.
- unclebucknasty 9y agoYeah, that's true. Devs spend too much time pixel-wrangling in the minutae of CSS. But, for me, it's not just the styling, but the architecture and componentry for modeling out async, event-driven web apps in a more natural way. And, I think that's the piece you're referencing that Swing can add to Bootstrap-alone.
- abalashov 9y agoI would agree that the deep inheritance hierarchies in verbose OO environments like Java actually do make sense for UI work. I think that's the one area in which they actually do make sense. Otherwise, it's all mostly a fantastical contrivance that leads to far too much boilerplate.
- fotcorn 9y agoCheckout Element [0], in my opinion it comes very near to a "Swing for browsers". There is a version for Vue.js and React. [0] http://element.eleme.io/#/en-US http://element.eleme.io/#/en-US
- cjalmeida 9y agoCheck Vaadin. Might suit your taste.
- unclebucknasty 9y agoJust took a glance. Great tip. Looks promising. Thanks!
- JBReefer 9y agoYou can sort of do this with Emscripten + webasm, though I don't think async is supported yet.