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

Remove dependencies from custom item classes #298

Closed
adeneys opened this issue Jul 29, 2020 · 0 comments
Closed

Remove dependencies from custom item classes #298

adeneys opened this issue Jul 29, 2020 · 0 comments
Assignees

Comments

@adeneys
Copy link
Contributor

adeneys commented Jul 29, 2020

The custom item pattern requires custom item implementations to be implicitly convertible with Sitecore.Data.Items.Item. Requiring dependencies in the custom item breaks this pattern and is an indicator that the custom item has too many responsibilities. The responsibilities which require the dependencies should be encapsulated into separate classes.

We currently suffer from this problem in the WeBlog code. Many of the custom items have dependency requirements. We should refactor the custom items to extract the additional functionalities to other classes and simplify the custom items.

@adeneys adeneys self-assigned this Jul 29, 2020
adeneys added a commit that referenced this issue Jul 29, 2020
@adeneys adeneys closed this as completed Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant