Designing functional and fluent API: example of the Visitor Pattern by José Paumard

  Рет қаралды 13,617

Devoxx

Devoxx

Күн бұрын

Пікірлер: 15
@666KING6666
@666KING6666 Жыл бұрын
Absolutely bonkers! Love it and hate it at the same time. Thankfully, starting with Java21 and type-pattern matching visitors can be replaced with switch expressions. Additionally, if sealed classes/interfaces are used, it can offer a compile-time guarantee that all subtypes in the hierarchy have been properly taken care of. Unlike here, where visiting logic is placed in the registry and only breaks at run-time. And with NPE, of all things! Nonetheless, video offers a lot of neat tricks for functional and fluent APIs. I'll surely use them either for builders or custom assertion classes for AssertJ.
@ruixue6955
@ruixue6955 3 жыл бұрын
1:30 why Visitor Pattern 3:28 code demo 3:37 the Visitor Pattern has to visit some *graph* object
@andreidei
@andreidei Жыл бұрын
this talk should be entitled "insane people code like this"...
@justADeni
@justADeni 9 ай бұрын
it got pretty good in the middle and then devolved again in the end
@badpotato
@badpotato 2 жыл бұрын
this is Nice video. it is a different way of solving a problem
@kitkarson4226
@kitkarson4226 3 жыл бұрын
Great presentation.
@leonidpiliptsevich5329
@leonidpiliptsevich5329 3 жыл бұрын
Awesome, thank you!
@TJ-hs1qm
@TJ-hs1qm 11 ай бұрын
9:06 vp violates the GOF rule to never depend on concrete types, only on abstractions. How do you inject MockBody for Body in a test if the code depends on concrete types?
@mihaiapostol7864
@mihaiapostol7864 6 ай бұрын
use mockito
@hemanhy
@hemanhy 2 жыл бұрын
Very insightful Thank you!
@nithinvarghese4737
@nithinvarghese4737 Жыл бұрын
Great Video Learned a lot and a lot of tricks are now in my sleeve !! . Thank you soo much 34:52 In the Interface X, How can one call define method type() as an instance value out of it , Can anyone share info or notes on the same?
@kitkarson4226
@kitkarson4226 Жыл бұрын
check at 33:44 - type() is a method in the interface X
@yadigarcaliskan6453
@yadigarcaliskan6453 3 жыл бұрын
Great thank you!
@an2ber
@an2ber Жыл бұрын
i hope nobody writes this kind of code in production
@kitkarson4226
@kitkarson4226 Жыл бұрын
It is about learning various tricks. You do not have to write like this. sometimes, to teach, we have to use things like this.
Revisiting Design Patterns after 20 by Edson Yanaga
48:24
If people acted like cats 🙀😹 LeoNata family #shorts
00:22
LeoNata Family
Рет қаралды 46 МЛН
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 27 МЛН
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 29 МЛН
Beyond ByteBuffers by Brian Goetz
50:40
Devoxx
Рет қаралды 19 М.
Fluent Builder in Java: Building Objects with Elegance
18:07
campbelltech
Рет қаралды 1 М.
Functional programming design patterns by Scott Wlaschin
1:05:44
Ivan Plyusnin
Рет қаралды 194 М.
Understanding The Visitor Design Pattern
32:08
Ryan Schachte
Рет қаралды 58 М.
If people acted like cats 🙀😹 LeoNata family #shorts
00:22
LeoNata Family
Рет қаралды 46 МЛН