Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Request for Guidance on Achieving a Suitable Structure #638

Unanswered
Amirhossein256 asked this question in Q&A
Discussion options

I'm in the process of developing a bot with a relatively large number of features, and I'm in need of a better and more organized structure to handle all the requests. I want to ensure that operations are separated, so I don't have to write everything in a single file.

I have attempted to implement architectures like the Command Pattern to manage the separation of concerns, but I encountered issues with dependency injection and sharing common methods across all classes. It seems that I might not be using the most suitable pattern for this case.

Could anyone suggest an appropriate structure or pattern that would help manage these operations more effectively?

You must be logged in to vote

Replies: 1 comment

Comment options

I think a simple way could be to split your handler methods in dedicated traits, in order to have a simple code and a feature (or a set of similar features) per Trait

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
Converted from issue

This discussion was converted from issue #637 on September 02, 2024 13:00.

AltStyle によって変換されたページ (->オリジナル) /