Last modified: 2012-10-03 22:15:31 UTC
Windows 8 will have a new 'Metro' interface paradigm with more touch-centric UI and different inter-app communication (such as a 'Share' sink system somewhat similar to Android's intents). Metro-themed apps can be written in C++/C#/etc but also can run in an HTML/JS/CSS environment. With a tablet-friendly main UI, we could port the app to run as a native Windows 8 Metro app, either through PhoneGap/Callback or directly. I have an x86 tablet (Dell Inspiron Duo) running Windows 8 Developer Preview to test with; unfortunately the developer tools are only available on the 64-bit build and I don't think this will run that (Atom CPU). Not sure if can build on one box and test on another with MS's current dev infrastructure (Metro apps have code-signing similar to iOS -- yecch!) Testing all the touch stuff within IE 10 should be possible in the near term though.
64-bit version does indeed run on my test tablet though it's... not an ideal dev box! ;) Did some very early exploration just for fun with stub JS projects from the Visual Studio Express 11 preview. Couple notes for when somebody wants to work more solidly on it: * the system throws exceptions when injecting stuff via document.write or innerHTML -- smart as it's probably dangerous. :) This breaks at least the JS script loading for l10n (about to change) and platform-specific files. Lots of errors beyond that are to be expected... * getting some errors in zepto.min.js; possibly due to zepto not liking MS's DOM environment. (It should be *very close* to standards but something may still be awry. Haven't attempted to track it down.) * search <input> shows REALLY HUGE -- may need to adjust the viewport or something * webkit-only gradient doesn't work of course :) * not exactly sure how to make the Visual Studio project copy in files from a common directory outside the project; may need to ponder proper way to arrange the project build. Some widgets of possible interest: WinJS.UI.AppBar toolbar wrapper; Android-like menus probably belong in there: <http://msdn.microsoft.com/en-us/library/windows/apps/br229670%28v=vs.85%29.aspx> WinJS.UI.SettingsPanel not sure how to actually use this, but in theory it should tie into the settings panel you get from swiping from screen right. <http://msdn.microsoft.com/en-us/library/windows/apps/br229701%28v=vs.85%29.aspx> WinJS.UI.Toggle switch-style on/off widget, may wish to use in place of check boxes in some places <http://msdn.microsoft.com/en-us/library/windows/apps/br229749%28v=vs.85%29.aspx> Some general background on using those: <http://msdn.microsoft.com/en-us/library/windows/apps/hh465493%28v=vs.85%29.aspx>
The really huge problem is indeed from the <meta> viewport. The 'width=100%' is interpreted as 'width=100', so everything zooms WAY in to fit a 100px viewport. :P :)
To use the files from the existing assets directory (outside the project), can do 'add existing file...' and do 'add as link'. In the low-level project file these look like this: <Content Include="..\assets\www\js\test.js"> <Link>js\test.js</Link> </Content> so giving the physical path on the Content@Include and the logical path in the entry's Link text. In-place files simply look like this: <Content Include="js\test.js" />
Just a note to self -- keeping this bug open until I do more cleanup and merging of code. Localization infrastructure and a few other things are shared between the main PhoneGap app and the Windows 8 HTML/JavaScript-based app but it can be refactored better.
You know what? Heck with it, closing this out. Code's deployed and in the store and it works.