Live data from Hacker News

Ask HN: Go-to web stack today?

news.ycombinator.com

401–410 of 453 posts

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

#401
post #86

Frontend: (vanilla) React with TypeScript. - TypeScript is more important than React, static typing is such a productivity boost, even for projects of all sizes. - Start with vanilla React and create-react-app, monitor for painpoints and look for solutions for these pain points in the community, don't look at the whole ecosystem before you start building stuff. Backend: Kotlin on the JVM. Kotlin is a really nice lang…

Wanted to look into Kotlin on the backend for a while now. Do you use any framework or do you just assemble individual libraries for whatever you need? I am not sure I find Spring an attractive proposition and Ktor seems rather young, slow and not that well documented. What do you think is the best option?

Just use any Java framework or library, Kotlin can adapt to them quite easily.. We've used Ratpack with great success, we had to do a tiny bit of plumbing but it's great now and we open sourced our coroutine adapter (it was around 10 lines of code).

Vert.x already did the Kotlin plumbing on their own so you can use coroutines and similar goodies out of the box, Spring Boot supports Kotlin natively AFAIK, and something like Dropwizard should be easy to use as well..

Seriously, don't limit yourself, part of Kotlin's beauty is how easy it is to use it with Java products and reap immediate gains!

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

#402
post #103

Earlier quoted context omitted.

[deleted]

Here we go again, not using redux makes you a noob developer.. So in your mind it's redux vs spaghetti? No other options, ever?

Really sorry to call you noob. You may have more experience dealing with Redux codebases from me, but in any case I was arrogant and I'm sorry.

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

#403
post #177

- 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…

> just use Django (or Rails) What do you mean by "just use"? The OP seems to have a long experience and having had used Rails recently myself as a 20 years experience web developer, all I can say is stay away if you know the way web works and not doing it as a medium team size. You need to learn everything the rails way even if you know every moving parts of what makes a web site which can often get in the way and I…

I agree. This is spot on. You don't "just use" Rails. I've been trying to learn the Rails conventions ("magic") for weeks now and I feel fucking stupid. It's not the MVC arrangement, it's the inherited behavior from ActiveWhatever that makes it frustrating. The Rails project might be open source but it definitely feels propietary in nature. For reference, I come from using vanilla PHP and Python with Bottle/Flask since ~2010 and I'm confused as hell with it.

Also, OP can leverage full stack modern JS now, so sticking to Node for the server side makes sense.

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

#404
post #378

Earlier quoted context omitted.

I think that you might be misunderstanding the problem perhaps because Vue uses a similar curly syntax to output values as Django does (alternatively, I'm misunderstanding you). Consider this method of mounting Vue: new Vue(...config...).mount('#app') Where #app is the selector for some server-side (Django template) rendered element (commonly, the first within the element). _This turns this entire element into a Vue…

i still dont see the added security issue. you define your template inside {% verbatim %} and if you want to preseed your data, you put that into the new {{ variable|json_script }}... or do you mean that the developer uses a js framework for the main data and keeps using django templates for other, user generated parts (i.e. comments)? that would be a disaster, i agree btw, the last letter is an 'i' :)

> btw, the last letter is an 'i' :)

I should increase my font size on HN, sorry about that. :)

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

#405

Earlier quoted context omitted.

> but it's not like MySQL is broken Here's a good article about that: https://grimoire.ca/mysql/choose-something-else

This article is extremely out-of-date, referring to numerous problems that were solved many years ago. Notice the repeated references to MySQL 5.5, and one reference to how "5.6 is due out soon" -- this indicates the article is 6 years old. Additionally, a number of things in that article are misleadingly worded, and/or show a blatant disregard for information in MySQL's documentation. And a few things are just compl…

What things are misstated? General arguments are worthless. Anyway I do not recall Postgres being broken few years ago. It had less features, was slower, but was working as expected. Whenever someone points out that some severe problems with given software are already fixed its not building a good rep for the product. If something was seriously broken, yet considered production ready its a bad sign for the feature of this product anyway.

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

#406
post #323

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.

Sounds interesting cause I like to use Go everywhere. Do you have any example we could look at? Thanks.

Nothing I could post here. I'll look at knocking together a blog post about it

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

#407

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.

What are you using for SSR? I haven't yet seen any concrete tutorials for getting this up and running with Vue and Go. All I've been able to google is augustoroman/V8 and dop251/jago and other derivatives.

to be honest, at this point I don't bother.

My only dependency is Vue (and vuex), and I only send the components that the current page needs (packed into a single by the template engine). I also send the initial data inlined in that script as js objects. So there's 1 fetch to get the the HTML (usually around 200-300Kb), then 4 fetches (vuejs, vuex, css, logo file) totalling around 500Kb (and all cached, so that only happens on the first load).

So far, no speed problem and no rendering lag worth worrying about. If that changes I'll look at methods of fixing it, but I'm learning to not solve problems that I don't have yet.

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

#409

Earlier quoted context omitted.

This article is extremely out-of-date, referring to numerous problems that were solved many years ago. Notice the repeated references to MySQL 5.5, and one reference to how "5.6 is due out soon" -- this indicates the article is 6 years old. Additionally, a number of things in that article are misleadingly worded, and/or show a blatant disregard for information in MySQL's documentation. And a few things are just compl…

What things are misstated? General arguments are worthless. Anyway I do not recall Postgres being broken few years ago. It had less features, was slower, but was working as expected. Whenever someone points out that some severe problems with given software are already fixed its not building a good rep for the product. If something was seriously broken, yet considered production ready its a bad sign for the feature of…

MySQL wasn't "broken" 6 years ago either. It just required changing a few settings away from their defaults to avoid some of the behaviors in the article, in the few cases where the article's complaints are even valid.

A majority of the largest internet properties use MySQL as their primary storage, and have been doing so for years. Do you believe they're all "broken" in their ability to store and retrieve primary product data?

As for what's mistated in the article, it would take hours to correct in-depth, but in brief:

* All of the "silent data conversion" complaints -- as well as others -- are fixed by setting a strict sql_mode. This has been the default since MySQL 5.7 (2015), but has been available (and recommended as a best practice) since 2004. Literally, one single setting that has been available for 15 years wipes out a solid chunk of this article's complaints.

* The backup discussion makes no mention of xtrabackup, the most widely-used free-and-open-source InnoDB binary backup tool. This tool was already in common use when the article was written, so the author is conveniently choosing to ignore it.

* MyISAM storage engine is effectively dead, all of the complaints about it in this article are moot. There was no valid reason to use this storage engine when this article was written, let alone today.

* The article's discussion on nondeterministic binary logging is overly broad with no examples. Author is complaining that simple inserts with auto_increment aren't safe for binlog, which is completely ludicrous. And all of the rare legit nondeterministic cases are handled by modifying one setting (changing binlog format to either row or mixed; both available when the article was written, and now default since 5.7 in 2015).

* Character sets: 4-byte utf8 is the default in mysql 8.0. While the complaints about MySQL's old 3-byte utf8 are valid, the reason for it makes historical sense: when MySQL added utf8 support in early 2003, the utf8 standard originally permitted up to 6 bytes per char at that time, which had excessive storage implications. Emoji weren't yet in widespread use and 3 bytes were sufficient to store the majority of chars in use at that time.

I could go on and on. This article is simply not based in reality.

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

#410
post #303

Earlier quoted context omitted.

Wanted to look into Kotlin on the backend for a while now. Do you use any framework or do you just assemble individual libraries for whatever you need? I am not sure I find Spring an attractive proposition and Ktor seems rather young, slow and not that well documented. What do you think is the best option?

I'm personally in the "functional handler" way of doing HTTP Request camp. We have a very small Ktor service in Production, and it works nice, for legacy reasons, we're using http://sparkjava.com/ for the heavy lifting. An alternative would be https://javalin.io/ I would not start with Sparkjava anymore. The way you write handlers is quite okey (compared to other frameworks), but there are issues with how it's connec…

Has anyone used both Ktor and Javalin and have any advice for choosing between the two?
Post reply on HN