I am a beginner of yii and web programming. In the The Definitive Guide to Yii, it tells what is controller from technical point of view.
But I am still not sure what should be a controller from application design point of view. In the Blog demo, there is Post controller to manage a blog posts with the action of create, view, update, and delete, etc.
From this demo, is there fair to generalize:
- for a concrete data entity(e.g.: blog post, blog comments, picture, or tweets…), there should be a controller in place to provide user action, and connect data with view?
What else principles should be taken into consideration in designing a controller?
Please provide me your thoughts. Thank you!