Below are summary of the View class design. Your feedback are welcome:
We will still have the render() methods in controllers and widgets like we do in 1.1. However, the implementation is different. In 2.0, the render() methods in controllers/widgets will create new View objects and call their render() thereafter.
The View class also contains methods such as widget(), beginCache() which in 1.1 are within CBaseController.
The View class contains a property named $owner which refers to the owner of the view.
In a view file, $this refers to the View object, while $this->owner refers to the owner of the view.
View renderer is no longer needed in 2.0. To support a new template syntax, one needs to extend View now.
Besides controllers and widgets, the View class can also be used in other places, such as console commands.
This means that we can tell Yii to render different media/content types?
For instance, based on what is requesting data, and what method is used, the controller could decide what view object to use - JSON or XML for rest requests and the default for regular requests?