Skip to content

Comments

Concerns Part 2#48

Open
tradesmanhelix wants to merge 5 commits intomainfrom
asmith/concerns-part-2
Open

Concerns Part 2#48
tradesmanhelix wants to merge 5 commits intomainfrom
asmith/concerns-part-2

Conversation

@tradesmanhelix
Copy link

@tradesmanhelix tradesmanhelix commented Apr 28, 2023

Part 2 of the "Concerns in Ruby" blog post series.

@tradesmanhelix tradesmanhelix force-pushed the asmith/concerns-part-2 branch from 4f0b325 to 64f4f78 Compare May 8, 2023 18:47
@tradesmanhelix tradesmanhelix marked this pull request as ready for review May 9, 2023 15:28
@tradesmanhelix tradesmanhelix requested a review from stockandawe May 9, 2023 15:28
@tradesmanhelix
Copy link
Author

Hi @stockandawe - part 2 should be ready for review. Thanks!

@tradesmanhelix tradesmanhelix changed the title Work on Concerns Part 2 Concerns Part 2 May 22, 2023
excerpt: Pitfalls and best practices for using concerns in Ruby.
---

Welcome back! [Last time]({% link _posts/2023-04-24-concerns-in-ruby-part-1.md %}), we discussed the basics of concerns in Ruby and saw a few examples of how to use them to share code across otherwise-unrelated sets of classes. We then took a detour with the goal of understanding, not just what concerns are, but also how to use them well. As part of that detour, we defined good software as, "software that can change inexpensively." We said that the concept of "inexpensive" encompassed a myriad of factors including time, money, and effort.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could use {:target="_blank"} so that the link to post 1 opens in a new window and the reader can continue reading this post .

#### Visualizing Class Relationships

The following provides nice visualization for inheritance, composition, and polymorphism:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nice visualization


So, next time you sit down to write some code, consider chanting, "Messages, messages, messages," as a way to remind yourself of good software design principles.

### The Story so Far

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea to include a summary of "the story so far"

Copy link

@stockandawe stockandawe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants