Hacker News new | ask | show | jobs
by collyw 2308 days ago
I am a Python / Django guy given the choice. Python may be a slow language, but I haven't seen many places where python is the cause of the bottleneck. Rewrite stuff so that the database is doing the heavy lifting, and add the appropriate indexes and you shouldn't have any problems.

SPA's are a pain in the arse. Usually close to twice the amount of code to avoid page refreshes. Usually the apps are way slower than a page refresh as well - with lots of JSON calls to get data that would be in one server side page load.

3 comments

> SPA's are a pain in the arse. Usually close to twice the amount of code to avoid page refreshes. Usually the apps are way slower than a page refresh as well - with lots of JSON calls to get data that would be in one server side page load.

Yeah. It's infuriating.

I dont know if is just a impression of mine, but people are getting more realistic and less romantic about this stuff, really understanding the limits and the use-cases, letting Python do what it does best but leaving some parts of the system to be managed in a AOT-compiled platform like C.

I think a lot of people got burn when they adhered to the "i want to use just this thing for everything" mantra, which is pure illusion. And as with all illusions we tend to nurture, it will lead to a crash with the status-quo of reality.

This was also what happened with Javascript. If you used it as the script language that it is meant to be, everything will be fine.

The problem, as i understand it, is trying to follow the misguided and over-hyped steps of Java.

> "i want to use just this thing for everything" mantra

Is node.js dead yet?

I think this wheel of fortune will continue to roll, of course, from one hype to another. If someone want to be the `sucker` that believes that creating a LLVM on node.js is a good idea, no one will stop that person of course, but the trends of the current reality will at some point with an unavoidable nosedive.

Theres a difference between being a pioneer or an adventurer from being a fool who let their emotions turn technology akin to a religious cult.

Node.js, of course, can be a great tool, but only if you know when and where to use it (just like the demonized PHP, can be great and work like a charm, you should also know when to nevermind the boll..).

More and more popular I hear. Exciting stuff, though JS seems very much disliked on HN.
I disagree. I think SPA's are fantastic. Sure, they can be misused, but so can most things.

I'm an intermediate level web developer. I enjoy working with ReactJS-- I like that it's a framework and way of doing things.

1. manages to accomplish everything that I need to get done

2. has a huge community & huge amount of open source reactjs components available

3. is highly customizable

If one isn't going to use a modern, prolific SPA framework such as Vue/Angular/React, other options seem to be:

1. Vanilla JS (potentially a mishmash of vanilla JS + CDN/local js libraries)

2. jQuery

3. other jQuery-era frontend frameworks

ReactJS in my experience makes development faster, easier, better organized and more enjoyable.

I don't think that SPA's are necessarily bad, just that they are used in places where server side rendering would work just as well for a lot less effort. Use the right tool for the job.

> ReactJS in my experience makes development faster, easier, better organized and more enjoyable.

Maybe it makes development faster, but in my experience it makes debugging someone else's code a whole lot more difficult. CSS for example. It seems nice to define the style in the same file as the component code and it makes development a little bit faster. But when you have to debug, it's far easier to have styles defined in classic stylesheets in a different file rather than trying to track down the location of some dynamically generated CSS class. (I know as I have been degugging code that was written by an agency, and the CSS styles are defined in a mix of both React files and normal CSS).

From your list of benefits I don't see anything that couldn't be achieved with sever side rendering and a bit of jQuery. If your front end needs to have a lot of user interaction, then SPA's will be the correct tool for the job. For most web apps they are overkill.

The React frontend we have at my current workplace is incredibly bloated compared to a similar complexity website I created using Django and Jquery. Doing certain simple tasks is like pulling teeth.

I think you are confusing frameworks and SPAs.

For example, React is meant to build small components not SPA. But you can build a SPA using react-router. But you can build SPAs using vanilla JS as well.

The only thing that truly defines SPAs is lack of “true” page changes. JS is taking control of your browser url bar and history. Which I personally dislike.

> React is meant to build small components not SPA

React is meant to build (composable) user interfaces.

What about the server-side of things? If you only have to the UI sure, but if you have to write the whole thing, rails/django is going to be way less work. No need for an intermediate network JSON API with all the encoding/decoding that it entails, just routing on one side instead of two and many more.
This.

Why do we need frontend routing?

> ReactJS in my experience makes development faster, easier, better organized and more enjoyable.

Cool.

What's the worst thing about React?