Reputation: 6190
I have a web site which is developed using Zend framework. Now the requirement came for a mobile site for same system. So I have two solutions in my mind. I would like to know what is the best solution I should select.
Develop separate views and layout for the site keeping Controllers of existing site. By detecting the device serve relevant view.
Duplicating the existing system create new Zend module and modify everything to support mobile browsers.
Appreciate all your suggestions.
Upvotes: 1
Views: 324
Reputation: 39389
You could either pick up the incoming request and check if it's a mobile device, as zysoft says, or you could look at going down the route of rewriting your existing views so they're "responsive". That is, the layout adapts to the size of the screen of the device being used to view your site.
The benefits of a responsive design is that you're not relying on a list of device names or whatever to match and serve a mobile-specific page (as it goes on the screen size, not the device's identity). The downside is, it's a bit more work than making some 'light' views.
You've also got to consider that devices no longer sit in between "desktop" and "mobile" groups—there's a plethora of devices in between such as tables, netbooks and TVs that makes responsive web design more and more desirable.
Upvotes: 1
Reputation: 2358
As I understand the issue is only with heavy design and some elements that mobile doesn't support. You can solve it by creating separate views folder and set it as primary in application initialization where you detect mobile. It gives you a way to save all hard work on controllers, keep the code unified and provide people with a kind of "mobile theme" for the site.
Upvotes: 0