Hey! I'm the creator and lead maintainer of Blitz.js, a Rails-like framework for fullstack React apps, and I'm curious if any of you have used it?
If you have, how was your experience? Would you use it again? Was there anything frustrating or confusing?
(and of course I'm also happy answer any questions you may have)
Hi Brandon,
Blitz looks awesome, I actually stumbled upon it yesterday.
My initial thought: wow, this is so cool!
But then I started reading the docs, the getting started was nice and easy BUT after the first few steps a lot of edge cases appeared, even in the docs. For example, it says that it doesn't support DB cascades (prisma limitations), that the generated scaffold is not always correct (have to manually change some files), that you must do some hacky stuff (cast
idto int), etc.So, although I was really excited at the start, I quickly realized that I will probably encounter many issues, edge cases and spend hours trying to debug what is more of a black-box than the normal from-scratch development I am used to.
I want to use Blitz for a basic web app with a simple database (users, each user only has one string of data stored), and I think I will still try to quickly test it.
Another confusing thing is deploying, the deploying docs only mention cloud platforms like Render or Vercel, I didn't see any instructions of simply building and uploading the built files to a VPS.
Overall I think it has big potential, but it seems to be really in pre-alpha at the moment.
Hey thanks for the feedback — this is a bit surprising, haven't heard this before. What is your previous experience with? (language and frameworks)
It's definitely not pre-alpha. It's fully in beta and we have many (~50-100) production Blitz apps in the wild, the largest of which is Mr-Gamble which is a very high traffic site.
Prisma is relatively early in the product cycle so it doesn't have all the features of other things that have been around much longer. But it is stable and production worthy.
We're working on improving the code scaffolding experience, but I think it's important to note that scaffolding is separate the the production quality of the framework itself.
Good point on manual deployment. We need to document that, but basically you run
blitz buildand upload your.next,package.json, andblitz.config.jsfiles. If you get that working, a PR would be really appreciated! 🙏As a disclaimer, I just ran the initial scaffold, haven't started yet writing any line of code, just skimming through the docs.
Senior full-stack dev, good experience with JS, TypeScript, React, also with back-end languages and dev-ops.
Thank you, I will try it. I usually prefer to run apps on my own servers/VPSs for better privacy, lower costs and no vendor lock-in. I was surprised to not see any basic FTP deploy instructions (what files to copy and what dependencies should be installed, or if running
npm ion the production files is enough).I'd suggest to create a page with comparisons to other frameworks. When I was reading through the features I was wondering how it compares to e.g. meteor.
Good suggestion, thanks
Why not just use Rails and StimulusReflex? Not a troll - I really don't understand why you'd jump through all of these hoops just to mimic a framework that just keeps getting better.
Personally I really don't like Ruby, primarily because it's not statically typed. I really love Typescript and want to use it for the fullstack. And I'm way more productive at building UIs with React than any other way.
Blitz doesn't just mimic Rails — Blitz has a lot of unique ideas that fit better in the JS ecosystem.
Rails is great at what it is does, but I'm way more productive with Blitz than with Rails. One Blitz dev said he was a professional Rails dev for 10 years, but after just a few months with Blitz he's already 10x more producitve than he ever was with Ruby on Rails.
Fair enough! Personal preference goes a long way. FWIW Ruby has a type system; two depending on how you count. I've heard a lot of reasons that people don't use Ruby (or Python, in the typing case) and in reality it turns out that most people don't like it because they haven't actually used it for more than a Hello World and they heard it wasn't cool anymore. Meanwhile, Rails apps are directly responsible for well over 50% of the total net wealth generated by YC companies.
I personally think that choosing TypeScript over a language literally designed to make you happy as a daily driver just because of typing sounds like pure masochism, but you have to do you. I also like working in a language that can tell me the name of the function I'm currently running.
¯\(ツ)/¯
Here's the thing: I've built projects with both React and React Native. It's a complete fallacy - regardless of how common it is repeated - that React is faster to work with than layout/view templates... especially when you factor in that you can easily drop in something like ViewComponents where components make sense.
However, the real reason I find the claim objectionable is that so long as you're dedicating >0% of your brain to maintaining and synchronizing state between the server and client, the argument is sunk. StimulusReflex and tools like it allow us to build reactive UIs that hold the state on the server without any time wasted building JSON endpoints and lobbing JSON payloads and verifying JSON responses.
Cutting state management out of the process means that one person can build functionality in a day or two that used to take a small team weeks.
I'd love to talk to the Blitz enthusiast who was a professional Rails dev for 10 years - I'd know him. I'd like to understand his story, and what went wrong.
It feels like you are assuming there's only one right way to do fullstack dev 🤔
Look, different people are productive with different tools. You are way more productive with Rails, so you should use Rails! I'm way more productive with Blitz, so I should use Blitz! Everyone should use what they like and what they are productive with. There's not one right way to do it.
I've used Rails a lot for production projects. And Typescript makes me so much more happy than Ruby. It's a good thing there are multiple languages, so we can all have on that makes us happy! :)
Rails is not dead. It's great. Blitz just fills the giant hole in the JS ecosystem that so many people have been wanting to be filled.