The posts and comments controllers will use the words model to save the word counts after they've been processed.
posts和comments控制器将使用words模型来保存处理后的单词统计。
But since we want to actually be able to view the word counts, it probably makes more sense to build a words module with a Model and a Controller.
但是由于实际上需要能够查看单词统计,因此用模型和控制器来构建一个words模块可能更有意义。
What you will end up with in the end is, essentially, a Model to handle the words table, a View that lets you see the word counts, and a Controller to perform some logic.
从本质上说,最终将得到一个处理words表的模型,一个让您查看单词统计的视图,以及一个执行某个逻辑的控制器。
应用推荐