5 ms·
Have you tried developing a doctors appointment website with React (or any SPA frameworks) say Django or Flask? It's a pain in the ass. Usually, you throwaway a
by systemvoltage 6y ago
Have you tried developing a doctors appointment website with React (or any SPA frameworks) say Django or Flask? It's a pain in the ass. Usually, you throwaway all the cool things about Django and turn it into a stupid JSON API and then you build a bunch of cruddy shit with npm tooling and cry yourself to javascript dependency hell. Then you need another server to serve up this bundle.js and a barebones index.html file. Great if you're building a Google Docs competitor. 99.999% of the people aren't.
I think VueJS is excellent and surprising to see React's popularity. Vue can be used just like jQuery without any nodejs tooling. Just like every discussion about this topic, React fanboys will respond with "But, technically, you can do that with React too" [1], yeah... It sucks at doing that. Without JSX, you can't interweave for example Jinja2 templates + React. Nor can you interweave JSX + Jinja2. With VueJS? It's just HTML with a few v- attributes. Even if React worked well with direct script tags in HTML, it still sucks at it because it's mainly designed for SPAs in mind. There is a lot of existing discussion on this topic [1].
I absolutely abhor the tooling/npm/babel/nodejs/webpack all this nonsense that Javascript frameworks need. They should be sort of like jQuery - no prebuilding steps - just drop and play. A doctors appointment website doesn't need to be an SPA. VueJS is the only framework that allows you to progressively enhance something like a Flask based website in the most natural jQuery-like way.
Oh btw, Svelte is yet another one - of course its SPA framework (Good luck trying to make it work on an MPA website). I am completely underwhelmed by Svelte, and ofcourse the JS peeps are flocking to it. :|
[1] https://news.ycombinator.com/item?id=24520116 https://news.ycombinator.com/item?id=24520116
- algo_trader 6y agoHmm.. is jsx a standard tool these days for new React projects? Sorry if this doesnt make sense. I am mostly backend/servers.
- systemvoltage 6y agoJSX is a way to express HTML but its a deception. It's all javascript that looks like HTML.
- algo_trader 6y ago> Hmm.. is jsx a standard tool .. > Sorry if this doesnt make sense... Dude! I am, like, humble-bragging here. I did some react UI, and i had to painfully adjust to jsx to import some components. My question is, since i have to oversee a new interactive trading front-end thingy, should i push for jsx or plain html? Thank for the reply! Edit: grammar
- schwartzworld 6y agoWhy was it painful? Learning JSX isn't that different from HTML. If you're using React, and you're not using JSX you're gonna have a bad time. There is no option to work with plain html.
- deleted 6y ago[deleted]
- mixedCase 6y ago> Usually, you throwaway all the cool things about Django and turn it into a stupid JSON API and then you build a bunch of cruddy shit with npm tooling and cry yourself to javascript dependency hell Or you could just shift your backend expectations and adapt to the different needs. If you're doing an SPA because you want an app-like experience and very decisively not a website-like experience, your backend should be as simple and stupid as possible and not force you into a model like MVC; you shift much of the complexity to the frontend when you go from website to SPA. You know, like it would if you're writing a desktop app or a mobile app that uses an API. Because it's an application, not a website. You could pull the 99.999% number out of wherever, but the truth is that many things we used to do as websites are better off as apps. My bank's website is better off as an app, the social networks I use work better as apps. Hacker news doesn't. Blogs don't. Online newspapers don't. It all depends on the amount of interactiveness needed and how much better the experience is with access to real-time information streaming and quick UI responses based on things other than data loads. And as dreadful as Javascript dependency hell is, it's objectively better than Python dependency hell since it's had a passable package manager for much longer than Python (and even then, most Python devs still don't use or even know of Poetry) so the ecosystem is better aligned to modern software development expectations. You're just used to one variation of hell, and don't want to learn a new one. Try to understand modern frontend needs before assuming newer frameworks are shit at everything and that everything related to it sucks. They might be shit at the specific thing you're doing, and some lessons seem to have been forgotten when things were redesigned. What hasn't changed however, is how most software development sucks, and the fashionable things that were done under terrible standards (devs and/or management) have changed, but are still done by the same terrible standards so you still have shit results. > VueJS is the only framework that allows you to progressively enhance something like a Flask based website in the most natural jQuery-like way. No. You're just allergic to build tools because you have not enough knowledge of them. Probably because, from what I've been led to believe from your comment, most of your experience seems to be with Python. All your described problems ultimately stem from there.
- systemvoltage 6y agoI’m allergic to build tools because I want zero JS in the backend. Thanks for the counter, I have made previous attempts at App-like websites but have left me high and dry. There is something to be said about clarity and separation in MVC frameworks. I love MVC. I love boring tech. Python dephell is no more after poetry. Have you used it?
- deergomoo 6y ago> Vue can be used just like jQuery without any nodejs tooling You can, but you probably shouldn’t (outside of prototyping). It requires you to both ship the template compiler to the client, and to perform the template compilation on the client, on every single page load (vs serving a cached, pre-compiled JS file). If you want to sprinkle JS onto an otherwise server rendered page, you’re better off with something like Alpine.js [1] [1] https://github.com/alpinejs/alpine https://github.com/alpinejs/alpine
- systemvoltage 6y agoYou made my day. Thank you!