16 ms·
I've heard that some people build UIs with thousands of dependencies, in JavaScript that hits the server for text that is then parsed to object that are then pa
by mosselman 7y ago
I've heard that some people build UIs with thousands of dependencies, in JavaScript that hits the server for text that is then parsed to object that are then passed through all sorts of classes that each spit out HTML. They also do some weird stuff with events like key-ups in order to re-render input fields based on objects rather than letting the browser manage those kinds of things.
Sounds pretty weird to me.
- cuddlecake 7y agoSounds weird if you phrase it in a weird way, yes. Just like communicating with strangers via on-demand electric currents is weird as well, if you phrase it like that.
- atoav 7y agoI have been thinking about this weirdness a lot. In my book communicating via electric currents while seeming weird, isn't because of it's pure practicality. Digitizing these currents instead of transmiting an analog signal seems weird, but isn't because it allows faster, errorfree and more diverse communications etc. You can go on and follow the technical developement, but you will inevitably reach a point where people stopped understanding the whole stack below them and instead started to cobble together new abstractions from the things they did – until the next generation came and abstracted that. We all know this – it is far easier to add onto something existing, than removing or changing existing things that are just not good enough for the things we want. So at a certain point you stop doing the rational and efficient thing to solve a problem, but react to more or less organically grown structures and go a extra mile to solve problems you might have never had if you included these capabilities in the existing layers below. But the existing layers below were written ages ago in languages you hate by obscure circles talking on mailing lists, so we don't even bother. The resulting Rube-Goldberg-Machine is weird in that sense: nobody rational who understands all the layers would plan it like it is from the ground up if they had the choice.
- harry-wood 7y ago> "In my book..." As I was reading, for a second there I thought you'd actually written a book called "Communicating via electric currents seems weird". Sounds amazing! Where can I buy this book??
- atoav 7y agoHaha sounds amazing indeed, I'll put it on my list : )
- Angostura 7y agoI parsed the book name as 'Communicating via electric currents' then my brain threw an exception.
- fhars 7y agohttps://www.goodreads.com/book/show/382507.The_Telephone_Book https://www.goodreads.com/book/show/382507.The_Telephone_Boo...
- fouc 7y agoA 10X programmer or 100X programmer finds a way to remove layers of abstractions.
- xaedes 7y agoJust hide the nasty layers behind more facades or layers of abstraction. Please never reinvent the wheel, we need more layers, its better software design to reuse the old stuff. /s
- kls 7y agoyep, I mean technically you could directly write the UI directly to IP packets and cut out the whole stack, but it's a step in the wrong direction, abstraction allows people to specialize and focus on their domain. For a non technical example we could communicate via math for all human interaction, it would be more efficient, and truthful, it would also limit though and transfer of knowledge as it puts difficult constraints on expression. Stacks are good, the web got screwed up by SUN, IBM, and Oracle's insistent vision of a thin client world, that needed lots of servers.
- xg15 7y agoI'd argue, one is simply weird because you're (or your hypothetical audience) is not used to it. The other is weird because it's mainly that way due to path dependency.
- LoSboccacc 7y agoI can push ideas into other people mind by sending carefully created pressure waves at them
- deleted 7y ago[deleted]
- Lio 7y agoYep even explaining what happens to give you a dial tone on a landline is pretty crazy when you first look into it. It surprises many people to learn that the tone isn’t “always there” and that signalling happens with the exchange to create it. This includes checking billing status and other things. These systems are so robust we mostly take them for granted.
- dosy 7y agoAll the critical comments on this. Why are all these critics so scared that there might be an easier way to do web dev? Are they really just protecting their archane methods because they see that as protecting their income and any simplification a threat to that? Or is it more tribal, cult like adherence to an overbloated way of creating web UIs? Or is it people don't want to learn yet another tool and they're just resigned to the fact the these are the tools they have because really, they don't get to decide that anyway, their employer does? Or is it people don't like being reminded that actually, they're "forced" to use these tools (which they perhaps wouldn't if it wasn't mandated), but because the workplace uses them, they use them, so the existence of other options while accurate is a painful reminder of their own limited autonomy to individually decide the tools they use for their work? Is the same cultish zealotry seen in other languages and frameworks or is it just (what compiles to) ECMAscript and Web UI/state frameworks?
- contravariant 7y agoNot to mention how weird speech is if you try to explain it to in a similar manner.
- boomlinde 7y agoWell, I can think of good reasons for communicating using electricity. It's fast. The infrastructure is available. I can think of good reasons to communicate with strangers. It's interesting, strangers are interesting. I can't think of a good reason for depending on thousands of libraries to aid you in laying out and presenting a document, if you are using a language and a platform specifically designed for that purpose.
- jstimpfle 7y agoThat's indeed weird. How would they not lose track of their dependencies? How do they keep their code lean and load times fast?
- iforgotpassword 7y agoThey just hope that Google will keep pouring infinite money into making their JavaScript engine faster. And they never kept track of their dependencies in the first place. That's the job of some build tool. Whatever it pulls in is fine.
- TeMPOraL 7y agoWhat Google giveth, NPM taketh away.
- merpnderp 7y agoWe target IE11 with angular1.6, React and Vue and it all runs very fast. The only time we ever had trouble were lists over a few hundred items long that our internal customers didn’t want paginated. But delivering those more demanding apps in react and vue solves all our IE11 is slow problems. On any other brothers the code might as well be native.
- kyle-rb 7y agoWait why are you using all three of AngularJS, React, and Vue?
- winrid 7y agoThey probably have a giant AngularJS stack and wanted to slowly migrate to a new framework and they couldn't reach consensus on either React or Vue :D
- merpnderp 7y agoWe have one small piece written in React. It will be replaced when the Angular is finished being moved to Vue, and all new dev is in Vue. It’s a nearly 8 year old bundle of over 56 and counting HR apps and is a feather in our department’s cap for how much money it has saved. I wanted to move to React initially but after adding a single new app my boss hated the syntax and we switched to Vue. Vue is good too.
- onion2k 7y agoIf you think that's bad you do not want to know what's happening in the code for a desktop or a native app.
- pjc50 7y agoGiven that the last job I had was maintaining ancient MFC-era C++, the nativest of native apps .. actually, it's pretty straightforward, because so much of it dates from the era when there weren't cycles to waste, but as soon as you touch COM the insanity creeps back in.
- ahartmetz 7y agoUhm, I do know what happens and it's fine? I mean yeah, today we're using X11 to push application-created images even though the protocol encourages you to render applications from lines, horribly rendered text, and ellipses or something... Btw lines can be stippled, wow!
- bronlund 7y agoThat is insane!
- enlyth 7y agoSays everyone on HN while relying on these weird UIs to do their job daily.
- reitanqild 7y agoNot only that, - I sometimes create them as well. At least I try to avoid it where possible.
- gameswithgo 7y agoYeah and I hate that I have to rely on them. They are usually terrible.
- seph-reed 7y agoThey're terrible because Google and Facebook keep swinging their weight around and everyone is following in suit. The actual web specs are actually pretty awesome and can do amazing things with reasonable efficiency.
- icedchai 7y agoYes! Web development is "weird" because we (developers) are basically constantly trying to put square pegs into round holes. Over the past ~25 years, a document delivery system has been perverted into a application delivery system. The underlying, fundamental technologies were not intended for "UI" app development.
- krapp 7y ago99% of those "apps" are still just documents with client-side rendering, though. And the web was designed with the intent of running code practically from the beginning, albeit with support envisioned for multiple languages, so programmatic elements in a website aren't really a perversion of the original intent.
- pgcj_poster 7y agoI didn't know that. Is there anywhere I can read about it?
- krapp 7y agohttps://eager.io/blog/a-brief-history-of-weird-scripting-languages/ https://eager.io/blog/a-brief-history-of-weird-scripting-lan... mentions support for multiple languages, including TCL. And the possibility of scripts is mentioned at least as far back as HTML3[0] in 1996, with the script tag being added as a placeholder element in HTML 3.2[1], and Java applets were already supported. So while it wasn't there at the very beginning, it's clear the architects of the web didn't consider running code in the browser to be antithetical to its purpose. [0]https://www.w3.org/TR/WD-script-960131.html https://www.w3.org/TR/WD-script-960131.html [1]https://www.loc.gov/preservation/digital/formats/fdd/fdd000478.shtml https://www.loc.gov/preservation/digital/formats/fdd/fdd0004...
- rswail 7y agoThe original thesis on REST by Fielding [1]. Section 5.1.7 Code On Demand [1] https://www.ics.uci.edu/~fielding/pubs/dissertation/fielding_dissertation.pdf https://www.ics.uci.edu/~fielding/pubs/dissertation/fielding...
- collyw 7y agoServer side rendering is very underrated.
- smacktoward 7y agoIt's true! For details, just ask anyone you know who was evangelizing client-side rendering three years ago, they'll tell you all about it.
- tiborsaas 7y agoNot really, PHP is used on 80% of the web. I know, some of it are API-s, but it's still huge. PHP is SSR by design.
- quickthrower2 7y agoBecause it works. Things that just work and aren't new are underrated. Like HTML tables.
- gridlockd 7y ago> ...passed through all sorts of classes that each spit out HTML. They generally don't spit out HTML, that's how you get XSS. Rather, they turn the data into DOM nodes, dynamically. In theory, that's more efficient, because the data should be smaller than the marked-up data. That's also how you get a UI to sort of rival a Desktop application, you cannot do this all server-side. Also, all your server-side code that renders HTML is usually more privileged than your client code, unless you did your job very well, which I know you didn't, because you don't have the time and/or money. That's a huge risk surface area. There's a reason why Wordpress instances (which also have "thousands" of components) get hacked all the time, while static-site-generator sites don't. > They also do some weird stuff with events like key-ups in order to re-render input fields based on objects rather than letting the browser manage those kinds of things. The browser doesn't manage those things, or if it does, it's very limited and likely different for each browser. You need some amount of Javascript for all but the most trivial forms.