Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REFACTOR] Use Convenient Naming Convention for repo Package #61

Open
mohamed-sallam opened this issue Apr 11, 2023 · 0 comments · May be fixed by #62
Open

[REFACTOR] Use Convenient Naming Convention for repo Package #61

mohamed-sallam opened this issue Apr 11, 2023 · 0 comments · May be fixed by #62
Assignees
Labels
1h An hour good first issue Good for newcomers Refactor Repo repository database

Comments

@mohamed-sallam
Copy link
Owner

Use cleaner code style as suggested in Clean Code By Uncle Bob.

These are sometimes a special case for encodings. For example, say you are building an
ABSTRACT FACTORY for the creation of shapes. This factory will be an interface and will
be implemented by a concrete class. What should you name them? IShapeFactory and
ShapeFactory? I prefer to leave interfaces unadorned. The preceding I, so common in
today’s legacy wads, is a distraction at best and too much information at worst. I don’t
want my users knowing that I’m handing them an interface. I just want them to know that
it’s a ShapeFactory. So if I must encode either the interface or the implementation, I choose
the implementation. Calling it ShapeFactoryImp, or even the hideous CShapeFactory, is pref-
erable to encoding the interface.
-- Uncle Bob

So replace GroupRepository with GroupRepositoryImpl and IGroupRepository with GroupRepository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1h An hour good first issue Good for newcomers Refactor Repo repository database
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants