Local Data: Sqlite, LocalStorage, Session, Cookies and IndexDB

Поділитися
Вставка
  • Опубліковано 17 січ 2025

КОМЕНТАРІ • 33

  • @nunya44288
    @nunya44288 Місяць тому +16

    The clearest way I’ve had authentication vs authorization explained to me was that authentication is “You are who you say you are” and authorization is “do you have the permissions to view this data”.

    • @wolfphantom
      @wolfphantom Місяць тому +4

      "Authentication: Here's is my driver's license, you can confirm this is me." "Authorization: I see that is your ID, but you aren't authorized to enter the Pentagon."

  • @mnismi
    @mnismi Місяць тому +3

    Another usecase for Session storage would be
    The search filters in an ecommerce website
    You go into a product and come back or refresh the page accidentally (on mobile pulling down), the search filters stay the same.

    • @gerkim62
      @gerkim62 Місяць тому +11

      That's something search params will do better

  • @jwr6796
    @jwr6796 Місяць тому +1

    It's been really interesting seeing all the local first stuff come to prominence in the last year or so. I have been working on an app for my employer that is essentially local first, though I didn't know to call it that in the beginning. Essentially, every client device needs to have a record of data so that it can function offline, and then when it reconnects it needs to be able to synchronize that data with the cloud and with all the other devices. It's kind of been a syncing nightmare, but it's been a ton of fun, and I've begun to implement some of the steps that I've heard on the podcast to make it a bit sturdier than just passing around JSON blobs

    • @StingSting844
      @StingSting844 Місяць тому

      Yes syncing is definitely a nightmare so much so that entire businesses are built around it

    • @wchorski
      @wchorski Місяць тому

      have you tried PouchDB with CouchDB for local server data sync?

  • @Kayotesden
    @Kayotesden Місяць тому

    I was hoping for a bit more indepth into each of the solutions coming up. ElectricSQL & Zero look awesome!

  • @cyrusgracias4556
    @cyrusgracias4556 18 днів тому

    One edge case we had to face was
    Localstorage, sessionstorge arent available on Android while website is run by Android Google Sign In flow
    We had to revert everything to cookies usage

  • @denisgithinji1119
    @denisgithinji1119 Місяць тому

    Another use case for storing local-first is for end-to-end encryption of data.
    Data in the server is always stored encrypted while locally the data can be stored unencrypted/encrypted then decrypted during sessions.
    This way one could still do text-based searches with encrypted data which is really hard to do server-side.

    • @Kaalkian
      @Kaalkian Місяць тому

      ya def should of talked about encryption. local first app and client encryption is crucial

  • @armandodlvr
    @armandodlvr Місяць тому +3

    I think the correct name is IndexedDB

  • @PrintNerdyForMe
    @PrintNerdyForMe Місяць тому +1

    Authentication is who you are. Authorization is what you can see/do.

  • @saidyeter
    @saidyeter Місяць тому +1

    I used dexie too. pretty useful

  • @brunocrosier
    @brunocrosier Місяць тому

    heads up, the part about session storage is not actually correct.
    if you save something to session storage in one tab, and then open another tab with the same domain, the data will be available in both tabs.
    the data is only deleted by the browser when all tabs on that domain are closed

  • @JTWebMan
    @JTWebMan Місяць тому

    When will Zero let everyone try? They still show a signup.

    • @syntaxfm
      @syntaxfm  Місяць тому

      Hopefully soon will be in Alpha, maybe this month.

  • @ransomecode
    @ransomecode Місяць тому +1

    I store data in svg 🤣

  • @alastairtheduke
    @alastairtheduke 25 днів тому

    Migrations, at first glance, look pretty difficult with these services. I'm curious how tanstack query persist plugins work , anyone try?

  • @hugodsa89
    @hugodsa89 Місяць тому

    You are authenticated as your user, and your user is authorised to perform or access something.
    authentication = identity verification
    authorisation = permission verification

  • @codedusting
    @codedusting Місяць тому

    Local storage for jwt token is insecure, isn't it?

    • @jakobsaadbye5309
      @jakobsaadbye5309 Місяць тому +1

      Only if your site is vulnerable to Cross Site scripting (XSS) which is typically not possible if you’re using a framework like React unless you explictly are injecting html through ‘dangerouslySetInnerHTML’

    • @codedusting
      @codedusting Місяць тому

      @jakobsaadbye5309 I see

  • @ManontheBroadcast
    @ManontheBroadcast Місяць тому

    @11.54 Which one is the episode on the file storage? ...

    • @syntaxfm
      @syntaxfm  Місяць тому +1

      Ooh good catch! I think Wes is talking about syntax.fm/783

    • @ManontheBroadcast
      @ManontheBroadcast Місяць тому

      @syntaxfm Thanks a lot! ...

  • @brendanleighton
    @brendanleighton Місяць тому

    Authentication vs Authorization:
    Are you authorized to be here? (do you have the proper clearance to access this stuff.)
    The root word of authentication is authentic. Are you authentic? (who you say you are?)

  • @gerkim62
    @gerkim62 Місяць тому

    I bet you are not from TikTok

  • @meyou118
    @meyou118 Місяць тому

    should of talked about how Apple's ITP effets all of this.

  • @cswithalam
    @cswithalam Місяць тому

    First one here

  • @TheSysmat
    @TheSysmat Місяць тому

    AAA basic concept

  • @brokeloser
    @brokeloser Місяць тому

    Scott’s shortest Weeeelcome to syntax. On. This. Monday. Hasty. Treat.
    Will 2025 bring a regular sized Welcome?