What is the common practice to handle developing a web application that needs to be implemented in multiple viewing modes, i.e. desktop and mobile/iphone?
Is it better to develop multiple applications for each mode or try to keep all the code in the same application? Does it make a difference if all the page functionality is the same (i.e. sometimes mobile versions can't "do" what their web counterparts can)? What are some of the criteria to decide whether to split the app into multiple projects, gotchas, etc? Are there any specific architecture patterns that make the job easier?
It seems to me that unless the application can simply be presented in the different views, it's better to create a separate application for each one.
Assume the application is similar to a Gmail or Facebook (larger app with multiple functionality), not a simple hello world type or static corporate website.
I'm currently using Grails for development, but this can probably apply to multiple frameworks.