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

Thinking about the SaveFile method in the service interface #51

Open
tbasallo opened this issue Jan 28, 2018 · 0 comments
Open

Thinking about the SaveFile method in the service interface #51

tbasallo opened this issue Jan 28, 2018 · 0 comments

Comments

@tbasallo
Copy link

tbasallo commented Jan 28, 2018

I've been working on a PR (versus the stuff I whipped up real quick as a proof of concept) to integrate a couple other blog services that are not file based.

The first one being Azure table storage. There's a method on the service interface that is coupled to a file provider.

Task<string> SaveFile(byte[] bytes, string fileName, string suffix = null)
https://github.com/madskristensen/Miniblog.Core/blob/master/src/Services/IBlogService.cs#L107

While I could or would normally just ignore it and have it throw an exception, the issue here is how coupled this method is to the whole app not just the service itself. It's called once from each the blog controller and the metaweblog service.

Any thoughts on this specific coupling and how it could be reduced to just the FileBlog Service?

Here's the commit for the service I am proposing. But I could see this being a similar issue with a database provider.

tbasallo@fc8ccff

If there's no interest in supporting other services, then no big deal. But since an interface is used I imagine that the intent was to allow other providers.

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

No branches or pull requests

1 participant