Комментарии:
Thank you, Sebastian!
Very inspiring and valuable tutorial.
Would like to suggest you making something with EventBus / Reactive Messaging with Quarkus with SSE (Server-Sent Events) usage. In my opinion, really interesting topic, but there are not enough guides with this stuff. Thanks again!
I prefer Active Record way, But this is a static way. In the TDD you must use a "panache mock". But this way I think is more clear. repository way is another "a long time ago" layer.
ОтветитьIt seems to me like using Active record pattern breaks Single Responsibilty Pattern because we're having both database responsibility and entity responsibility in a single Entity class. Or am I missing something here?
ОтветитьHi Sebastian,
Thanks for the video. Could you please share which applications do you use to record and edit the video?
Thanks for the video. I use the active record pattern because to me it make much more sense then the repository pattern and there is also 1 more benefit to the active record that you didnt mention: If you need to use multiple entities in one place you won't need to inject each and every one of them, just use the object as is which less code that is more orginzed.
ОтветитьOne thing that always bothered me is that for example "var coffee = Coffee.findById(id);" would not really work - you'd have to use "var coffee = Coffee.<Coffee>findById(id);" to get the correct type for your coffee variable.
ОтветитьI always use the Active Record pattern because using the Repository pattern will mean for me 2xn classes if I have n entities and I always go for as less classes as I can.
ОтветитьAwesome video!!! Is there a way to use records instead of classes in the panache active approach?
ОтветитьI use Active Record pattern. If I'm not mistaken this approach is preferable by the Quarkus team over the repository pattern but your argument makes me want to migrate over to the repository.
Ответить