The most robust way to get firmware on the device is by using a programmer. That should have access to pretty much everything, bootloader included.
Now, since that’s not something everyone wants to mess around with (and probably shouldn’t unless (s)he knows what (s)he’s doing), there’s the CLI. The CLI uses DFU-util to allow you to flash firmware to the device. Seeing as this is over a USB connection, this is more stable than OTA, and also faster.
Then there’s the OTA upload stuff going on in the Web IDE/Particle Dev. This is the easiest way to update/upload firmware, since you only have to click a button, without setting your device into whatever mode. No physical connection required as long as it’s online. That said, this is also the least stable option. Even though there are certain protections built-in, there’s always a risk of something going awry when WiFi decides to crap out (for whatever reason). According to Murphy’s Law, that always happens at the most inconvenient times.
Particle Dev uses the same OTA system, so it doesn’t differ much from the web IDE. Currently though, it won’t issue an OTA update even though your device might need that. If I’m not mistaken (and I very well could be), the Web IDE is currently the only one triggering that update automatically. ( <- someone please correct me if I’m wrong!).
If, for whatever reason, an OTA update failes, which can’t be solved by placing your device into Safe mode, your best bet it to use the CLI in DFU mode. First update the firmware with
particle update, after which you should be able to flash your own user code. After the update, it should, once again, be able to connect and be updated OTA, should you want to do so.
If all what fails, and the Silicon Gods hate you for whatever reason, there’s still the option of using a programmer to get it completely reset. Luckily that’s rarely needed. I’ll have to refer to some of the brighter minds on here to tell you more about that, should you want to know.
Hopefully that cleared something up. (To the brighter guys on here, I know you’re reading this, please correct me if any of the above is wrong!)