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

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

Deanin

Deanin

Күн бұрын

Пікірлер: 18
@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 ...
@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… ☺️
@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.
@UserYY-m7v
@UserYY-m7v 7 күн бұрын
Hello. What is an increment method? Where does it come from?
@mertgunduz5571
@mertgunduz5571 2 жыл бұрын
Great outro speech Dean 👍
@wakemewhenitsover2010
@wakemewhenitsover2010 27 күн бұрын
Thumbs up for this snarky commentary 😂
@ledockol
@ledockol 2 жыл бұрын
Thanks! 👍 Rails 7 Search Facets Filters?
@iamshairyar
@iamshairyar 2 жыл бұрын
Quick refreshment course
@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
@MrThomas8307
@MrThomas8307 2 жыл бұрын
Hi Deanin. Thanks for your useful video. Now maybe you show us how to use "dry-monads" .
@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
Running Multiple Databases In Ruby On Rails 7
12:28
Deanin
Рет қаралды 5 М.
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 15 МЛН
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН
Rails Concerns vs. Modules and when to use each
13:18
webcrunch
Рет қаралды 2,3 М.
Missing Guide to Service Objects in Rails - Riaz Virani
30:56
Ruby Central
Рет қаралды 8 М.
Intro To View Components In Ruby On Rails 7
35:27
Deanin
Рет қаралды 9 М.
Modular Code Organization
12:50
GoRails
Рет қаралды 4,1 М.
Taking A Look At Scopes In Ruby On Rails 7
11:16
Deanin
Рет қаралды 2,4 М.
Pundit Gem For Authorization In Ruby On Rails 7
21:27
Deanin
Рет қаралды 8 М.
The Ruby On Rails Junior Developer Problem
16:03
Deanin
Рет қаралды 21 М.
Jason Charnes - Don't Call It a Comeback - Rails World 2023
26:01
Ruby on Rails
Рет қаралды 7 М.
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 15 МЛН