Let's say, I have a mobile application, which goal is to facilitate the work of operators who work in the field with clients and their "top-brass" to track their KPI. It's already written on Yii 1.1 and now the task is to migrate this application on 2.0. But I need some advices about architecture.
I have login page, I have page with different stuff like bills, clients, reports with information about clients (for operator) or list of operators for managers who lead them, and which of the menu item falls into the client profile or list of clients or operators (depends on).
What should I use to split information logically in my app? For example, widgets? In the previous version of my application I used blocks logic:
public function renderBlock( $name, $view = null )
{
$res = '';
if ( isset( $this->_blocks[ $name ] ) && $this->_blocks[ $name ] instanceof Block )
{
if ($view)
{
$this->_blocks[ $name ]->setView($view);
}
$res = $this->_blocks[ $name ]->run();
}
else
{
echo "Error render $name block.";
}
return $res;
}
and:
abstract class Block extends CWidget
But now I realised that it was a bit of tangled logic and needs to refactor. What's your recommendations?