4 ms·
React+redux (or just react) doesn't add much to websites. Maybe Vue.js would be a better fit when some complexity is needed in a website. I see React as a tool
by k_ 8y ago
React+redux (or just react) doesn't add much to websites. Maybe Vue.js would be a better fit when some complexity is needed in a website.
I see React as a tool for building web applications, not websites. Using it for something like hacker news is not needed nor worth it, except for learning purposes or for the sake of using your favorite tech (which has its pros and cons).
Edit: I use React a lot, and really like it. It's just not the perfect tool for everything, and by no means a necessary one (at least when you don't have much complexity); even if it is a good one in many cases.
In the case of HN, seeing the current js [1] I find it pretty obvious that no "big tool" like React is necessary. It doesn't mean using React for a HN clone is a bad thing, one just don't have to.
[1]: https://news.ycombinator.com/item?id=17915560&goto=news https://news.ycombinator.com/item?id=17915560&goto=news
- TekMol 8y agoIn my book, "website" and "web application" are equivalent. How do you define those terms?
- devilshaircut 8y agoImo, not all websites are web apps. You can certainly still create a static website using just HTML. The term "app" to me implies functionality beyond the presentational.
- k_ 8y agoI don't define them precisely either. I'll borrow an answer from stack overflow [1]: This is totally personal and subjective, but I'd say that a website is defined by its content, while a web application is defined by its interaction with the user. That is, a website can plausibly consist of a static content repository that's dealt out to all visitors, while a web application depends on interaction and requires programmatic user input and data processing. For example, a news site would be a "website", but a spreadsheet or a collaborative calendar would be web "applications". The news site shows essentially the same information to all visitors, while the calendar processes individual data. Practically, most websites with quickly changing content will also rely on a sophisticated programmatic (and/or database) backend, but at least in principle they're only defined by their output. The web application on the other hand is essentially a program that runs remotely, and it depends fundamentally on a processing and a data storage backend. [1]: https://stackoverflow.com/a/8694944/7510753 https://stackoverflow.com/a/8694944/7510753
- mattmanser 8y agoMost web applications don't need a JS framework either, so the distinction's actually worthless.
- eropple 8y agoWeb applications have interactive functionality as their focus. Websites have the consumption of what a human, and not an HTML parser, would call a "document": video, text, and images. They may not be statically served, but their code exists to facilitate the serving of what are recognizably documents. Wordpress's backend is a web application. That web application exists to drive the website that is its frontend. Not really a controversial standpoint, I don't think, except amongst the hyper-literal who but-for about comment features (hence the use of "focus" above).
- JamesBarney 8y agoThe guy who builds your website has never heard of big O.
- KyeRussell 8y agoI build content driven websites as part of my job (not my favourite part by any means). I’ve most certainly “heard of Big O” - something they teach you in the first year of any university-level computing course. Don’t be a dick.
- JamesBarney 8y agoI wasn't being a dick, most designers and people who bill themselves out as website creators come from a creative background instead of a development background. For every 12 website creators I know with a photography/art/graphic design background, I only know one with a C.S. background.
- eropple 8y agoOnce you're using React for a web app, the cognitive load is not that high to use it to blam out a site, too. And it need not be slow or heavy, either; the website I'm currently working on uses React for rendering (both server-side and not, but it took me about an hour to get server-side rendering working for something where the very minimal state is only presentational) and has about a 60KB-gzipped JavaScript+CSS+images bundle all-told. (Of that, React is 5KB. Woo?) I could use Vue, but I'm already using and continuing to use React, and I'm good enough at (what isn't actually) my job (because I'm no frontend developer, this is just what I do on the side) to minimize its impact on end users. I also use React for fully static sites via Gatsby, though I don't love it, and to quickly build HTML mail templates. Granted, the bigger value here for me is JSX rather than React, but for my use cases they're functionally the same thing, and I do think you can get a lot out of using it. Especially if elsewhere in the stack you're already undertaking more complexity with it.
- derekperkins 8y agoIf you don't love Gatsby, you could try out https://github.com/nozzle/react-static https://github.com/nozzle/react-static
- eropple 8y agoI've looked at that too, but to be honest I find it confusing. :/
- mattmanser 8y agoJust to echo expand on TekMol's reply as he's been downvoted for perhaps being too curt, but the distinction's essentially worthless as most web applications don't need the complexity of a big js framework either. When he says websites, he means web dev in general, no distinction necessary.