Ask HN: What is the most productive stack or lang for single devs ?
What is the best language / framework / stack that you can do work most or fast or most productive for a single developer . Python with django/flask , Ruby on Rails with ruby , rust with some frame work , Node js or something else. preferably with a easier learning curve .
Scenarios : 1. Webapps
2. Simple Website
3. Simple social media
63 comments
[ 4.7 ms ] story [ 154 ms ] threadLearn a platform. Not a framework.
You could pick at platform to specialize on and learn whatever framework / language you can use to extend that platform.
For example you will be very productive very fast if you pick a platform like Microsoft Power Apps[1]. Although it is a no/low code platform there are tons of places to write code especially when you start to leverage azure functions. (c#/javascript/phyton/java) There are alternatives to Power Apps but that's the platform I am familiar with.
I know its fun to build apps from scratch but if you want to be productive fast you can cut a huge corner by building on top of an existing app platform.
[1] What is Power Apps? https://learn.microsoft.com/en-us/power-apps/powerapps-overv...
If you aren't familiar with elastic stack don't let it put you off that they mark it as search product [2]. It has a tons of integrations [3] [4] allowing you to connect with almost anything and write code against it using any framework. Elastic is awesome.
Elastic Stack is much more code heavy than an low code platform but you get tons of features out of the box.
In the eyes of you app elastic is just an API that provides access to your data. When evaluating elastic try to abstract from that it is a search engine. Try to think of it as just a mechanism to access and work with data. Instead of firing a sql query against a database to get your data, you execute a search query.
From that build app app just like any other data drive app using whatever framework or language you prefer.
[1] https://www.elastic.co/elastic-stack/
[2] Elastic Search is the search component in the elastic platform. Elastic Stack is the platform.
[3] https://www.elastic.co/integrations
[3] https://www.elastic.co/integrations/data-integrations
One of the compelling reasons to write JS on the server was to have the same language and ecosystem in the client and server, and things like Turbo for Rails really go a long way towards delivering on that for Ruby (although of course you still need to understand javascript and browsers.)
That said, if you're already familiar with something else, then pick the most mature batteries-included framework in that language. Languages are just a tool for the job, it's incredibly unlikely as a solo dev that you can pick a "wrong" one.
Languages, libraries and frameworks constantly evolving so it's a moving target too.
I think most people will just recommend the stack they know best unless you have more specific criteria.
Again, I don't think you can go wrong with Rails for web apps as a solo dev.
You get a lot of utility out of the box with Rails and you can also easily remove things you know you won't need.
e.g. Little utilities like Array#to_sentence[1] might not seem important at first but they're real time savers when you're working on your own to get something out the door.
1. https://api.rubyonrails.org/classes/Array.html#method-i-to_s...
It's very powerful, the tooling is free and best-in-class, self hosting on a cheap Linux VPS is trivial and the framework itself includes almost any functionality you could wish for with installing random packages.
Personally I find PHP + Laravel is great for throwing together a simple website. The amount functionality Laravel provides out of the box is incredible and so long as you're not doing anything too crazy you'll find most of the heavy lifting has been taken of for you.
If you need to use a modern frontend JS framework on your frontend then I'd probably go with React (or Vue) with a Node/Express API. I'm not a huge fan of using Node on the backend for professional projects be honest, but if you're a single developer I think there are benefits to using a single language on both your frontend and backend. I've tried using Vue with Laravel before, but I didn't like constant context switching between languages.
I've not got much experience with Ruby on Rails but I've heard good things about it and I suspect that would great option if you have familiarity with Ruby. I'm not sure if Rust would be the most productive choice?
If you're just getting into web development I'd go with Laravel personally. I wouldn't complicate things just yet with adding modern frontend frameworks like React into the mix.
In general the selection algorithm for results-driven development is: First, go with whatever web framework you're most comfortable with. If you don't have any, go with whatever the most popular framework is, in the programming language you're most familiar with.
The reason this works well is because your question is ill-formed. In general, I haven't seen any hard evidence that Django vs. Rails vs. Laravel vs. Node vs. (etc.)-based projects have big variations in lead time to new features, lead time to bug fixes, etc. Your knowledge of the underlying PL, framework, and their quirks dwarfs any technical advantage they might have over one another.
(For the sake of completeness: If you don't know any programming languages, go with whatever the most popular language is. How do you know what's popular? Intuition! Most people's brains will answer "Python" or maybe "JavaScript" to that question, and those are both great choices. If you're the kind of weirdo who says "Ruby" or "PHP" or "Scheme", you might as well roll with it, because that answer comes from a part of you which is constantly noticing the trends in its local environment, and it probably has a lot more logic than you would expect.)
Nextjs for example don’t come even close - you can easily waste a month just properly setting up your monorepo with all necessary bells and whistles.
With this come also the scaling pains and downsides, which might only be relevant to a tiny percentage of solopreneurs.
EDIT: this was after 1-2 months of intro Python and JavaScript, so they weren't going in blind but also didn't have to learn, say, React. If you know some Python, you can use Flask. If you know some JS, you can use Svelte.
So why not go with the one language that works on the backend, frontend, data processing, scrapping? Getting to a pro level in multiple languages is more difficult than mastering just one.
Even if you are a single dev, you will probably find yourself interacting with other members of the community. (Maybe more so for a single dev?) I find the Svelte community quite responsive and helpful.
SvelteKit can handle both client and server parts. It streamlines a lot of the stuff most web apps need like routing. However, it doesn't include some other common stuff like auth and persistence to a database.
https://kit.svelte.dev/
I'm looking for something like HTMX in its methodology, which uses HTML attributes for defining API calls and where the data comes from without having to write additional glue code in JS... but which uses OpenAPI as a schema for serialization/deserialization of data to/from the API endpoints.
Maybe something like that exists which I couldn't find with my Google Fu?
I'm not sure of anything like what you described, good luck on the search for it. If you find/develop anything ensure you post an obscene amount of memes on twitter for optimal discoverability by tech influencers.
Maybe swap HTMX for Unpoly which is more polished IMO.
I'm familiar with go, but I always write JSON apis with it, not SSR.
In rails protect from forgery ensures csrf token is put in there to ensure security and authentication is provided by devise, or omniauth or the framework, but if I wanted to roll my own the framework provides tools to safely compare password hashes to avoid timing attacks. Is there anything similar for Go? I'd love to write my next project with that instead of Rails.
Ideally, I also need an "admin UI" of some sort (activeadmin in rails)
To me it seems like your very early on your journey and haven't ever learned a web framework or become proficient in at least one language.
So if I was to give you a blanket recommendation: Javascript or Typescript.
From there you can start on the frontend side and work your way to a backend (Nextjs is a good candidate here)
or do the reverse and go back to front and start with Express
The reason im recommending this is
- Youll have to learn javascript anyway
- It has tons and tons of support (libraries, tutorials, docs)
- You can also venture into mobile app development if thats interesting.
- Once you get the hang of it I believe its faster to spin up projects than rails or django
This is coming from someone who has worked professionally in *a lot* of stacks
- Ruby / Rails / Angular
- Python / Django / jQuery
- C# / .net / knockout.js
- Javascript / Express / React Native
- Elixir / Phoenix / React
- Hasura / Nextjs
- Go / Nextjs
- Java / Spring
- Haskell / Elm
Aside: if you want to know my favourite stack, BE It's Elixir / Phoenix by a large margin. FE im just more productive in React/Nextjs but Remix seems cool.
Productive out of the box, comes with bootstrap 5, jQuery( yeah i know).
It's has amazing documentation easy to learn. It uses PHP for templating, so you can prototype very quickly.
Collection of wisdom:
- A single dev will be more productive with a mature framework 10+ years, most of it has been documented, bugs fixed, tooling matured. Old is tried and true
- JavaScript libraries rot very quickly. Try running any node project from 2 years ago? Now try running any PHP, Django project from 15 years ago see the difference.
-C# and .Net is amazing
-Sqlite is amazing
- I was an angular/react dev for many years, now I'm pumping server side html templates and jQuery like there's no tomorrow. It's so easy, so simple. Why push json on the backend, then another project to consume/validate that JSON on the front-end, when I can just push everything as HTML.
- It's not just easy to develop, it's also ease of deployment.
Not sure about 2 and 3, not my cuppa tea
You probably want to use a framework of sorts. Laravel or Symfony are good. Not mandatory though.
Server side rendering to start off with. Bulma for CSS. Alpine for JS.
Throw in some cronjobs for scheduled stuff.
Maybe a bit of Redis for sessions and caching.
Anyway, HTML and Javascript is the simplest thing that might work. HTML and javascript are the fundamental abstractions of web development. Not knowing them is an "illiteracy."
Getting anything up and running will still require a lot of workflow discovery. When you have experience in a workflow you can make informed decisions about your particular needs.
https://wiki.c2.com/?PrematureOptimization
Good luck.
The past few months I’ve been working heavily with Python type hints and pydantic which makes it bearable.
Golang is strongly typed but it’s difficult to transform data handily with one-liners.
I’ve used Java and Spring but it’s very verbose
In my experience, TypeScript and its ecosystem has been very productive. It runs on backend and frontend, and the type system is very expressive. I always reach for it first.