+
Skip to content

Conversation

dreamer-dead
Copy link
Contributor

Hi, Flavio.
Right now this request is not a candidate for merging.
I just wanted to discuss a way to extract data access logic from views like ChannelView.
IMHO, accessing database directly from view isn't a good pattern.
That's why I tried to move that part of code to a new class, ChannelController.
After this step it is possible to move database specific code to a distinct class and hide all SQL related things even from the controller.
What do you think about that?

(It seems that files channelsview.{h,cpp} are outdated and I removed it in this request.)

@flaviotordini
Copy link
Owner

I just noticed you committed your API key inside minitube.pro. Remove it ASAP!

@dreamer-dead
Copy link
Contributor Author

Thanks, that was negligent =(

@flaviotordini
Copy link
Owner

This is needed to solve #5. I think ChannelView should not be aware of ChannelController at all. It should just emit signals and use an arbitrary model.

@dreamer-dead
Copy link
Contributor Author

Sorry for such a long delay.
I agree with you, ChannelView shouldn't use the controller directly.
I've updated pull-request, could you take a look please?
There are lot of changed lines and it could be difficult to review, so I hope that I didn't broke anything.
And sorry for possible bad spellings in the code, my English isn't good at all.
Thanks!

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

Successfully merging this pull request may close these issues.

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载