What is the best way to create dashboard using MVC? My dashboard will have things like "开发者_JAVA技巧There are XX registered users","There were YY people on this site today" and stuff like that. In my admin controller I'll have function called dashboard and I am planning to do this by including users model, page_stats model, etc etc or is there any other way to do this (more MVC way)?
Thanks, Vizualni.
You're already doing it if you have an MVC framework. What you want to make sure happens is that you dont get sloppy and mix your logic with view data, or model or even pollute your view with SQL queries. Other than that build all your specific models ( users, stats, etc; )
精彩评论