I'm currently working on a client proposal which is for a web and a mobile web application both. There are 61 features for the Web application and the Mobile web application is supposed to have a subset of all features.
We evaluated various programming language stacks and decided that LAMP is the best one for this. We even went further and evaluated various MVC frameworks in PHP and finalized YII.
Now my problem here is this. We're going to use the same code-base for the mobile and the Web application. We have planned to route all requests through a "Front-Controller" target Controller that check the "User-Agent" header and has all application controllers in a switch block. So for both the Web and mobile application, the "Model" and "Controller" code remains the same, only the "View" changes. Depending upon the "user-agent", the target controller decides to load the appropriate "View". How does this architecture sound to you all? Does anyone have a better idea? Is this architecture functionally possible in YII? Please guide me about the same.