Im looking for the guidance on best practices for developing a web app with normal views and mobile views. The mobile version would have less of the functionality but a whole lot of view files.
Is it a better idea to separate the whole application into two projects, or to create a namespace? Or simple to keep everything inside of the single set of controllers?
Unless the functionality is drastically different, I'd leave the app as it is and create a mobile responder that would render the mobile site's pages.
respond_to :mobile { #render mobile view here }
The reason for this is that you'd be copying code into another namespace and therefore causing yourself maintainability headaches. However, if the functionality is very different, go ahead and create a namespace for the mobile site.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With