No video

Are VALUE OBJECTS secretly overpowered?!

  Рет қаралды 3,475

Przemysław Przyłucki

Przemysław Przyłucki

Жыл бұрын

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...

Пікірлер: 38
@alnahian2003
@alnahian2003 Жыл бұрын
This is currently my daily favorite channel 🍀 Sooo much indepth about those stuffs
@saaslaravel
@saaslaravel Жыл бұрын
Glad you enjoy it!
@mohamedalqady1220
@mohamedalqady1220 Жыл бұрын
Me to 🎉
@free2idol1
@free2idol1 Жыл бұрын
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 Жыл бұрын
Thanks so much! Tutorial on my version DDD is on the immediate roadmap (and a secret project connected to it 😊)
@SemyonF89
@SemyonF89 7 ай бұрын
Yep! we need it!
@kenube
@kenube Жыл бұрын
Great videos. Can you explain the difference between DTO & Value Object? Always confuse with this two terms.
@saaslaravel
@saaslaravel Жыл бұрын
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 😖
@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 Жыл бұрын
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 Жыл бұрын
@@igorleal1798 there is a video by Brent where he explains why PHP can't have generics
@TheGajos
@TheGajos 5 ай бұрын
@@mediliesActually we can have generics in PHP, just like Python does (comments)
@medilies
@medilies 4 ай бұрын
@@TheGajos php annotations have no effect on runtime. they only improve IDE experience and work with static analyzers
@alexz75515
@alexz75515 Жыл бұрын
I have learned so much from your videos, thank you! This type of videos are just awesome!
@saaslaravel
@saaslaravel Жыл бұрын
Thank you ❤️
@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?
@catalinul1461
@catalinul1461 Жыл бұрын
Hey mate! One question if I may, how would you handle transliteration when it comes to slugs in Laravel?
@saaslaravel
@saaslaravel Жыл бұрын
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
@bangladesherp5210
@bangladesherp5210 Жыл бұрын
Great explanation!
@maguiskader7771
@maguiskader7771 Жыл бұрын
Awesome 👌 can i have please the name of theme and the font😅 im addicted!
@saaslaravel
@saaslaravel Жыл бұрын
Thanks! It's called Fira Code
@maguiskader7771
@maguiskader7771 Жыл бұрын
@@saaslaravel 🥳 thanks and theme?
@SussanRai
@SussanRai Жыл бұрын
I think spatie laravel data package is better for this type of data transformation
@saaslaravel
@saaslaravel Жыл бұрын
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
@michaelrubel8776
@michaelrubel8776 Жыл бұрын
These look almost the same as the ones implemented in my package `laravel-value-objects` :)
@saaslaravel
@saaslaravel Жыл бұрын
Hi there! I was not familiar with your package but it looks pretty cool - I didn't copy the implementation from there though if that's what you are inferring :)
@michaelrubel8776
@michaelrubel8776 Жыл бұрын
@@saaslaravel No, I'm just surprised at how close our thoughts are to each other on this topic. Even methods like "from". :))
@saaslaravel
@saaslaravel Жыл бұрын
That's a common approach used in Laravel so that's probably why. I use that all of the time for DTOs as well
@niceteg
@niceteg 3 ай бұрын
We miss you
@saaslaravel
@saaslaravel 3 ай бұрын
I may or may not be getting back soon 👀
@niceteg
@niceteg 3 ай бұрын
@@saaslaravel all your your videos are inspiring! Just buil some CRM example with DB structure and it will be the,🚀
@onlynudes1398
@onlynudes1398 Жыл бұрын
Please I need a DDD tutorials
@saaslaravel
@saaslaravel Жыл бұрын
It's def on the roadmap!
Laravel + Service Pattern + DTOs = ❤️❤️❤️
17:52
Przemysław Przyłucki
Рет қаралды 46 М.
Pool Bed Prank By My Grandpa 😂 #funny
00:47
SKITS
Рет қаралды 18 МЛН
لقد سرقت حلوى القطن بشكل خفي لأصنع مصاصة🤫😎
00:33
Cool Tool SHORTS Arabic
Рет қаралды 30 МЛН
Bony Just Wants To Take A Shower #animation
00:10
GREEN MAX
Рет қаралды 5 МЛН
Laravel app can't possibly be THIS good... [Free course: Great Laravel Apps #2]
34:44
Refactoring to action pipelines in Laravel
1:25:03
Michael Dyrynda
Рет қаралды 9 М.
Generics: The most intimidating TypeScript feature
18:19
Matt Pocock
Рет қаралды 171 М.
Laravel: The BEST way to handle exceptions
9:29
Przemysław Przyłucki
Рет қаралды 15 М.
Testing has never been THIS EASY [Free course: Great Laravel Apps #3]
22:47
Przemysław Przyłucki
Рет қаралды 2,5 М.
How to Use Value Objects to Solve Primitive Obsession
13:54
Milan Jovanović
Рет қаралды 43 М.
Laravel's macros make your life EASY PEASY
6:06
Przemysław Przyłucki
Рет қаралды 3,3 М.
Pool Bed Prank By My Grandpa 😂 #funny
00:47
SKITS
Рет қаралды 18 МЛН