Build a RESTAPI in Swift #7 Building blueprints with Protocols

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

  • @djryanashton
    @djryanashton Před 8 měsíci +1

    There's an editing glitch between 7:39 and 8:21. Thought you might like to know. :)

  • @aloussase
    @aloussase Před 3 měsíci +1

    Why you make the protocol functions static brother, that way you wont be able to inject dependencies in the implementation

    • @Exodai-Academy
      @Exodai-Academy  Před 3 měsíci +1

      static functions can be called directly by calling the Service. So UserService.create() for example. Not using static forces you to first initialize it by doing:
      var userService = UserService()
      userService.create()
      using static is less work and when you use static, you know that you are not accessing any instance properties. That is why :)