I'm trying to build a responsive website with server-side enhancement in Phalcon.
In this approach, I'm detecting user's device at server side with Mobile-Detect library. Based on the device type I want to enable/disable certain components and modify the HTML markup.
To achieve this I'm thinking to use two different directories which will have all view related files - one for Mobile and another one for Desktop. Then in the PHP code, while creating view service for DI, I'll set the the view directory path based on detected device.
I would like to know if the above approach is good or not ? And whether there will be any performance overhead because of this ?
If there is any alternate solution to build responsive website with server-side enhancement in Phalcon then please let me know.