Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Help me name my class

Tags:

oop

class

naming

Okay, first, here's my rather poor diagram... alt text

It's worth noting the "Name Me" class may be listening to more than one RequestNotifier

It's safe to assume all Work Items that are put on the Work Queue are taken off the work queue by something else not shown and are processed exactly the same.

The only difference between the work items is the name (or id, but the name is my id in this) of the WorkItem that's being requested.

Name Me listens to Requests to work on a specific WorkItem, it then asks (a repository or some other data access class) for a WorkItem with that name, if one exists, submits it to the Work Queue. If none is found it ignores it and it's safe to do so.

Any ideas for a name, or if not a name, a better design that would make naming easier?

like image 365
Sekhat Avatar asked Mar 15 '26 23:03

Sekhat


2 Answers

NotificationBroker gets my vote.

The primary responsibility of that class seems to be listening to notifiers and Brokering those Notifications to multiple Worker Queues.

like image 119
Justin Niessner Avatar answered Mar 21 '26 12:03

Justin Niessner


KISS Principle

class Listener
like image 24
JonH Avatar answered Mar 21 '26 12:03

JonH



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!