Live data from Hacker News

Ask HN: Go-to web stack today?

news.ycombinator.com

371–380 of 453 posts

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

#371
post #281

Earlier quoted context omitted.

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

> with Postgres we also had to deal with schemas and migrations.

JIC, this is exactly what I meant with "paying that debt upfront". If your model does turn out to be relational and you don't have this, you are going to get burnt, badly.

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

#372

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

Cookies over JWT favours browser fingerprinting. Thanks but no. Cookies should be always avoided and tokens should be used instead

This is bad advice. Cookies should almost always be used in browser session management. This is due to the built-in security advantages that browsers give cookies e.g. HTTP Only. Even if your main auth strategy is using tokens, you should support a cookie wrapper for browser based clients. This is one of the main ways to decrease the attack surface area of XSS vulnerabilities.

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

#373

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

Would recommend Vue as a front end framework. It’s much simpler than the others, and every web dev I spoke to in 2018 recommended learning it. Backend, Flask for smaller stuff, moving up to Django or maybe Go for bigger stuff. Database Postgres. YMMV depending on what you’re doing, but the above is a good bet if you want to make the project accessible to other programmers, and it doesn’t need to quickly scale.

I don't understand Vue. Whenever I look at it, I see two way data binding, mutable state and embedded logic in DSL annotations (v-if, v-for), which are all things that React removed (for good reasons). I guess if you prefer an imperative development, it makes sense.

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

#374

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

We've been following this stalk for quite a while and are super happy with it. But there's huge downside: It's really hard to find Django/ Python engineers - let alone phoenix devs. Right now I'm considering a move to JVM. But the frameworks i've seen are all far behind Django. Any thoughts?

I found http://www.sparkjava.com to be better than Play framework personally if you want to work with Java. Play seems to be more Scala focussed when I tried it.

It’s rather minimal though, just providing the HTTP stack for you, so you have to do your own DB connections and the like.

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

#375
post #177

Earlier quoted context omitted.

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

> 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 completely misstated or outright false. I would not consider it a "good article" on this subject.

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

#376
I'm using the Apache Web Server and CouchDB as a backend along with PouchDB-(with a few plugins), jQuery, and Bootstrap on the front end. Apps built this way run almost entirely on the client side.

On the server side I use Perl to code whatever few chores I need there.

It's probably fair to say React is a good alternative to jQuery but I've yet to find a compelling reason to spend the time learning React as opposed to getting stuff done with what I already know.

In the end it's really all about productivity and after spending some time with most all the tools mentioned here looking for what was "best" I decided instead to look for what was "easiest" and ended up with the above "stack".

I just released a blog app made with these tools that's distributed in a 10k "blog.html" file that will run on any web server. Nothing else needs to be installed on your server to run the app. You can get it Azartiz.com along with a secure CouchDB backend and upload it to your website to check out how this approach works.

It demonstrates a "single page", run anywhere app, with user authentication, CRUD, full text search, user and admin accesses, and shifting the load of dependencies to 3rd party CDNs to reduce loads on the server hosting the app. Adding "Service Workers" to make it run "Offline First" is a snap using Google's "Workbox" toolset.

I believe the learning curve to use CouchDB as a backend is the main reason most developers have shied away from this approach. They're kinda "stuck" using SQL and haven't realized how much easier it is to build an app that uses a backend DB designed from the ground up for "web apps".

But... it's really easy to dip you toes in it now using the Azartiz backend and that blog app on your server. PouchDB.com also has a "Todo" app demo that can be plugged into the Azartiz CouchDB backend that you can learn with and it demonstrates a somewhat different approach than the blog app and CouchDB's "live sync" features that are really cool.

There's also CouchDB backend services available at Couchbase (https://www.couchbase.com) and Cloudant (https://www.ibm.com/cloud/cloudant), and CouchDB is pretty easy to install on a vps service like DigitalOcean.

Plus, you can install CouchDB on a desktop Mac, Windows, and even a Raspberry Pi, and use it to create backups and snapshots of your remote CouchDB databases, and of course, to develop your apps.

This is an amazingly powerful, flexible, and easy to get and use stack. I've never been as productive with any other toolset. But I didn't have any love to lose or time invested in using SQL backends. That's a lot of baggage to leave behind for most developers.

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

#377

- 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 thought jwt was pretty okay solution for authentication and authorization. any particular reason that you dont recommend?

JWT isn't necessarily a complete solution as it lacks revocation. That can be handled in other ways, but some people insist on discouraging it rather than telling you how to properly handle them.

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

#378
post #38

Earlier quoted context omitted.

> but they don't know that your client-side framework will execute code inside a {{ }} block Isn't that why they added a verbatim tag?

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' :)

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

#379
post #23

Earlier quoted context omitted.

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

Nest has a bus factor of one[1]. Django[2] and Rails[3] don't have this problem. [1] https://github.com/nestjs/nest/graphs/contributors [2] https://github.com/django/django/graphs/contributors [3] https://github.com/rails/rails/graphs/contributors

Do you mean that nestjs has one developer working on it? It does have one super active Dev, but also a few sponsors that would probably see development continue.

Just talking about node/Typescript though.

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

#380
For the backend, you need something with a standard library. Static typing and performance is nice, but if you have to pick-and-match every single little detail where you have to interact with the outside world, you'll still end up with more bugs, just outside of your own code.

So the "P"s of the "LAMP" stack of olden days might be a good first choice, probably switching out Ruby for Perl (as much as that pains me to say -- modern Perl + Mojolicious is awesome, but if you don't know this yet, it's probably too late).

Or C# / Java / Kotlin, if you've already got developers in this space or are willing to pay more and able to adjust to more mature management styles.

Go is somewhere between those two, and so is my current somewhat-happy place (old, but in a non-enterprisey org).

Node and Erlang/Elixir currently are good for some end points, i.e. if you really need a chat module. For the whole backend, I've got my doubts.

For the frontend, as others have said, if it's "just" a website, pick a good template system if you need to and just enhance it with some small javascript if needed (fancy selects and pickers). VanillaJS if you've got good JS programmers, jQuery if you just need fancy modules, (p)react if you need it on your resume.

If you either need to go SPA or need an REST API for other consumers anyway, writing the frontend in the devil's own language, 2015 edition might be necessary. I'm showing my biases again by suggesting something that already made a few choices, or you're bikeshedding again. One reason why React seems to be immensely popular with trainers/coaches. Just buy their 13-part video course and use their personal npms.

Sadly ember seems to be going the way of the dodo, ExtJS is proprietary and paleolithic and Angular strikes me as having a serious case of Java envy (which might be good. If you already picked that or C# for the backend and Struts ain't enough...).

The happy medium in this space seems to be Vue.

For the backend, use Postgres. Model your data properly, before you get to the shiny parts.

I'm not really happy with most of these parts, but that's webdev for you. The last time I enjoyed web programming was with Smalltalk/Seaside, but there's no going back...

For me, right now its: - Postgres - Go - Vue (considering Nuxt)

But for simpler/side projects, I'd seriously look at: - SQlite - PHP or Python/Flask - preact/htm for enhanced widgets

(And I would probably do the latter if I hadn't done Catalyst while everyone else was learning RoR)

Post reply on HN