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

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ม.ค. 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 หลายเดือนก่อน +12

      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?

  • @cyrusgracias4556
    @cyrusgracias4556 21 วันที่ผ่านมา

    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

  • @Kayotesden
    @Kayotesden หลายเดือนก่อน

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

  • @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

  • @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

  • @alastairtheduke
    @alastairtheduke 27 วันที่ผ่านมา

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

  • @saidyeter
    @saidyeter หลายเดือนก่อน +1

    I used dexie too. pretty useful

  • @JTWebMan
    @JTWebMan หลายเดือนก่อน

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

    • @syntaxfm
      @syntaxfm  หลายเดือนก่อน

      Hopefully soon will be in Alpha, maybe this month.

  • @PrintNerdyForMe
    @PrintNerdyForMe หลายเดือนก่อน +1

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

  • @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

  • @armandodlvr
    @armandodlvr หลายเดือนก่อน +3

    I think the correct name is IndexedDB

  • @ransomecode
    @ransomecode หลายเดือนก่อน +1

    I store data in svg 🤣

  • @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! ...

  • @hugodsa89
    @hugodsa89 หลายเดือนก่อน

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

  • @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

  • @cswithalam
    @cswithalam หลายเดือนก่อน

    First one here

  • @meyou118
    @meyou118 หลายเดือนก่อน

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

  • @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?