Build a RESTAPI in Swift #4 More Models and FieldKeys in Vapor

Sdílet
Vložit
  • čas přidán 27. 08. 2024
  • In this new video series we will be building a new RESTAPI for my new learning platform called Devscorch Academy. Devscorch Academy is a new platform which I will be launching later In 2023 and it is going to be an amazing project.
    I decided to build this completely into the open, so this means I'm recording the complete development of the RESTAPI, The website and the mobile applications.
    In this series we are building a RESTAPI using the Vapor Framework, a Swift framework which allows us to build Swift applications for the web.
    So I hope you are as excited as I am and if you are ready and want to learn how to code RESTAPI's in Swift, just watch the whole series and see what happens ;)
    For more articles and free content check out my website:
    devscorch.com
    Please follow me on Instagram, Facebook and Twitter
    / devscorch
    / devscorch
    / devscorch

Komentáře • 6

  • @0xifarouk
    @0xifarouk Před rokem +1

    I am not sure how saving the Model and UUID which leads to performing another query is a bad practice? relational databases is made for this thing! what If you changed the name of the author? you will need to search the whole database for that old name and replace it with the new name?

    • @Exodai-Academy
      @Exodai-Academy  Před rokem +2

      Performance wise you ideally want to make as less queries as possible. Especially because most relational databases are heavy on the hardware it runs on. Especially PostgreSQL which we are using is not a light database. Maybe bad practice was not the right name for this I agree.
      Are you enjoying the series?

  • @LoganBLR
    @LoganBLR Před rokem

    In model some of your fields have array propertie below. I can't understand how it will be stored in the database.

    • @Exodai-Academy
      @Exodai-Academy  Před rokem

      In a later video you will see how this works. After the models we will write the migration where it will be clear how this works. . And you can store arrays in PostgreSQL using the .array(.property)

    • @Exodai-Academy
      @Exodai-Academy  Před rokem

      Btw. Just a little information. A lot of stuff we do in this series can be changed at the end of the series. I recorded and developed the API in a "real world" kind of idea so stuff can always change when you find a better solution.

    • @LoganBLR
      @LoganBLR Před rokem

      @@Exodai-Academy Ok, thank you.