Seperating View from model and controller

Hey all,

Fist post here, and I am relatively new to development with the Yii framework. I am working in a small group environment and essentially responsible for everything besides the view. I have read through the a lot of the documentation and forum posts, but I can’t seem to figure out how I would allow the designers to provide an html/css view without adding in php callbacks to the model.

Any help would be great,


If you don’t want to write your views in php you could choose a template system:

Karl, thanks for the suggestion! I looked at the extensions but I still feel left with the same problem. I come from an Android development background, where the MVC breakdown seemed a little different. The views were essentially static XML pages, with controllers registering listeners on the text fields, buttons, or whatever else the user would be interacting with. Is there anything analogous to this in the yii framework? I am just worried when it comes time to interface with the designers, a complete overhaul will ensues, as opposed a change in a line or two of a few listeners.


Yeah, I suspected that the template systems offered weren’t going to really get to the heart of what you want.

Our workflow at my company is to have technical people creating/maintaining the views based on designs/feedback from non-technical people. (although it’s usually easy enough for non-technical people to make basic copy/style changes).

You could take a look at the themes available here:

They might give you a starting point to get going a bit more quickly.

There is also documentation here:

Karl and Outrage, thanks a lot for all the suggestions. I really appreciate the eagerness of the Yii community to reach out a helping hand. Outrage, I know I will definitely have to spend some time wrapping my head around the intricate difference between themes/layouts/views. Karl, would you say your company operates most efficiently having some people who are purely developers, some people who are purely designers and some people who have a bit of knowledge in both areas who are responsible for merging the developers and the designers work? I am just working on a side project with 2 other people, so I am just trying to figure out the most effective way to delegate tasks.

Thanks again.

We have two full programmers on staff and jack of all trades (project manager + html + css) person. We subcontract work to designers. We typically get layered Photoshop files from the designers and a full programmer will create the layout and view files from this.

During the maintenance phase our jack of all trades will do simple updates to the view/layout files. More complicated changes are passed to full programmers.