Ask A Question

Notifications

You’re not receiving notifications from this thread.

Dependency Inversion Principle Discussion

Thank you for these quality episodes. We definitely want to see more episodes like this. It would be nice to see them how they are applied to real-world projects. How to create the folder structure and apply all these principles there.
Reply

+1

Reply

like Andrew for me !

Reply

+1

Reply

+1

Reply

+1

Reply
I want to see more of this kind of stuff. I've now let you know in the comments below the video. :-)
Reply
+1
Reply
This is a great episode.  Everyone should learn SOLID
Reply

Thanks for the eposide.
I don't understand why there is a need to say Server.new(provider: :digitalocean) (last line in code)
Shouldn't the provider be encoded only by the object passed to the perform method ?

Reply

So in here I see you're passing the Server::Create object an argument with the provider, which is something it already has (since it's in the server, and the Server::Create object knows the server).

This creates the possibility that someone might eventually try to call #perform(:linode) on an instance that has a :digital_ocean as the server.

Do you think we should depend on documentation and testing in these cases?
If I have a passing test verifying this case is correctly handled, I think it'd be OK.

Reply

Thanks a lot, very enlightful.

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 87,563+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.