Suppose I have a mobile app that has 20 views or more (login, map, customers index, customer edit, etc..).
I would like to know how (if I) can I reuse (ex.) the page headers’ html code (which is the same for all views)?
I’m scared about huge sheet-files with a lot of redundant code..
I am thinking at something like php file including, or MVC framework’s view elements..
Sure, I can think of creating some folders for specific groups of logical related views, but there would still be a lot of redundant code (headers, footers, etc.)..
I use jQueryMobile within a PhoneGap app, so, maybe I can interpolate some java code in order to fetch some html element file? 🙂
If you want to use Phonegap you cant use any kind of ServerSide Scripting Language.
You can use basicly HTML, CSS and Javascript.
Sure you can do something, for ex. create an XML file and save the headers you want there. With Javascript get the data. To me this do seem a bit odd, but its a possible way to go.
You can even go more fancy and make AJAX calls to a server to pick up HTML, but this is even more odd in my eyes.
Java:
Yes it is possible for you to re-write some of the Phonegap Core. But you cant implement PHP for instance. Also when you compile your app with Phonegap you need to have a “index.html” file. Thats just how it is 🙂
Allthough these are alternatives.
Hope that i was of some help.