by Cwizard on 9/16/23, 9:36 AM with 43 comments
In my experience a lot of the jobs I get are to build backends that are mostly CRUD operations with a few endpoints that present 'aggregated' or filtered views of that data. Most of these apps will also need some mechanism to do background processing.
What is your preferred stack to build such a backend today? What tools and frameworks do you like and what have you changed your mind on and don't like anymore (after using it)?
Does your choice of tools change depending on if it is a commercial venture or a personal project?
Curious to hear what everyone is using these days.
by hamdouni on 9/16/23, 1:26 PM
If a web frontend is needed, I'll take svelte (not svelte kit) to code independente components that talk to the backend. I'll code there only interface logic (no control, no calculation, etc...)
by viraptor on 9/16/23, 11:45 AM
by ale_jacques on 9/16/23, 12:52 PM
Django + Unpoly + Postgres
Development as fast as it can be. :D
by moomoo11 on 9/17/23, 3:14 AM
Use Postgres and embedded db for cache. With SSD and Nvme you can leverage the embedded db for crazy performance. These days you can get a lot of storage space. Swap file and 5gb of space for the db as cache and you’re speeding. Save money and the network call, don’t need Redis.
React or svelte for UI. Don’t use next or any of that bloat. Use vite and lazy loading. If you need SSR don’t use SPA tech, maybe sveltekit would be good. I use sveltekit and react mostly.
For anything else like using sdk I use node if it’s not available for Go.
by sirrele on 9/17/23, 10:48 AM
https://loopback.io/doc/en/lb4/
https://github.com/ferdikoomen/openapi-typescript-codegen/tr...
by chimichurri on 9/16/23, 3:22 PM
- Stack:
- Application FE:
- Next JS (Hosted via Vercel)
- Hasura GraphQL for real-time messaging.
- Supabase for Auth and hosted Database.
- Application BE:
- PostgreSQL via asyncpg (no ORM)
- Uvicorn - hosted on AWS Lightsail.
- Redis - as a message queue.
- Hasura GraphqlQL for real-time messaging.
- Monitoring:
- Axiom https://axiom.co/vercel as it integrates with Vercel.
- Packaging:
- Docker & docker-compose
by gls2ro on 9/17/23, 6:45 AM
For CRUD is the perfect fit (for me).
For background processing job I would pick Sidekiq or GoodJob
And would add to it a library like Avo - a good admin that will remove for me the need to create my own backoffice dashboard.
If I would have more time to put aside for learning something new I would try Hanami 2: it is Ruby but it comes with a different code architecture for a web app.
by ilaksh on 9/17/23, 10:05 AM
When I was around 14 or something I started teaching myself relational databases with something called Paradox for DOS. For at least 15 years I went along with the assumption that real programmers use a relational database for just about everything.
When the NoSQL trend appeared and became wildly popular, it made me reconsider.
These days, if I can get away with using JSON files, then I just do that.
As far as the stack I usually use Node.js and JavaScript just because I have been doing it that way for so long. Recently some people specifically ask for Python.
Obviously, whether that will work depends on the project.
You often don't have a choice because the database is already built.
For many projects, there are multiple different approaches that would work fine.
I think for the future you will start to see languages that target web assembly becoming more and more popular for portability. Such as Rust and maybe some Rust competitor that has yet to become popular.
There will probably be some kind of popular web assembly runtime soon bundled with Postgres or something.
Or maybe someone will just build a Postgres extension that serves web pages running web assembly that can query Postgres.
by floydnoel on 9/16/23, 9:53 PM
by Jugurtha on 9/16/23, 12:30 PM
- Stack:
- Application:
- Flask[0]
- Flask-Admin[1] (maybe for the initial prototype)
- SQLAlchemy --> PostgreSQL
- Gunicorn --> Nginx
- Celery[2] (long-running background jobs)
- Monitoring:
- Sentry[3]
- Analytics:
- PostHog[4]
- Packaging:
- Docker[5] & docker-compose
I may use Flask-Admin initially to offload the "CRUD" operations to have an initial prototype fast but then drop it ASAP because I don't want to write a "flask-admin application" to fight against later on. If the application is mainly "CRUD", then Flask-Admin is suitable.Now...
Would you do a breakdown/list of all the jobs you've done by sector/vertical and by function/role and by application functionality?
- [0]: https://flask.palletsprojects.com
- [1]: https://flask-admin.readthedocs.io/en/latest
- [2]: https://flask.palletsprojects.com/en/2.3.x/patterns/celery
- [3]: https://sentry.io
- [4]: https://posthog.com
- [5]: https://www.docker.com
by muzani on 9/17/23, 2:12 PM
If Parse Server dies or implodes for some reason, it's still built on top of MongoDB, so the data still belongs to me and I can switch to something else. I also don't need to worry about horizontal scaling.
Tutorial on it for setting up on Heroku: https://smuzani.medium.com/setting-up-a-mobile-backend-serve...
It's a little old, but the stuff I built on top of Parse Server back then has been scaling up to a thousand users, and now we've just been adding things like pagination and giving heroku more money.
by trcarney on 9/19/23, 6:52 PM
For personal stuff this is great because you can run everything you need for next to nothing. For commercial stuff, it would depend on the use case. If you are going to be handling a bunch of requests or have to do a large amount of processing, you may want to go a different direction, as is the case with all serverless applications.
by calferreira on 9/16/23, 12:48 PM
by ailef on 9/16/23, 12:49 PM
Alternatively, Flask/Jinja/Vuejs if I'm working in Python.
by seattle_spring on 9/16/23, 6:46 PM
by sourcecodeplz on 9/16/23, 5:46 PM
by joisig on 9/16/23, 4:19 PM
Same for personal projects.
Sentry is great for monitoring. Prometheus/Grafana for operational insights. All are easy to integrate with Elixir.
by hiAndrewQuinn on 9/17/23, 8:58 AM
- I know Python very well.
- I know Django quite well.
- Django is extremely mature.
- The Django REST Framework is quite mature.
Other stacks I've used: None, because I only started taking this kind of stuff seriously a year ago.
What else I'd recommend: Whatever you're most familiar with.
by Infernosquad on 9/16/23, 1:05 PM
Also it has ApiPlatform where you can just add new CRUD api using few annotations/attributes
by jweatherby on 9/18/23, 12:46 AM
One app, no need for an API, typesafety baked in at the DB and API layer, client-side interactivity, and server side authentication is easy to work in.
by keyle on 9/16/23, 10:05 AM
Fullstack including frontend, jobs, emails, I'd still pick the PHP+Laravel, with Livewire. It's incredibly powerful.
by taf2 on 9/17/23, 1:30 AM
by gregors on 9/16/23, 5:10 PM
by deterministic on 9/17/23, 3:00 AM
by anoy8888 on 9/17/23, 2:28 AM