Ask HN: Fastest/easiest framework to build a web application in 2020?
I asked this same question a couple of years ago -> https://news.ycombinator.com/item?id=15715547
Since then a lot has changed. I'm curious what people consider the fastest/easiest way to build a full-stack SaaS app in 2020.
Assume the following:
- Can be picked up by almost anyone (assume basic HTM/CSS/JS understanding), doesn't require any deep CS understanding (think how easy Rails was in 2006)
- Has full-stack capabilities, not just front-end
- Is open source and can be deployed anywhere
- Is complex enough to rule our no code solutions like Bubble or Webflow
92 comments
[ 60.9 ms ] story [ 2114 ms ] thread(I'm not a web dev, but played around with Flask recently and in general find the giant ecosystem of different frameworks fascinating.)
1. There are some bugs that can't be fixed just because they break backwards compatibility. E.g. usernames are stored to the database incorrectly by default, but the dev team isn't going to change it. So if you don't know that it works the way that it does, it can cause issues.
2. Most people now use a js frontend and a REST backend. Django can do this well, but because it wasn't originally designed to be used that way there is a ton of random cruft that isn't super useful to most people anymore.
3. No good async story. They are working on this, but it's going to be kind of bolted on rather than designed for async from the ground up.
4. Lots of random cruft related to weird design patterns that folks have advocated for over the years. You don't have to use any of it, but the fact that it's there leads a lot of people to believe they should be using it, which leads to bad codebases.
Basically you can do everything you'd want to or need to using Django, but there is just a bunch of random crap in there that you need to prevent people from using. And preventing people from doing stuff that they want to do tends to lead to either conflict or technical debt, so it would be much better if it just weren't there in the first place.
If i saw this sentence out of context I would have bet a decent amount of money you're talking about C++. This describes C++ to a T.
It's still brittle, it's still user hostile and it's still slow. Seems like a massive waste of time and a vanity project to me.
I'm still mainly doing server-side templates coupled with complicated js widgets when I really need them.
I usually end up with fairly succinct code and it's never difficult coming back to a project that is 5-6 years old. Can always understand what's going on in the project and get my mind back and running quickly with it.
Using it with GraphQL (graphene) makes it feels a bit more like one of the newer frameworks out there.
Really happy I learned it years and years ago. Nice to invest time into a framework that is still going strong so many years later.
Back: FastAPI
- React for the front end (https://reactjs.org)
- Node.js for your back end (https://nodejs.org)
- Deploy using Adapt, which ties your front and back end together using React-like components. (https://adaptjs.org).
- (Optional) If this project is larger or commercial, definitely use TypeScript on all 3 of the above (http://www.typescriptlang.org/)
[Disclosure: I'm a maintainer of Adapt, but a strong believer in the React model and ecosystem]
Im sorry but why would someone want to use a templating language to configure infrastructure? It’s like using CSS syntax for defining an HTTP API. Doable, but... why? It’s not any easier to pick up or reason about than any existing configuration language.
On React + node, this assumes no rendering on the server, plus you’ll need to pick your own state management solution, data layer, http framework, router, and a whole host of secondary tools, which will comprise about 96% of your actual development time.
At any rate the reason why somebody might want to do this is purely because its declarative. I prefer imperative programming myself, because I want to know exact what the logic is doing from reading the code, but many people don't think that way. Many people want to know what is happening without being overwhelmed by how its happening and they need the code to communicate to them in exactly that way.
Of course, with great power comes great responsibility...
A 200 l.o.c. promise chain vs a 10 liner in Python or PHP or Ruby?
Just feels dirty to me.
As a project gets larger (more code or more devs), each dev spends more and more time figuring out what the correct types need to be when using various internal APIs. Refactors get harder because it becomes harder to know whether you've correctly found and changed each place that was needed.
And although all projects have this to a certain degree, one typical goal of a commercial project is a higher quality bar for software while still optimizing amount of effort to get that quality. (And commercial projects are often larger too.)
TypeScript helps with these issues (and others). In my opinion, it increases developer productivity for all but the smallest JavaScript projects. It's a combination of both the static typing and the tools available that help the dev immediately, as opposed to waiting for a compile or test run.
I'm actually passionate enough about the topic that I have an old blog article about it: https://medium.com/hackernoon/3-reasons-why-we-use-typescrip...
It has a great ecosystem and lots of great packages and tools to make it fun and easy to develop web applications.
If you don't, Rails or Laravel are both good options. I'm partial to Ruby, its syntax, its expressiveness; the ecosystem cannot be beat, and the tooling is stable and mature. There's nothing not to like.
I think you're not going to see much consensus to this question, merely a comment-based list of all possible frameworks that people know.
User joshmn had it right in his reply:
> If you know something now, use it.
Anything your team already knows will be easiest and fastest for you to use. Any new person you hire will have a lot to learn no matter which one you choose, unless you hire people for the framework/stack you chose.
There is no "right" answer to this, and there probably never will be, and that's not a bad thing. Trying to find the "perfect" solution is a futile effort.
Not a bad stack, but the development team was a group of PHP developers. Rather than go with something they all knew, the leadership decided that switching stacks and having the entire group learn Python with the CMS/CRM/Fulfillment system being their first professional project was the way to go.
What resulted was a misshapen monstrosity. Plenty of good ideas, ruined by limitations in understanding of the stack they tried to implement, and further hampered by a lack of good direction and herding of the team. The stakeowners of various bits were allowed to snag their pet developer and lean on them until their "feature" was implemented, with little to no cohesive architecture in place.
Perfect is the enemy of good. There are dozens of frameworks because they all have their uses. Stick to what you know, and let that guide you. If you have a desire to learn a new stack, go for it. But don't pick one because someone else says "it's the best".
[0]https://zeroserver.io/
I'm a front-end developer looking to get serious about practicing my back-end development skills. Any recommendations for a language/framework with static typing (outside of Node + TS)? Spring Boot and Kotlin? .NET Core? Go?
Big Disclaimer: My observations are completely subjective and personal so YMMV.
Spring Boot and Kotlin: I REALLY like Kotlin as a language, though Spring Boot felt heavy and sluggish from a developer productivity standpoint. This could be my inexperience with Spring and the JVM ecosystem, though I've also read comments on Hacker News that roughly say the same thing (1). I've also read that the heavy use of annotations in Spring Boot are great initially, but it creates headaches for more complex projects. The Maven/Gradle package management experience wasn't great either when compared to RubyGems/NPM. I also tried Kotlin + Ktor(2) on a personal project. It felt better, but at the time it was hard to find solutions to problems on Stackoverflow or the web.
Go: I briefly worked on a project that used Go + Gin. I loved the simplicity of Go and features like concurrency and the built in code formatter. Though at times code felt a little too low-level when implementing business logic such as model validation etc. I missed language features such as generics, null checks and discriminated unions that other languages have. Handling errors also felt tedious at times. However I completely understand the appeal of keeping the core language simple.
.NET Core: I'm probably the most torn about .NET Core. I've always preferred a *nix/Mac system and borderline hated Microsoft during the Balmer years. However C# is a properly good language (though not quite as nice as Kotlin) and the .NET Core standard library feels well designed. There are new features coming in C# 9 like discriminated unions (sealed classed in Kotlin) and records (data classes in Kotlin) that will make it even better. It's not all great, I found unit testing is much more tedious in C#, especially compared to something like Jest or RSpec. Mocking/stubbing was especially difficult as you can't easily override a method unless it's tagged as 'virtual'. One way around it is to use interfaces for the argument type, however this can cause your project to be scatted with pointless interfaces that are only used to overcome this restriction (3).
ASP.NET Core overall is very nice to work with and it's blazingly fast (4). It does have remnants of some enterprisey cruft, but overall I found it very productive to work with. Using VS Code and Jetbrain's Rider made coding on a Mac a breeze though full Visual Studio for Mac is pretty awful.
But here's biggest issue with .NET Core: while it's truely cross-platform and open source, I found the broader .NET ecosystem and community is yet to embrace this. I'm not sure if it ever will completely. The vast majority of YouTube videos and articles I've read assume you're using Visual Studio on Windows. That makes sense, as a 2019 Jetbrains survey indicated that 90% of C#/.NET developers use Windows (5). But if Windows is your jam, this might not be an issue for you.
I also have the strong feeling that Microsoft's strategy for an open sourced .NET is to push the use of Azure for hosting. While it's definitely possible to deploy a .NET Core application to AWS or GCP I worry that Microsoft will always have a bias (even if it's unintentional) to make .NET Core be better on Azure and have soft lock-in. E.g .NET Core will run on any cloud provider, but you'll get the most of it if you're running on Azure.
All of these framew...
Last night, I went through a lot of research and bikeshedding myself, and a lot of my intuitions aligned with your experiences.
I was curious about Go, but it seemed while it was possible to do mostly everything you wanted to do, it wasn't necessarily a smooth experience.
I looked at Kotlin next. I'd used Spring Boot before with Java, and at the time I was fond of the annotations, but, like you said, I've heard that they can become a burden in larger projects. Thankfully, I saw that there were a number of other Kotlin web frameworks that had vocal support.
Finally, I spent the last bit of my time choosing between C# (.NET Core) and Kotlin with Ktor something else. I ended up finding this very helpful site[1] that showed examples from the two languages side by side. That had settled it for me; C# just looked more like what I wanted out of a programming language's syntax. Plus, LINQ looks really cool.
At some point in the future, I'd also like to gain more comfort with Python and Django. I can't stop hearing good things about those two.
[1]https://ttu.github.io/kotlin-is-like-csharp/
I love Python but have only deployed PHP apps.
Sample for Apache:
https://www.codementor.io/@abhishake/minimal-apache-configur...
The nice part about Node is that you'll have JS on both the front and back ends.
It really scalable and if you use typescript, you can get type safety as well :)
It does have graphQL which can get a little tricky, but the constantly rebuilding dev environment and GitHub hook driven deployments make running a site a breeze.
It can do anything you could possibly want to do with a standard web app and if you really want to do crazy Javascript things you can always just use it as an extremely powerful backend for whatever the frontend framework of the day is. The admin site alone has saved me weeks of work and I keep finding amazing features in it that often just seem like magic (formsets!!).
I know PHP is super easy but wasn't sure how it was for Python frameworks?
Nginx has a similar module, but I haven't used it personally.
Your first try might take a couple of hours to get right. If you want HTTPS (you should) Caddy might be a better route than nginx. It's certainly easier.
Most social auth uses OAuth2, which doesn't exactly make sense with REST, but you can still use it alongside a REST-based app.
I see 4 scenarios:
1. A JS web app that uses SessionAuthentication can just use python-social-auth's Django app directly. Since the session is shared, it should Just Work™.
2. A JS web app that uses tokens: django-rest-framework-social-oauth2 seems to be made for this, but you could also do it with plain python-social-auth (which the former uses internally) by generating a token on your /success URL and sticking it into localStorage.
3. A non-web app that uses tokens: like number 2, but in a WebView.
4. A non-web app that uses sessions: like number 1, but copy your cookies into a WebView, do authenticate in there, then copy the cookies back.
So why not use Rails?
There is your answer!
But for anyone with a decent amount of programming experience in a mainstream high level language like C# / Java / JS / Python / Ruby etc. it's probably best to stick to your own language and pick it's stack, if it is dev speed you are after. Some might be easier to set up than others, but there are plenty of example github repos you can clone to get started anyway.
For (what I'll call.. sue me) "systems" languages C, C++, Haskell, Rust, GO etc, I'd probably move over to one of the mainstream stacks for getting things done fast, as they will have a better ecosystem. Also if you already know one of those languages you can easily work with the mainstream ones!
The last 2 months have seen more activity after a pretty long silent period.
Python => Django
PHP => Laravel
Ruby => Rails
Node/JS => ExpressJS
Elixir => Phoenix
My personal opinion on building web applications the quickest way. I mostly use Laravel.
Disclaimer, biased as I am the lead maintainer for the project ;)