Live data from Hacker News

Ask HN: Go-to web stack today?

news.ycombinator.com

341–350 of 453 posts

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

#341
post #222

Earlier quoted context omitted.

Some good advice is there but also a lot of misleading stuff. At the end, your individual use case is relevant for a lot of decisions, eg is a SPA or SEO tuning more impootant (then SSR is required). Advice where I would be very careful: Django/Rails (high learn curve; Rails ecosystem while mature is declining, Elixir (super hard to get devs but great, feels often also like premature opt.), relational DBs are great b…

I recommend Vue as the default for frond end. It's done right with a dedicated leader, comprehensible design. JSX is the worst invention of the decade. It's ugly, useless and solves a non-issue. I don't recommend it at all.

whatever is better, it is good that there is strong competition out there. pushing both to their limits. while i like vue and react can be quite challenging for unexperienced devs: at some point you land in js land, so why not using it from day 1? react is super powerful and once it clicks you cam do everything superfast. at the end of the day it is js, not more not less. i have issues with templating languages like vue, they get better and better, can do everything and at some point you have... php.

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

#342
post #310

Earlier quoted context omitted.

> - Do not use redux until you know React well. You might not need it. Indeed, I would say not using redux at all. I never understood why redux has become so popular, IMAO it's such poor design. It forces you to use switch statements, reducers, mapStateToProps(why?), etc.. Tons of boilerplate in order to set 1 single variable. Not talking about how to put data from the backend into the store in a SSR app.. I'm now us…

As a back end developer, Redux had instant appeal to me, because I've written apps that managed state by generating events asynchronously, serializing them, and using each one to update state in turn, generating a series of discrete state snapshots that were used to serve read operations. In doing so I reinvented Flux without realizing it (as everybody does when they structure an application that way.) When I encount…

I recently wrote a post called "The History and Implementation of React-Redux" [0]. It covers the basic process of how Redux works with a UI, the benefits of using React-Redux, and the specific implementation details of how it optimizes React rendering updates for you.

[0] https://blog.isquaredsoftware.com/2018/11/react-redux-histor...

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

#343
- org mode (including org-publish, org-babel and integration with clojure); use this to generate static html and publish to s3; use this to generate literate programming of your AWS environment:

- https://github.com/mcohen01/amazonica with CIDER (in emacs) all set in a literate org file for setup (but still customization). So it's easy to ramp up new websites and web services.

- for advanced compute, deploy clojure to lambda or ec2. for simple compute, deploy node to lambda.

- for authentication and other boilerplate web services, use the aws services that exist. to deploy, again use literate org files (org-babel) and upload your jars where needed.

- you have to invent as you go along (for inspiration i like https://www.amazon.com/Everything-I-Know-Paul-Jarvis-ebook/d... - just started reading it last night, new book coming out soon), but it's more fun and efficient that way.

The most efficient stack is probably [you] [20% elisp] [60% clojure/cljs] [20% html and js]. A good set of learnings for understanding how to get started with AWS services (without the clojure/cljs/elisp part) can be found in:

https://github.com/aws-samples/aws-serverless-workshops https://github.com/aws-samples/aws-modern-application-worksh...

As a caveat, this is what I'm exploring currently. This is what I'd love to work on (now unfortunately I gotta go back and do my normal day job stuff that I didn't finish last week, and then some husbandly errands and things). But if I had time, I would continue to grow in this area. You can briefly read about my journey to emacs in the past several months under Emacs here: https://github.com/tmsh/home (c'est la z's tutorials + evil mode + clojure/conj presentations are really useful). I haven't found any of the cloudformation or serverless frameworks easy to use (but maybe that's just me - kinda slow to start). But I'm optimistic about org mode + amazonica.

But don't take my word for it! Probably the most senior engineer in the entire world uses org-mode (https://www.reddit.com/r/emacs/comments/a2smk0/emacs_and_org...). And the guy who wrote HN originally was a fan of repl-based development as a strategic advantage (http://www.paulgraham.com/avg.html). If you don't like parentheses, you haven't been staring at the screen long enough so that they fade away (or use https://www.emacswiki.org/emacs/DimParentheses).

You have to learn the underlying target languages (JS, HTML, CSS, Xcode+Swift, Android Studio+Kotlin/Java; i.e., develop in emacs, press run in Xcode/AS) through various paths. And then you learn to program the programming of them with org mode/org-babel and to iterate faster with clojure and cljs. That's the growing theory.

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

#344

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

> - Do not use redux until you know React well. You might not need it. Indeed, I would say not using redux at all. I never understood why redux has become so popular, IMAO it's such poor design. It forces you to use switch statements, reducers, mapStateToProps(why?), etc.. Tons of boilerplate in order to set 1 single variable. Not talking about how to put data from the backend into the store in a SSR app.. I'm now us…

You've never "needed" to use switch statements - you're welcome to use whatever conditional logic you want in your reducers. Many people prefer to use lookup tables of functions to handle different action types.

Reducers are one of the main points of Redux, because separating the idea that "something happened" from "here's how the state updates in response" is key to allowing things like the Redux DevTools to work.

The point of `mapStateToProps` is to allow you to specify "here's the data this component needs from the Redux" store, so that `connect` can take care of the work of subscribing to the store and only re-rendering your component when it actually gets new data. See my post "The History and Implementation of React-Redux" [0] for more details.

Finally, please check out our new `redux-starter-kit` package, which helps simplify several common Redux use cases [1].

[0] https://blog.isquaredsoftware.com/2018/11/react-redux-histor...

[1] https://redux-starter-kit.js.org

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

#345
post #319

Earlier quoted context omitted.

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.

Just my experience, but every comventional web app I've worked on that used Flask ended up recreating a lot what Django does, but in a less standard way that took more time to develop and onboard new people for.

This has been my experience as well. I've been working on a solution[1] in the form of an optional-batteries-included framework built on top of Flask and SQLAlchemy (inspired by Symfony). After about a year of work, it's currently around MVP status and (biased I) thinks it's turning out pretty awesome - the docs are the biggest thing still needing improvement (working on it!).

If you or anybody else is interested, I'd love any feedback! (good or bad :)

[1] https://github.com/briancappello/flask-unchained

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

#346

Earlier quoted context omitted.

No, not right. I have work on a daily base with redux unfortunately. Redux is not too hard, but it's poor in design. Also you will have to give up redux soon, the hype is over and better things are at the horizon. There is definitely some pride in dev's working with redux, once they understand it they feel like they've grown as a developer. Do you really think redux is the holy grail of stores? If you're really smart…

Redux is not "poor in design", rather "poor in implementation". The idea is good, a true single input->update->render cycle, but the reality is tons of boilerplate and stringly-typed code. I know, you can easily improve it, but from the beginning the docs and most popular helper libaries all point you in the wrong direction.

Can you point to any specific concerns with the docs? We're planning to revamp them in the near future [0], and I'd appreciate any feedback that can help us improve them.

[0] https://github.com/reduxjs/redux/issues/2590

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

#347
post #6

Professionally and for personal projects I go with Elixir. Having 99% transparent parallelization of any task is irreplaceable in our multi-core CPU era (especially having in mind that CPUs seem to have more and more cores lately -- see AMD). Functional programming improves the way you reason about your tasks as well. Having a simple language living inside a 30-year old runtime and being able to reach for pretty adva…

If your app is going to do anything real-time with lots of messaging or reactive / live behavior, then Elixir is going to hit it out of the park. There's a reason Discord and Whatsapp are using the BEAM.

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

#348
My web hosting stack would be 1. Backend nodejs, express 2. Database if NoSQL, Firebase/Firestore (Google Cloud Platform) otherwise Cloud SQL 3. Authentication firebase handles it 4. Hosting - firebase handles hosting as well. 5. CSS, JavaScript and jQuery 6. Vscode with prettier

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

#349
post #319

Earlier quoted context omitted.

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.

Just my experience, but every comventional web app I've worked on that used Flask ended up recreating a lot what Django does, but in a less standard way that took more time to develop and onboard new people for.

I've had a somewhat similar experience. On the other hand, I still reach to Flask more frequently due to it's ability to integrate much more easily with SQLAlchemy, which I find vastly preferable to the Django ORM.

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

#350

For static websites, https://getstatik.com/ For “dynamic” websites, Mithril ( https://mithril.js.org/ ) and Redux written in Haxe ( https://haxe.org/ ) on the front end with Rocket ( https://rocket.rs/ ) and SQLite on the backend, proxied behind nginx with Let’s Encrypt on the backend. Personal projects hosted on a VM at Linode, company projects hosted on VMs at Google Cloud. It’s a somewhat unique stack but I love i…

Its an interesting stack, for sure. I'm only surprised by the sqlite choice. With such a concurrent and speedy backend, what do you do about concurrent writes and the lack of row/page level locking in sqlite?

Most things I do never get that big / popular so it’s not really an issue (especially for the convenience of SQLite when starting up a new project). The odd time I’ve run into issues I just migrate to postgres.
Post reply on HN