Saturday, June 11, 2011

Throwing a little gas on the fire... "HTML App Host Framework for Phone 7" (or Building apps for WP7 like those mentioned for Win8)

UXMagicHTML 5 Host Application Framework for WP7 "MANGO”

Want to host HTML 5 Web apps from the Windows Phone 7.1 (Mango update) just like they are talking about on X-box 360 and Windows 8 ? Check it out.. HTML 5 apps now work right alongside Silverlight Apps (XAML+NET) and XNA all in HARMONY..

CodePlex  - HTML App Host Framework for Phone 7

"This is an HTML Application Host framework for building HTML/JavaScript for Windows Phone 7 with mango this will be for HTML5. The framework consists of controls needed to support embed html apps in a standard xap format used by the market place for deploying to phone 7.

Primarily the framework consists of a browser shell that wires up the isolated storage replication infrastructure that makes it easy to drop in a pre built html/javascript/css based application and that shell base class also add's wiring for 'task's that allow javascript to call phone 7 api's directly from script.

Please email me if your interested in contributing to this project. So far there is one app in the marketplace that uses this framework.

Using the HTML App Host Framework

the HTML App Host Framework current consist's of 3 critical parts. 1, the app host shell, 2, the html loader and 3 the task processor. For an HTML application developer you don't really need to worry about most of it but in the following context. To start you need to create an empty Silverlight application in visual studio and then reference the HTML App Host dll. Then you need to create a directory called HTML and add your HTML application to this. The HTML application can include html files, resources, images, css, script files etc and folder structure or whatever you need. On the downside you need to create a 'manifest.xml' file at the root of the html folder that maps all the files. This allows the HTMLAppHostFramework to consume your application and run it on the phone. Here is a typical manifest.xml file:

<?xml version="1.0" encoding="utf-8" ?>
<IsolatedStorageManifest>
<Files>
<File Name="index.html" />
<File Name="about.html" />
</Files>
<Directories>
<Directory Name="inc">
<Files>
<File Name="script1.js"/>
<File Name="script2.js"/>
</Files>
</Directory>
</Directories>
</IsolatedStorageManifest>

Basic a simple index of your html application. the trick here is that html assets can't be referenced directly from a xap to say a webbrowser control so the apphost used class called 'IsolatedStorageResourceHelper' to copy everything from the xap based on the manifest.xml file into isolated storage where it can be referenced and executed directly. ..."

The whole Windows 8 thing is a sensitive topic right now (and one I wish Microsoft would speak up on. I'm SURE the FUD is way over blown, but since there's no official word FUD is all we have) but when I saw this I thought it kind of interesting...

No comments: