Hello folks,
I have a website with a book reviews feature. So, the idea is that people post reviews about books that they like. Other users can then (obviously) read the reviews, but they can also post comments about the review - at the bottom of the page. This is a feature that you’ve probably seen a million times before on sites like Amazon or LinkedIn. It’s basically just a standard comments tree with a little textarea at the top and a button to submit a comment. For what it’s worth, I’ve already built this ‘book club’ in Codeigniter, but I’m hoping to switch everything over to Yii. It’s at insiderclub.org.
Anyway, I’m wondering if anyone can tell me what is the best way to handle a feature like this? I’m talking specifically about the comments tree.
I’m not looking for anyone to spell out the code for me, but if somebody could just give me some general advice then it would be amazing. In a nutshell, I can’t figure out whether I should use a module for my comments tree (can you call modules from inside normal view files?), OR should I use a widget?
Any help with this would be appreciated. Thank you so much!
David
PS - By the way, one of the things that ruined Codeigniter for me was that nobody from the community seemed to be able to figure out when to use a widget, a helper, a module, a heavily PHPified view or a thing called a view callback. It’s all a bit confused over there. I’m keeping my fingers crossed, hoping that Yii2 will have a bit more clarity when it comes to how to structure web apps.