Are VALUE OBJECTS secretly overpowered?!

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ก.ย. 2024
  • Morning gals and guys.
    In today's episode we'll talk about value objects and how they can be used.
    Twitter:
    / przylucki_p
    More me:
    saaslaravel.com
    Website:
    przemyslawprzy...

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

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

    This is currently my daily favorite channel 🍀 Sooo much indepth about those stuffs

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

    Awesome! I have used VO for a while but you've made it to the next level...
    I hope you can release a tutorial of making mini app using DDD architecture.

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

      Thanks so much! Tutorial on my version DDD is on the immediate roadmap (and a secret project connected to it 😊)

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

      Yep! we need it!

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

    It would be great to have generics in PHP so you could just pass a to your interface and use the Phone instead of a generic ValueObjectInterface for your isEqual definition

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

      That's what I tried to do with phpdoc off camera but couldn't get it to work unfortunately :c

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

      @@saaslaravel So sad... Hopefully, PHP will get native generics one day :D

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

      @@igorleal1798 there is a video by Brent where he explains why PHP can't have generics

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

      @@mediliesActually we can have generics in PHP, just like Python does (comments)

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

      @@TheGajos php annotations have no effect on runtime. they only improve IDE experience and work with static analyzers

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

    I was puzzled by the interface. I thought you were going to extend a base value object class and put these common methods there?

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

    Great videos. Can you explain the difference between DTO & Value Object? Always confuse with this two terms.

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

      Thank you! In simple terms: Value object is a wrapper on a primitive inside of your system - phone, email, point, coupon etc, whereas DTO is an object with all of the data required for execution of a certain logic. DTOs often times include VO

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

      @@saaslaravel Thanks for the clarification! I probably already use DTO without knowing 😖

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

    I have learned so much from your videos, thank you! This type of videos are just awesome!

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

    Great explanation!

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

    Hey mate! One question if I may, how would you handle transliteration when it comes to slugs in Laravel?

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

      Hey! If you mean replacing characters like "ó" into "o" I think Str::slug handles that out of the box. If you mean localization - you could generate a slug that has a numeric ID and localized slug that's not taken into consideration in route binding i.e. "/blog/1-article"

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

      @@saaslaravel Yes, the first option, thank you very much! :D

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

    Awesome 👌 can i have please the name of theme and the font😅 im addicted!

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

      Thanks! It's called Fira Code

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

      @@saaslaravel 🥳 thanks and theme?

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

    We miss you

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

      I may or may not be getting back soon 👀

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

      @@saaslaravel all your your videos are inspiring! Just buil some CRM example with DB structure and it will be the,🚀

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

    I think spatie laravel data package is better for this type of data transformation

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

      It may be, but it's important to be able to understand what's happening under the hood or just being able to implement it from scratch! 😁

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

      @@saaslaravel I agree on this

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

    Please I need a DDD tutorials

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

      It's def on the roadmap!