3 ms·
> Why can't you just use a "live" development environment in Firebase? I have a live (as in online) dev environment with its own DB, which is good for most dat
by arcturus17 6y ago
> Why can't you just use a "live" development environment in Firebase?
I have a live (as in online) dev environment with its own DB, which is good for most database reading/writing.
However, for Firebase Functions (FaaS), I really don't like the dev experience of using an online environment. You have increased latency for everything, but above all, logging is terrible.
So you have to set up the local emulators, which is not nearly as easy as doing `python manage.py runserver` or `nodemon` or what have you. I had problems with the setup this morning, and I've had to modify the code to write to the emulators instead of live functions depending on the environment (there is no way to do it purely through env variables, you have to do it though code).
I'll grant that it's improved massively over the last year or so - when I started the project I couldn't get the emulators to work at all, and SO and Github were riddled with issues on the topic.
On the topic of databases, I say it's good for most reading and writing, but last time I checked the data from emulated databases is not persisted so it's only good for fleeting tests, but not for playing around with data locally. I'm sure I'm not alone in that I often like to play around with bulk operations (such as big initializations or fetching) and manually explore the data (the "live" data explorer in the form of Firebase console web app is atrocious, there are infinitely better local solutions like pgAdmin, or the JetBrains' database explorers)
All in all the DX is just about acceptable, but I'm not impressed given that the product is almost a decade old, massively adopted, and led by Google. My original point is I believe web frameworks give me "tighter" DX, and I don't see a reason to pick Firebase over other options as a complete stack most of the time.
- endless1234 6y agoThe complete emulator suite seems to be mostly suited for running tests. When working on firebase functions, I find running only them (`firebase emulators:start --only functions`), with everything else connected to the dev firebase project online, works pretty well. Persistent data but fast feedback loop for what I'm working on. You do need some scripts to manage what you are connecting to from the front end, as if you're just working on that it's probably nicer to not need the emulators at all. I agree that it's just barely acceptable. I wish the web console wasn't so slow, and the data explorer needs a major overhaul.