Live data from Hacker News

Ask HN: Go-to web stack today?

news.ycombinator.com

281–290 of 453 posts

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

#281
post #212

Earlier quoted context omitted.

At least briefly consider whether or not you actually need a relational database when starting a project. I work with some rather complex data access using Postgres, JPA, Hibernate, HikariCP, and a second level cache, all within a separate microservice exposed via a REST API. To make matters worse, the responsible developer has since left the project to me. We don't even use relations, so this essentially means that…

What would Mongo give you that Postgres doesn't?

Admittedly I'm not yet using it in production, but the simplicity is the most appealing factor, albeit this depends a lot on client libraries used. In addition to my original comment, with Postgres we also had to deal with schemas and migrations.

We can also easily leverage reactive streams with reactive Spring Data. Technically you could also use JDBC in a reactive manner, but it looks unlikely to work with the frameworks we use with Postgres.

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

#282
post #212
post #168

First, be entirely sure that you actually need an SPA. So, in stages: - Database: Postgres (you could start with any relational DB, Postgres is just one of the best). It's very, very likely that your model is gonna be relational so better pay that debt upfront. Don't even consider NoSQL this early; we're paying a heavy price on my current job because the initial developers bought that non-relational databases were be…

At least briefly consider whether or not you actually need a relational database when starting a project. I work with some rather complex data access using Postgres, JPA, Hibernate, HikariCP, and a second level cache, all within a separate microservice exposed via a REST API. To make matters worse, the responsible developer has since left the project to me. We don't even use relations, so this essentially means that…

I would turn the remark around and say that one should consider if a NoSQL database is required at all.

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

#283
- TypeScript

JS will eventually support types natively and will be similar to TS/Flow's API. I have more faith in ReasonML taking off than Dart/Flutter but I hope I'm wrong.

- React and React Native, even ReactXP/react-native-web if appropriate

Vue is good but not good enough to convince most of the community and the community makes it. Their native strategy needs more work, and it's too valuable not to have one.

- Apollo Client

So much boilerplate disappears, and it's powerful enough to be your one data source which enforces many best practices and capabilities.

- GraphQL Gateway stitching GraphQL Servers and serverless resolvers

GraphQL/serverless does for the backend via microservices what React did for the frontend via components. The benefits to the entire stack are countless. Apollo Server (even AppSync) make it simple.

- A serverless datastore

There's also many great GraphQL ORMs but managing infrastructure/scaling should be avoided.

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

#284
post #92

I'm amazed at how many people use a client side framework, am I the only one who prefers good old server side rendered static html with maybe a little bit of javascript on top? When I need a more dynamic page, I create a react app specifically for this one page. Whenever I need to write JS these days, I go for either TypeScript or F# using Fable (an F# to javascript compiler).

Not at all, as I replied on another thread.

Plain old Java and .NET frameworks or CMS, with server side rendering, with dynamic behaviour on as needed basis.

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

#285
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 assume Django is similar.

I'd say more than Rails. Rails actually doesn't make too many choices about the application itself. Django does - it kinda expect the application to be CMS-y (which is super useful for a _lot_ of work - but not if you're not doing anything CMSy), has default for authentication which aren't great (usernames that aren't emails, for example) and has a sub-standard (but not terrible) ORM. The admin interface is useful in the beginning, but becomes a drag on development as time goes by.

Django is workable, so I wouldn't say "stay away," but I wish more companies went with something like Flask + SQL Alchemy. My experience is that people who pick Django often leave companies after a year, leaving a mess for others to clean up.

> And why PostgreSQL by default?

PostGIS. I know projects that ended up with two databases, because they picked MySQL early, and later needed GIS features.

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

#286

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

Same opinion on redux.. but I will not pick django on the py world (I had done too much projects with it and think that there are better approaches (pyramid/flask on the sync world and aiohttp on the async side). Async python had made me feel python fun again :)

Anyway I also like a lot working with go (where the stdlib is so well designed that you don't need a framework at all :))

Also node it's not too bad.. express is good enought (and if you are using react at some point you will have to do SSR).

On the front side there is also angular (they are doing a so good job with ivy)

Anyway, also consider preact.. it's fun and amazing.

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

#287
post #212

Earlier quoted context omitted.

At least briefly consider whether or not you actually need a relational database when starting a project. I work with some rather complex data access using Postgres, JPA, Hibernate, HikariCP, and a second level cache, all within a separate microservice exposed via a REST API. To make matters worse, the responsible developer has since left the project to me. We don't even use relations, so this essentially means that…

What would Mongo give you that Postgres doesn't?

Non-relational (NoSQL) databases like Mongo serve a different purpose. They store data in forms other than the traditional relational database table. Theoretically, for certain workloads, they make horizontal scaling easier and improve availability. However, most workloads are suited just fine with a relational database like Postgres.

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

#288
post #212

Earlier quoted context omitted.

At least briefly consider whether or not you actually need a relational database when starting a project. I work with some rather complex data access using Postgres, JPA, Hibernate, HikariCP, and a second level cache, all within a separate microservice exposed via a REST API. To make matters worse, the responsible developer has since left the project to me. We don't even use relations, so this essentially means that…

I would personally never use MongoDB again. Broke one too many times. Postgres on the other hand has never failed me.

MongoDB was released nearly 10 years ago. Do you believe those issues are still relevant today?

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

#289

Earlier quoted context omitted.

For a long time I was in the server-side html + js for ajax/validation/effects camp, but I'm starting to gravitate to the SPA side of the fence. Why? While server-side based web sites can load quickly, there's something dissatisfying (to me) about clicking around a site, waiting for server responses, when nothing has changed . Sure, js, css, img, etc. assets are likely cached in the browser, and you're just downloadi…

I urgently encourage you and anyone else reading this to check out Turbolinks 5, ideally in tandem with Stimulus. https://www.youtube.com/watch?v=SWEts0rlezA&t=3m22s https://github.com/turbolinks/turbolinks https://stimulusjs.org/ You can get all of the benefits of server-generated pages with the speed of an SPA. 90%+ of the sites built using SPAs would be better served by Turbolinks and Stimulus.

I’ve never used Stimulus, but I can concur that Turbolinks is magic, at least for the simpler Rails app I made. It took load times from over one second to feeling like a native app, didn’t require any changes on the backend (it’s enabled by default in Rails), and the site works just fine without it, for those of us who like blocking third-party JavaScript.

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

#290
post #92

I'm amazed at how many people use a client side framework, am I the only one who prefers good old server side rendered static html with maybe a little bit of javascript on top? When I need a more dynamic page, I create a react app specifically for this one page. Whenever I need to write JS these days, I go for either TypeScript or F# using Fable (an F# to javascript compiler).

I found the entire premise of the question weird - s/he asks about what people are using, and then states s/he wants to use two specific things.

"Waiter, what can you suggest for me, I want to eat a fillet mignon?".

As for your view - I agree mostly. I'm definitely in favour of making things entirely in the 'classic' web model, adding javascript to enhance things where it makes sense (some of this now is just polyfilling html5 form controls where they're not native).

Post reply on HN