Live data from Hacker News

Ask HN: Go-to web stack today?

news.ycombinator.com

21–30 of 453 posts

Re: Ask HN: Go-to web stack today?

#21
post #9

Backend: Django w/ Django Rest Framework Frontend: Vue Prefer Django, because it has so many things built in (authentication, other protections to build things super fast and not worry), many people call it magic but if you read the code, it's very easy to follow. [1] & [2] sites helped me a lot to remove the "magic" as well. Prefer Vue because it is strongly opinionated, unlike other JS frameworks (i.e. React). Agai…

Seconded on Django. It's excellent, especially if you get it out of the box with cookiecutter-django and DRF ( rest framework ) Plus, with things like Zappa it's easy to go entirely serverless Django + NewRelic for APM is plain magic EDIT: Oh, and Celery if your use case needs it. Brillant

how is django "running" on lambda these days? -- been meaning to check that out

Re: Ask HN: Go-to web stack today?

#23

- On the frontend, use React with TypeScript. Create React App now makes it dead easy. Just do: npx create-react-app myapp --typescript - Do not use redux until you know React well. You might not need it. If you do need it, use `redux-starter-kit` offered by the core Redux team. - For backend, just use Django (or Rails). Elixir's Phoenix is also very well thought out. - If you use node: express, sequelize. Async/awai…

I would go with NestJS and TypeORM on the backend with node..

Re: Ask HN: Go-to web stack today?

#24
post #9

Backend: Django w/ Django Rest Framework Frontend: Vue Prefer Django, because it has so many things built in (authentication, other protections to build things super fast and not worry), many people call it magic but if you read the code, it's very easy to follow. [1] & [2] sites helped me a lot to remove the "magic" as well. Prefer Vue because it is strongly opinionated, unlike other JS frameworks (i.e. React). Agai…

Seconded on Vue. If you haven't used a frontend JS framework in a while, Vue will still be easy to pick up and learn. I love it. As for backend, Django, Rails, even .net core will do. Whatever you're most comfortable with.

Re: Ask HN: Go-to web stack today?

#25
post #16

- On the frontend, use React with TypeScript. Create React App now makes it dead easy. Just do: npx create-react-app myapp --typescript - Do not use redux until you know React well. You might not need it. If you do need it, use `redux-starter-kit` offered by the core Redux team. - For backend, just use Django (or Rails). Elixir's Phoenix is also very well thought out. - If you use node: express, sequelize. Async/awai…

Yes very good answer. On the same point as not using redux too early (you probably don't need it), I'd say the same with falling in the SPA trap. Most modern apps are now de-facto built as SPAs, mostly for wrong reasons. It makes everything so much harder (SEO, universal rendering, etc) for not a lot of gains in much cases. Don't be afraid of using your backend (Rails, etc) to render separate pages for each, and have…

This is a good approach for many apps, but watch out for the thorny XSS issues you can have when mixing server-side rendering with a client-side framework which supports interpolations e.g {{ some_var }} .

Rails/Django etc will correctly sanitize the rendered data for a HTML context, but they don't know that your client-side framework will execute code inside a {{ }} block, so those aren't removed - so if you render something in rails inside a div which is later on part of a Vue or Angular app, you'll have a problem.

There's a few ways around this, e.g. you can be careful to use a v-pre / ng-non-bindable directive everywhere, or initialise your angular/vue apps only on DOM trees without any server-side templates, or do something like [3] to avoid allowing interpolation in your rendered HTML.

1 - https://github.com/dotboris/vuejs-serverside-template-xss 2 - https://github.com/angular/angular.js/issues/5601 3 - https://github.com/dotboris/vuejs-serverside-template-xss/is...

Re: Ask HN: Go-to web stack today?

#27
post #23

- On the frontend, use React with TypeScript. Create React App now makes it dead easy. Just do: npx create-react-app myapp --typescript - Do not use redux until you know React well. You might not need it. If you do need it, use `redux-starter-kit` offered by the core Redux team. - For backend, just use Django (or Rails). Elixir's Phoenix is also very well thought out. - If you use node: express, sequelize. Async/awai…

I would go with NestJS and TypeORM on the backend with node..

Thank you, I will have a look. How mature are those currently?

Re: Ask HN: Go-to web stack today?

#28

- On the frontend, use React with TypeScript. Create React App now makes it dead easy. Just do: npx create-react-app myapp --typescript - Do not use redux until you know React well. You might not need it. If you do need it, use `redux-starter-kit` offered by the core Redux team. - For backend, just use Django (or Rails). Elixir's Phoenix is also very well thought out. - If you use node: express, sequelize. Async/awai…

A lot of people say that you'll know when you need it about flux implementations (redux, mobx, vuex, etc).

I have a react native project that I resisted using flux (in my case, mobx) as long as possible to try this theory out. The situation I ran into that instantly told me I needed global state management was when I had an index screen for list of resources, and a edit screen for a single resource. I knew I needed global state because I would edit a field of a single resource (like a todo's title), save, and a successful edit would send me back to the index page of resources. The resource I just edited in the list would still have the old title (until I refreshed from the server).

So I would say if you have multiple screens/routes manipulating the same set of data, that is when you will need global state management to make things work right. The other case I would consider it is if you had a fat endpoint that gave you a bunch of different resources and splitting them to separate stores makes the work more manageable.

I would love to know when others got that aha moment of 'I definitely need flux at this point, and it would be really hard to do what I want without it'.

Re: Ask HN: Go-to web stack today?

#29
post #19
post #12

Netlify for free hosting. Static site generators for HTML and vanilla CSS/JS. Sometimes Vue and Material.io if it's a larger SPA.

What static site gens do you like? Keep thinking about Hugo, but apparently its hard to customize well?

My sites are usually simple enough that I use a tiny Node script and EJS templates.

Here's a tutorial: https://blog.dmatoso.com/build-static-site-generator-nodejs-...

Post reply on HN