The Bare Minimum Intro To Service Object & POROs | Ruby On Rails Tutorial

  Рет қаралды 5,106

Deanin

Deanin

Күн бұрын

Пікірлер: 16
@Deanin
@Deanin 2 жыл бұрын
If you want more than the bare minimum, consider reading this now that you know how to make a service object: www.toptal.com/ruby-on-rails/rails-service-objects-tutorial
@Deanout
@Deanout 2 жыл бұрын
But Dean, what about what I wanted you to talk about? The cool way to not need to use the new command, or why service objects should only have one public method because I said so? Or or or-
@Deanin
@Deanin 2 жыл бұрын
Read the link.
@developerfoe
@developerfoe 2 жыл бұрын
coming for next video ...
@aarona3144
@aarona3144 2 жыл бұрын
The amount of shade you're throwing at everyone in this video is hilarious (including that streaming site) 😆. You're right though, a lot of this stuff shouldn't be taken too seriously but I think its a good idea to see what tends to be about one or two best practices like how you're doing here.
@johanandre5338
@johanandre5338 2 жыл бұрын
I use service objects when the logic does not clearly belong in a specific place (usually a model). Like doing a operation which requires two or more different instances. That logic can sometimes be misplaced in a model. But as you say, it’s only plain ruby classes… ☺️
@mertgunduz5571
@mertgunduz5571 2 жыл бұрын
Great outro speech Dean 👍
@MrThomas8307
@MrThomas8307 2 жыл бұрын
Hi Deanin. Thanks for your useful video. Now maybe you show us how to use "dry-monads" .
@iamshairyar
@iamshairyar 2 жыл бұрын
Quick refreshment course
@ledockol
@ledockol 2 жыл бұрын
Thanks! 👍 Rails 7 Search Facets Filters?
@ellerium
@ellerium 2 жыл бұрын
Hey, I'm new to your channel, and I need to say I really liked your videos. I've been working with Rails for some time. And really appreciated your way of talking about this concept of service objects. Especially for keeping away all the passionate discussions. I have an honest curiosity I'd like to ask: Did already thought about those service objects as a model? As in the Model-View-Controller design. I'm asking because I understand an ActiveRecord object as a model of a Business Entity. While the service is a model of a Business Process. Does it make sense? Thanks for you videos!
@OjasMutreja
@OjasMutreja 2 жыл бұрын
Hey there, I am unable to the right extensions of VS Code for Ruby on Rails7, could you please guide me
@azizdevfull
@azizdevfull 2 жыл бұрын
very very useful for me bro : )
@merlin2049er
@merlin2049er 2 жыл бұрын
Put it in the tmp folder
@freibuis
@freibuis 2 жыл бұрын
not a fan of service objects my self but I would use ThingService.call(object) instead of ThingService.new(object).call the reason why I think the use of call instead of using the method name same as the class name example ThingService.new(object).do_thing is that the class name tells you what its doing. you dont need to tell me twice. nothing wrong with it but my ocd kicks in. I prefer to use model concerns to clean up models.. but some times you might want to pass options and this will break when using model concerns. this is when I would use a service object. lets say 1 model has a counter column called countera and another counterb .. you could do something like IncrementService.call(object, :countera) .. then logic to increment that coloum... This would remove duplicating logic accross models. I personally dont use them. but if a project that I join is using them. I would continue the convention.
@vinogradova82
@vinogradova82 2 жыл бұрын
Cool!) If use this like below, then no need to call a new method in controller. Only use inheritance in all yours services. Right?) # app/services/application_service.rb class ApplicationService def self.call(*args, &block) new(*args, &block).call end end
Nested Attributes & Validation In Ruby On Rails 7
9:03
Deanin
Рет қаралды 6 М.
Missing Guide to Service Objects in Rails - Riaz Virani
30:56
Ruby Central
Рет қаралды 8 М.
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 42 МЛН
Shopping Cart Order Sessions In Rails 7 With Turbo
26:21
Rails для продвинутых: организация кода (Иван Немытченко)
1:10:06
Turbo Charge Your Rails 8 App: Infinite Scroll Tutorial
9:30
Rails Quest by Kaleb Lape
Рет қаралды 411
Should you use Ruby on Rails in 2024?
14:43
webcrunch
Рет қаралды 59 М.
Intro To View Components In Ruby On Rails 7
35:27
Deanin
Рет қаралды 8 М.
Ruby on Rails in 100 Seconds
3:33
Fireship
Рет қаралды 493 М.
Speech Recognition in Ruby on Rails 7
14:58
Deanin
Рет қаралды 1,9 М.
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.