The Decline of Firebase (bundle sizes) // New JavaScript SDK First Look

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ส.ค. 2021
  • The latest Firebase JavaScript SDK (version 9.0) has been rewritten as a functional library resulting far smaller bundle sizes for better web performance. Learn how to upgrade your Firebase web app fireship.io/courses/
    #firebase #javascript #firstlook
    🔗 Resources
    Get Started with Firebase • Firebase - Back to the...
    Firebase Blog firebase.googleblog.com/2021/...
    🔥 Watch more with Fireship PRO
    Upgrade to Fireship PRO at fireship.io/pro
    Use code lORhwXd2 for 25% off your first payment.
    🎨 My Editor Settings
    - Atom One Dark
    - vscode-icons
    - Fira Code Font
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 198

  • @JamieMcI
    @JamieMcI 2 ปีที่แล้ว +755

    At least something is losing weight over this pandemic...

    • @info662
      @info662 2 ปีที่แล้ว +8

      Good one

    • @alejomakevids
      @alejomakevids 2 ปีที่แล้ว +26

      my wallet was :(
      f... this pandemic

    • @ThingsUWant
      @ThingsUWant 2 ปีที่แล้ว +17

      @@alejomakevids I laughed, then realised this was also me

    • @nikhilwadekar565
      @nikhilwadekar565 2 ปีที่แล้ว +1

      😂

    • @RyanKOnk
      @RyanKOnk 2 ปีที่แล้ว

      @@alejomakevids man i finally understand your name

  • @mattshnoop
    @mattshnoop 2 ปีที่แล้ว +192

    I've been looking at migrating my main pet-project to the new SDK and now all of a sudden you've covered it in a video. Your timing is amazing once again!

    • @martinn.6082
      @martinn.6082 2 ปีที่แล้ว +1

      They know because you're using copilot 😈

  • @moh6823
    @moh6823 2 ปีที่แล้ว +107

    D3.js in 100 secondsssssss

    • @brianevans4
      @brianevans4 2 ปีที่แล้ว +3

      Yes pleaseeeeeeeee

    • @AdharshMk96
      @AdharshMk96 2 ปีที่แล้ว +2

      Yes need this it's very much needed

    • @aleattorium
      @aleattorium 2 ปีที่แล้ว +2

      Commenting so fireship notice it

    • @betweennightmares
      @betweennightmares 2 ปีที่แล้ว +1

      Im from the future

  • @adelarsq
    @adelarsq 2 ปีที่แล้ว +7

    Really like the new FP approach! Thanks for share!

  • @vitfirringur
    @vitfirringur 2 ปีที่แล้ว +61

    I personally welcome all these changes, and as an avid FP user, it also just feels pretty natural. Morally, there is little difference between class methods and functions which take objects as arguments. I would even argue that this kind of design facilitates writing less coupled code, because, when using classes, it can be easy end up making a class do too many things and just hide all the complexity in private methods or some such. Passing things as arguments forces you to think hard about the public interfaces of the things you are passing around.
    I also tend to use this style a lot in my own projects using TS. When most of your code is just a series of transformations between different types, it is easier to get the compiler to help you out.

    • @pkop4
      @pkop4 2 ปีที่แล้ว +8

      Morally?

    • @vikumwijekoon3166
      @vikumwijekoon3166 2 ปีที่แล้ว

      honestly if FP was more memory efficient I geniunely think it would have caught on faster than OOP. its generally a delight to code with FP and OOP is a pain

  • @sharaths2294
    @sharaths2294 2 ปีที่แล้ว

    Man every video of your are more informative than any TH-cam channel . Thank God that I found this and subscribed.

  • @Rmp613
    @Rmp613 2 ปีที่แล้ว +2

    I love it so much. All my prayers are answered. I had so many bugs over the years that I would be unlikely to get with this functional style too

  • @klutch4198
    @klutch4198 2 ปีที่แล้ว +7

    I had a feeling this was coming!

  • @Seanitzel
    @Seanitzel 2 ปีที่แล้ว +20

    I've already migrated a pretty big app of mine to the new SDK, It took me a few hours and I prefer it a lot over the old API.
    Totally agree about the way we have to send the getX object to every function every time feeling awekword,
    I was thinking of adding an abstraction over it as well.
    Great video!

    • @devroom8904
      @devroom8904 2 ปีที่แล้ว +1

      I wanted to comment with the same thought. It is very tempting to have an abstraction. Still planning on the best way to.

  • @dmz985
    @dmz985 2 ปีที่แล้ว +107

    You could create curried versions of the functions you use, and pre-pass the auth object to them.

    • @AdarshMadrecha
      @AdarshMadrecha 2 ปีที่แล้ว +4

      can you pls provide example?

  • @justingolden21
    @justingolden21 2 ปีที่แล้ว

    Awesome news, thanks for the quick and informative vid!

  • @thechingochingo9956
    @thechingochingo9956 2 ปีที่แล้ว +2

    i was going to learn node just to use a new database
    i wanted to take things slow but firebase with it's limitations and size were too big of a deal.
    i wouldn't have known about this without you ,thank you

  • @GlitchyPSI
    @GlitchyPSI 2 ปีที่แล้ว

    Impeccable timing

  • @jaedson-barbosa
    @jaedson-barbosa 2 ปีที่แล้ว +2

    Obrigado amigo, nem precisei ver outro tutorial pra poder atualizar meus projetos.

  • @Gers217
    @Gers217 2 ปีที่แล้ว

    I was looking for bad news but this is equally good

  • @RamdanCode
    @RamdanCode 2 ปีที่แล้ว

    Nice, Thanks a lots

  • @JonathanRose24
    @JonathanRose24 2 ปีที่แล้ว +8

    This is great news. I love firebase but the bundle size has always been a pain point. I look forward to refactoring my app to use version 9 once its out of beta

  • @CoryTheSimmons
    @CoryTheSimmons 2 ปีที่แล้ว +3

    Looks nice. Glad the Firebase team got around to this. I'll wait half a year for them to iron out any bugs and get docs more in line with the new stuff, then give Firebase another chance on a small side-project.

    • @imnemo2327
      @imnemo2327 2 ปีที่แล้ว

      Why small side? Is firebase not good on large scale?

  • @AkashHamirwasia
    @AkashHamirwasia 2 ปีที่แล้ว +1

    Only OG Fireship viewers remember that sweet background music 😄

  • @nickstrands
    @nickstrands 2 ปีที่แล้ว +10

    Can't wait to see @angular/fire move to this version of firebase

  • @kllokoq
    @kllokoq 2 ปีที่แล้ว

    I agree! All I can say is that I always keep forgetting to pass auth to every function. Somehow I feel that by initializing the app at the top level should be enough, and also passing app to the getAuth function should inform the project!

  • @mulllhausen
    @mulllhausen 2 ปีที่แล้ว +1

    Exactly the video I wanted to see =)
    one question though - do all the modules have to be bundled? Why not just import the module you need in the front end just in time?

  • @dustsucker4704
    @dustsucker4704 2 ปีที่แล้ว +3

    Finally, I can use Firebase with svelte kit. (If it works as I expect it to do)

  • @DaveCollison
    @DaveCollison 2 ปีที่แล้ว

    Are you going to be doing a firebase V9 course of some sort? I'd like to see it in conjunction with vite, vue3, vuex and firebase auth, firestore, firebase storage, functions... too specific?

  • @dancarr111
    @dancarr111 2 ปีที่แล้ว

    Awesome videos, what font do you use for the text in the blocks?

  • @dgcp354
    @dgcp354 2 ปีที่แล้ว +21

    Where did you get this amazing short clips, they always amaze me

    • @RichardPerfectKiwi
      @RichardPerfectKiwi 2 ปีที่แล้ว +1

      What's pretty sad is that I remember the Six million dollar man one from when it came out on TV for the first time :-(

    • @trappedcat3615
      @trappedcat3615 2 ปีที่แล้ว

      @@RichardPerfectKiwi huh?

    • @dgcp354
      @dgcp354 2 ปีที่แล้ว

      @@RichardPerfectKiwi huh?

    • @tigergold5990
      @tigergold5990 2 ปีที่แล้ว

      @@RichardPerfectKiwi huh?

    • @RichardPerfectKiwi
      @RichardPerfectKiwi 2 ปีที่แล้ว

      @@trappedcat3615 Six million dollar man - it's one of the clips "we can rebuild him" it was a TV series in the 70's.

  • @TheLPfunnTV
    @TheLPfunnTV 2 ปีที่แล้ว

    He had us in the first half not gonna lie

  • @waseyhasankhan8167
    @waseyhasankhan8167 2 ปีที่แล้ว

    I laughed😄 out at the Gifs you use

  • @derinasir
    @derinasir 2 ปีที่แล้ว +7

    Please make more videos about WebAssembly🙏

  • @arnav_0397
    @arnav_0397 2 ปีที่แล้ว

    we want more tutorials on firebase new version 9.0.0, Its really helpful..

  • @EmadAlashi
    @EmadAlashi 2 ปีที่แล้ว +7

    Great video as always, but unfortunate choice of title, please be careful of falling into the click-bait path, you don’t need it.
    Love your videos, keep it up 👍🏼

  • @marcusgupta6148
    @marcusgupta6148 2 ปีที่แล้ว

    damn, I recently started moving to other databases and even used the Hasura backend.
    Are u watching us? :)
    BTW love your videos as always

  • @RayDaly
    @RayDaly 2 ปีที่แล้ว +3

    Hope you do s Firebase 9 with SvelteKit.That would be a great video!

  • @stephanedondyas6457
    @stephanedondyas6457 2 ปีที่แล้ว

    this good old music reminds me of when this channel was Angularfirebase :)

  • @zhenjunseow
    @zhenjunseow 2 ปีที่แล้ว +1

    Hoping to see support for web sdk v9 in AngularFire and FirebaseUI soon!

  • @mehroflomfg
    @mehroflomfg 2 ปีที่แล้ว

    Using Firebase with Webworkers did the trick for me :D

  • @adamfarmer7665
    @adamfarmer7665 2 ปีที่แล้ว

    Have you ever used reactfire? Can you make a video about it?

  • @cw3dv
    @cw3dv 2 ปีที่แล้ว

    Imo passing in an object is a good approach. Because we the developer could know what is being used.

  • @htmlfivedev
    @htmlfivedev ปีที่แล้ว

    Hi, I'm interested in your Firebase Security course ... just wondering if this uses Firebase 9?

  • @radulaski
    @radulaski 2 ปีที่แล้ว

    It would be interesting to know what Firebase modules would it make sense to import dynamicaly and how much benefit could br gained?

  • @kemoboy
    @kemoboy 2 ปีที่แล้ว

    Hello,
    I have a question that I don't seem to find the answer to it... does firebase charge for reads that are done in the firebase console?

  • @fer-ri
    @fer-ri 2 ปีที่แล้ว

    Thanks

  • @paul_wj_lee
    @paul_wj_lee 2 ปีที่แล้ว

    Any new changes with amplify? Or is it still quite young?

  • @DEADSTEP12
    @DEADSTEP12 2 ปีที่แล้ว +2

    Please do a tutorial with React and the NEW firebase cloud messaging. Super confusing with the service workers.

  • @flareflo362
    @flareflo362 2 ปีที่แล้ว +3

    I personally have fallen in love with the way rust imports things, where you following examples are valid;
    use library;
    use library::function;
    use library::{[function1, function2 };

  • @Gobillion160
    @Gobillion160 2 ปีที่แล้ว +1

    nice

  • @StephanBijzitter
    @StephanBijzitter 2 ปีที่แล้ว +23

    4:56 if your IDE supports regex find/replace, this really is only a few seconds of work

    • @elemeno0pee
      @elemeno0pee 2 ปีที่แล้ว +46

      and if your IDE doesn't support regex find/replace, stop using notepad to code

    • @kyedav
      @kyedav 2 ปีที่แล้ว +8

      And if you're feeling barbaric you could cat the file, run some regex and pipe through to a new file all without a text editor.
      Id rather do this than use notepad.

    • @srujangurram
      @srujangurram 2 ปีที่แล้ว +1

      I think there might me some script by now that does this somewhere on GitHub

    • @kyedav
      @kyedav 2 ปีที่แล้ว +1

      @@srujangurram None needed buddy. Its as simple as..
      sed 's/\bWORD\b/REPLACE/g file.txt
      For anyone who don't understand the line above:
      The -i makes sed write its output and edit files in place. Could also be used to make a backup file as in "sed -i.bak ..." to backup the original file before sed does its thing.
      The s is the substitute command.
      The \b ensures partial words are not replaced. Such as if you had PASSWORD in the txt file then it wouldn't change it to PASSREPLACE.
      The g at the end makes it global so all instances are replaced and not just the first one.
      Lastly, the file.txt is the file you're running the command on and saving to.
      You can also use regex within sed but in this case the above is all that's needed.

    • @nivaldolemos5280
      @nivaldolemos5280 2 ปีที่แล้ว +1

      Even my shitty shell can do it. If your IDE can't, it's not an IDE in the first place.

  • @attakorns
    @attakorns 2 ปีที่แล้ว

    Regarding the procedural vs object notation, can we do this to revert back to object notation and avoid refactoring code?
    1. Create a new signIn2(args) function that calls signIn(this, args).
    2. Bind the new signIn2 function to the auth object.
    3. Set auth.signIn to equal the binded signIn2 function.
    4. Call auth.signIn(args).

  • @baremetals
    @baremetals 2 ปีที่แล้ว

    Hi thanks for the video, I am getting this error " FirebaseError: Firebase: Error (auth/invalid-value-(email),-starting-an-object-on-a-scalar-field-invalid-value-(password),-starting-an-object-on-a-scalar-field). " but I cannot find the meaning from the codes. Can you please point me in the right direction? I am using the new auth SignInWithEmailAndPassword

  • @hiddenstack
    @hiddenstack 2 ปีที่แล้ว

    What do you think of serverless framework?

  • @theblackharted
    @theblackharted 2 ปีที่แล้ว +1

    Will you be updating sveltefire? 😊

  • @varunkhatri700
    @varunkhatri700 2 ปีที่แล้ว

    interesting changes to be honest

  • @tonimaunde
    @tonimaunde 2 ปีที่แล้ว

    Got stuck looking at this error: dependent-sdk-initialized-before-auth => Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK.
    Does anyone know how to solve it?

  • @sherwing9054
    @sherwing9054 2 ปีที่แล้ว

    Where's that test post I saw minutes ago?

  • @lvenir4702
    @lvenir4702 2 ปีที่แล้ว +2

    Is firebase functions EVER going to support ANY other language besides NodeJS??? It's SO frustrating

  • @tropicalverktaki
    @tropicalverktaki 2 ปีที่แล้ว +1

    That title is almost a click bait, but I clicked anyway hehe

  • @codingchannels4103
    @codingchannels4103 2 ปีที่แล้ว

    would you please make firebase 9 course with gatsby?

  • @Dev-Siri
    @Dev-Siri ปีที่แล้ว

    "I find myself creating my own custom abstraction, like a class"
    Thats basically the version 8 namespaced version

  • @sriramkmb1
    @sriramkmb1 2 ปีที่แล้ว

    Firebase UI doesn't yet support firebase sdk v9.

  • @sirmiles1820
    @sirmiles1820 2 ปีที่แล้ว

    Can you do swoole bro? Thanks

  • @sahbibarkallah3252
    @sahbibarkallah3252 2 ปีที่แล้ว +1

    Can u make a 100s loopbackJS

  • @ianhamilton2723
    @ianhamilton2723 2 ปีที่แล้ว

    Tree Shake baby!

  • @Gamewithstyle
    @Gamewithstyle 2 ปีที่แล้ว

    Just finished pushing my first independently published application to UAT for round 1 of feedback. It utilizes FB. Guess I gotta tell the testers that the app will be faster by prod time lol

  • @kimeiga
    @kimeiga 2 ปีที่แล้ว

    Can you update sveltefire to firebase 9?

  • @chillswift
    @chillswift 2 ปีที่แล้ว

    How about all react hooks in 100s?

  • @joseph.aowigo7553
    @joseph.aowigo7553 2 ปีที่แล้ว

    last week I runned my old project and everything was not working

  • @oyundimondesi4541
    @oyundimondesi4541 2 ปีที่แล้ว +2

    my bundle size has the high ground, not in a good way

  • @akshattamrakar9071
    @akshattamrakar9071 2 ปีที่แล้ว +2

    You said a lot of good things about snowpack, what made you switch to vite?

    • @Fireship
      @Fireship  2 ปีที่แล้ว +7

      They're both good. Vite just simpler for presenting basic TH-cam demos.

    • @brianevans4
      @brianevans4 2 ปีที่แล้ว

      Snowpack is pretty good in my experience

  • @zombiefacesupreme
    @zombiefacesupreme ปีที่แล้ว

    Why would you not include this information in your PAID Next.Js class that you advertise here?

  • @sarcasticdna
    @sarcasticdna 2 ปีที่แล้ว

    Supabase ahem!

  • @nijikatherock
    @nijikatherock 2 ปีที่แล้ว

    what's the font at 0:17?

  • @blendermaster8934
    @blendermaster8934 2 ปีที่แล้ว

    please do a firebase sdk 9 with vanilla javascript

  • @reold
    @reold 2 ปีที่แล้ว +1

    Good! For js devs

  • @katbert100
    @katbert100 2 ปีที่แล้ว

    firebase is so good

  • @fransimanuel7782
    @fransimanuel7782 2 ปีที่แล้ว

    i need proper docs for javascript admin SDK

  • @hrashikeshtiwari7220
    @hrashikeshtiwari7220 2 ปีที่แล้ว

    How is pyrebase?

  • @jackkirby5287
    @jackkirby5287 2 ปีที่แล้ว

    Every job posting wants Microservices. 100 seconds of Microservices?

  • @surlysmiles
    @surlysmiles 2 ปีที่แล้ว +3

    Just make your own module and expose what you need with curried functions

  • @bas_kar_na_yar
    @bas_kar_na_yar 2 ปีที่แล้ว

    Just reached midway on a project where we use firebase. I shat myself after reading the title.

  • @WrittenInFilm
    @WrittenInFilm 2 ปีที่แล้ว +8

    I will never trust putting my entire project in the hands of a single company, outages/bans leave you stranded, and google has a huge history of failed projects...

    • @softwarelivre2389
      @softwarelivre2389 2 ปีที่แล้ว +5

      You can create a compatibility layer in your code, which will abstract any provider-specific methods and then if you need to change providers, you'll only be changing the compatibility-layer methods. I think it is a pretty neat model to work with, if you ask me.

    • @WrittenInFilm
      @WrittenInFilm 2 ปีที่แล้ว +1

      @@softwarelivre2389 That sounds like it could get really messy, really fast, because it would be hard to create and maintain a standard that works well with many developers, many which will come and go as time goes on, as the project scales that efficiently remains agnostic to the provider, as the entire underlying architecture could be night and day difference. Not only that, but you would essentially have to maintain 2 different code bases under the compatibility layer for your data if you want to backup it up outside of google, because if you are relying on one company for your data, you are toast if anything happens with your account or their business.
      Lastly, attempting to write automated exporting from firebase to avoid maintaining 2 codebases, could make your bill exponentially bigger as your data grows.
      Seems like a way for google to make slaves of their codebases.

  • @domenicolordi206
    @domenicolordi206 2 ปีที่แล้ว +2

    I agree: the new syntax looks weird! It seems like object-orientation is loosing its appeal to frameworks/libraries developer in favour of procedural/functional style approach... I mean: auth.signOut() replaced by signOut(auth) looks similar to str.length() replaced by strlen(str) :-)

    • @Dev-Siri
      @Dev-Siri ปีที่แล้ว

      Yea, object-oriented or even just namespaced libraries often just use more space as they need to export the entire class to get the actual functionality

  • @blazi_0
    @blazi_0 2 ปีที่แล้ว

    what about cdn

  • @tranquillityEnthusiast
    @tranquillityEnthusiast 2 ปีที่แล้ว

    I need that..

  • @harry_allen
    @harry_allen 2 ปีที่แล้ว +1

    CSS Paint API in 100 seconds?

  • @29namankumar29
    @29namankumar29 2 ปีที่แล้ว +1

    Second! Yayyy!

  • @samisbgh6253
    @samisbgh6253 2 ปีที่แล้ว +1

    Top GCP Services Explain (like aws services vedio).. 😪

  • @TheHasanJr
    @TheHasanJr 2 ปีที่แล้ว

    Didn't they see size of aws-amplify sdk?

  • @xenon4602
    @xenon4602 2 ปีที่แล้ว

    AngularFire will be updated as well?

  • @JakubSK
    @JakubSK 2 ปีที่แล้ว

    Wait what? Another prediction of mine coming true? So surprised 😂 Yet no one wants to listen to me.

  • @tyc00n
    @tyc00n 2 ปีที่แล้ว +1

    covid caused google to pivot from innovation to optimization to allow developers to scale their projects to hundreds of millions of people with minimal cost. This is a result and it is good if that is what you are optimizing for (as worthwhile projects often are)

  • @bala-st9cj
    @bala-st9cj 2 ปีที่แล้ว +1

    I am using firebase-admin

  • @Ondal1
    @Ondal1 2 ปีที่แล้ว

    Where in the world is a download of half a megabyte a problem these days?

  • @lucavenir5308
    @lucavenir5308 2 ปีที่แล้ว

    Thumbs up if you want this SDK in Dart and Dart support for Firebase Functions!!!

  • @fikrad0
    @fikrad0 2 ปีที่แล้ว

    Tiriton 100 second the Open AI project to replace nivdea gbu

  • @sortsvane
    @sortsvane 2 ปีที่แล้ว

    Are there any good open-source firebase alternatives ? (Except parse server)

    • @peanut1120
      @peanut1120 2 ปีที่แล้ว +1

      There is supabase, fireship made a video on it aswell: th-cam.com/video/WiwfiVdfRIc/w-d-xo.html&ab_channel=Fireship

    • @Christopher-ew7jw
      @Christopher-ew7jw 2 ปีที่แล้ว

      @UCAYW4xLen0ZikyDJunqkFjA I can't wait for serverless functions.

    • @domenicolordi206
      @domenicolordi206 2 ปีที่แล้ว

      supabase is not a 100% alternative to firebase but has many interesting features

  • @ParthaSarathylink
    @ParthaSarathylink 2 ปีที่แล้ว

    I don't even use firebase But Interesting

  • @kibsikibsi9761
    @kibsikibsi9761 2 ปีที่แล้ว

    100 Seconds of CockroachDB please

  • @kiikoh
    @kiikoh 2 ปีที่แล้ว

    Redwood in 100 seconds

  • @Maric18
    @Maric18 2 ปีที่แล้ว

    the old way to new way transformation should be easily handleable by regex

  • @iuliandumitrache7307
    @iuliandumitrache7307 2 ปีที่แล้ว +1

    Coming from Python, the syntax changes are irrelevant to me