Front Page › Forums › MOOM › Q & A Thread #6 – what are your questions for Justin Weiss and Avdi?
-
Q & A Thread #6 – what are your questions for Justin Weiss and Avdi?
Posted by robin@shiprise.net on 2018-02-23 at 07:12In the next Q&A Avdi will be joined by Justin Weiss.
Justin Weiss is a developer turned dev manager at Avvo and the author of several Ruby gems like robut and resque_unit. Follow Justin on Twitter @justinweiss, and online at https://www.justinweiss.com/.
The URL for this session will be: https://www.youtube.com/watch?v=yx9aDtQkJ1A
The Q&A will go live at that URL on Thursday, March 1st at 12:00 noon EST. Mark your calendar!
Cheers – Robin (Avdi’s helper)
replied 8 years, 6 months ago 0 Member · 8 Replies -
8 Replies
-
We’ve been talking in the course about the kind of messages that you send between objects, and specifically looking at how it can be better so send a message that notifies the other object of an event that occurred like
PurchaseLlamas#payment_approvedrather than tell it what to do likePurchaseLlamas#complete_transactionto allow for the fact that the underlying implementation may change.Currently, for example, I’m working on an access control system where you can grant and revoke permissions for a given user and permission. It’s hard for me to think past just a command like
AccessControl#grant_permissionorAccessControl#revoke_permissionand frame as an event. Maybe it could be more likeAccessControl#permission_grantedand#permission_revoked.I would love to hear your insights around how you determine what messages objects in your system should send each other. Thanks!
-
Hello Avdi and Justin,
What level of decoupling of business logic from rails do you recommend? At what point do you hit diminishing returns and makes implementing new features very painful.
For example I tried to use Uncle Bob’s methodology of decoupling the business logic from rails and to invert the dependency relation between them. Basically my business logic had no knowledge of rails or anything rails related. It was quite awesome but writing the tests was super painful. Plus building new features was taking a whole lot more time.
Eventually we ditched the 100% separation from rails, and kept most of the stuff. It was a great learning experience, but I am still wondering if there is a better way to achieve 100% separation of the business logic from rails stuff. An easy way.
What I am most interested in is your thoughts about extracting the business logic of an application and separating it from the framework. What is a good way to get started so as to be as productive as possible, while building for the future so as to depend even less on the framework as time goes by. What are the major steps you see to achieving this?
-
When using composition and lots of indirection to model your domain, it can become quite hard to keep track of how all the pieces fit together. What are some tricks and tips to make it more obvious how everything works together so it becomes easy for other developers to pick up and extend existing functionality.
Also, how to best spread the team knowledge about the code base so existing small pieces of functionality get reused instead of writing them again from the ground up. Basically how can I help the other team members see and realize the opportunities to compose their code mostly using pre-existing code widgets when they are available, and writing from scratch only what doesn’t exist.
-
Just a reminder to everyone: @justinweiss is the creator of the Whole Value Objects in Rails lesson, that we had a lot of conversation about. If anyone still has questions about that topic, today would be a great day to ask them
-
Can Whole Value Objects be considered DDD Value Object? Are they the same thing?
-
Oh wow yes! Whole value objects one question I’ve had recently on that was around how generic/ specific it’s beneficial to make them. For example, in our application right now we have many user supplied titles that we always want to make sure have the whitespace striped from them before they are saved. In a case like that, would a more generic WhitespaceEscaped type whole value object or would it be wiser to have specific objects like LessonTitle for each of the cases that specify their own specific behavior which currently means escaping white space? Or is it even a good idea to handle escaping white space in a whole value object?
-
How much do you use Ruby and/or Rails on new projects versus other languages/frameworks?
-
Thanks all! Be sure to put in your suggestion for the next Q&A guest: https://discuss.avdi.codes/t/who-should-be-the-next-q-a-guest/563
Log in to reply.