Ask HN: What technology to chose for a web app in 2020?
My startup is developing a web app that is very visualization-heavy. Since I have a background in machine learning and Python the prototype is based on plot.ly's dash. Changing the prototype has become more and more difficult and there are some aspects of dash that I'm not very happy with:
Poor separation of front end and back end code, Mix of Python and JS/HTML/CSS, No support for mobile, Difficult to extend (e.g. integrating maps was painful)
The bottom line is, it all feels like we have reached the limits of our current technology stack and we should start from scratch with more suitable technology.
So I went out to see how web apps are done "properly" in 2020. Separating front end and back end is a very obvious first step. The back end technology is also very easy to pick. But the technologies and trends regarding front end are just overwhelming for me. I've read/watched multiple guides on the topic (e.g. https://youtu.be/0pThnRneDjw) and they all present multiple areas (UI, CSS, transpiler, database, etc.) from which one library/framework/etc. must be chosen.
I'm looking for a as-small-as-possible subset of these technologies that is strong in the following areas: Maintainability: This is the number one priority. The code must be easy to change, extend and debug. Extensibility: Plays well with new libraries/technologies. Easy to learn. Good solution for the long term
Some technologies that caught my eye are: TypeScript, vue.js, chart.js, GraphQL. But I have very little confidence in my choices. Can you help me navigate this space?
20 comments
[ 4.1 ms ] story [ 69.9 ms ] threadBut that's mostly because I have been using these tools over-and-over. So don't worry about it and build something first.
As far as the node/express route I'd say you should learn about the `req` (request) and `res` (response) objects, what information they have and what you can do with them. It would be pretty helpful to learn about how express middlewares work (they allow you to put little pieces of logic that will validate/enhance/authenticate etc..)
Express isn't the only library outthere you don't need to learn them all but its good to know they exist (hapi, koa, ...)
For node I think it is important to know how to use promises, (async/await) and some basic system libraries (such as `fs`, `path`, `os`).
After that you should probably transition form JavaScript to TypeScript (most new project will start with TypeScript today, and older ones are migrating to it).
Check starter projects, you can find a bootstrapped node js project with almost any framework you can think of, use it if it makes your life easier and later learn how to make your own project from scratch to learn the basics.
Hope you enjoy your JS journey ;)
Your backend can be anything that serves up a rest api. Otherwise go graphql.
https://redux-toolkit.js.org/
Python/Node is a very popular enterprise stack, similar in mindshare to Java/Node.
I think it’s going to be Vue vs React for a while
Rust web framework generating webassembly apps.
Possible stack could be
yew -> grpc -> rust backend.
In your case, given that you have (apparently) a strong Python background, you should try to see how far you can go with Django and some vanilla js. If your front-end doesn't absolutely have to be a SPA, you'll be up and running and productive much more quickly with a fairly simple (server-side logic and page generation) and user-friendly (Django) stack. No need to jump into node, npm, etc.
If you want or need to get more fancy with the front-end, vue.js is relatively easy to pick-up, fairly future-proof (as another poster pointed out, vue and React are the two main choices), and can be included fractionally in your existing pages without a complete overhaul.
The trouble of of separating frontend from backend fully is just not worth it, in my opinion.