Live data from Hacker News

Ask HN: Go-to web stack today?

news.ycombinator.com

51–60 of 453 posts

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

#52
post #16

Earlier quoted context omitted.

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…

I use go templating to assemble Vue components. Luckily Go templates can switch from using {{ }} to any other delimiter. I use [[ ]]. It works well.

And that means I strip all "{{", "}}", "[[" and "]]" from any user input.

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

#53

Earlier quoted context omitted.

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…

I use go templating to assemble Vue components. Luckily Go templates can switch from using {{ }} to any other delimiter. I use [[ ]]. It works well. And that means I strip all "{{", "}}", "[[" and "]]" from any user input.

You can also change vuejs delimiters.

        var app = new Vue({ delimiters: ['${', '}'], ... });

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

#54
Storage: Postgresql

Backend: Go (no framework, just the standard library)

Frontend: Vue

Working great so far. A little longer to get things up than using Rails/Django, but the extra speed and control is really nice.

Using Go's templating engine to assemble Vue components into HTML tags works well.

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

#55
Here's an interesting stack: https://github.com/ornicar/lila

It's the server/client for https://lichess.org/ which is a powerful online chess server. Scalla with Akka actors is used to provide realtime multiplayer chess (bullet chess games, where each player only has a minute or two to play an entire game, are very popular there). The client-side is written in TypeScript, and rather than use React for the vdom, they're using a vdom called snabbdom. https://github.com/snabbdom/snabbdom

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

#60
Tooling JEE, Spring or ASP.NET MVC, with server side rendering.

Eventually coupled with full stack CMS like Liferay or Sitecore.

For frontend either tiny pieces of vanilajs when dynamic code is really required, or something that is WebComponents friendly like Angular, if the backend is mostly composed of Web APIs.

Might not be fashionable, performance is quite good, and we get to focus on delivering instead of playing JS framework of the month.

Post reply on HN