Wednesday, 23 January 2013

WindowsPhone8 expects HTML5 apps without Javascript??!?

I am not a huge fan of WindowsPhone8 and Microsoft. In search for a HTML5 mobile framework which works on Windows Mobile, I installed Windows 8 and VisualStudio. Before diving into VisualStudio, I tried few HTML5 frameworks on the mobile ie to see which one(s) seem to be working which I already mentioned in previous post.

Since jQueryMobile was the only working framework on WindowsPhone, I wanted to give a try and dive in to VisualStudio. Unlike android and ios IDEs, Visual Studio had a HTML5 app template which seemed to be a good idea.


I already had a nice app template from adobe which have few pages and a custom style so was perfect for testing.

However, the result was far from being perfect...

Again, I went back to ie10 which seemed to be working fine. So I started with playing the developer tools to see if I could make the webapp fail in similar way. After playing a little with css, I realized turning off the scripts make the page fail in a similar way.



I decided to check the template app in C#. I was thinking this was a desperate effort since this was the HTML5 app template for the WindowsPhone from Microsoft itself. The code block was pretty simple:


<phone:WebBrowser x:Name="Browser"                          HorizontalAlignment="Stretch"                          VerticalAlignment="Stretch"                          Loaded="Browser_Loaded"                          NavigationFailed="Browser_NavigationFailed" />

After playing a while with WebBrowser's properties, I realized there is a property called "IsScriptEnabled". Well that should be nonsense to have this turned off by default, even if it was since this an HTML5 app template from the official IDE it would already been set to true.

It turned out that it wasn't setting this property to true, let the app run as expected.

<phone:WebBrowser x:Name="Browser" IsScriptEnabled="True"                          HorizontalAlignment="Stretch"                          VerticalAlignment="Stretch"                          Loaded="Browser_Loaded"                          NavigationFailed="Browser_NavigationFailed" />



Seriously Microsoft, do you really think an HTML5 app is something without Javascript? I can understand this to be turned out by default for the webbrowser component but I really can not understand how would you not set it on automatically for an HTML5 app template!

Monday, 21 January 2013

HTML5 is there but not sure if WindowsPhone8 is there yet.

Two years ago I was a keen supporter of Native Development since HTML5 but things have changed. Both Mobile browsers and HTML5 move forward. Meanwhile I discovered mGWT which let me code typesafe Java and run highly optimized Javascript with nice well built mobile widgets.
Since then I have been using mGWT for most of my mobile applications and unlike Mark Zuckerberg, I really believe HTML5 is already there.
Last month Sencha released their Facebook application the Fastbook which clearly showed HTML5 was already there but clearly facebook's mobile team was not.

However, when I started to try some apps on WindowsPhone8, even most promising HTML5 frameworks started to fail. Honestly I don't see much future on WindowsPhone but some clients do.

Here are some screenshots from demo applications of the popular HTML5 Frameworks.

Sencha: The creators of the great Fastbook, fails fast on WindowsPhone8. The kithenSink application from sencha, sinks fast and is not usable at all.

mGWT: My favourite mobile framework for mobile web apps also fail fast on WindowsPhone although gwt usually does a great job with ie. The Showcase app seems to be running but not really functioning.

Dojo Mobile: Dojo Mobile Showcase app seems ok at first. However there are major problems with UI (ex buttons). Also scrolling lists may end up pushing the whole list out of the screen which is not a well known experience.

jQuery Mobile: The demo app of jQuery Mobile seems to be the only functioning one above all. The experience is still not as smooth as iOS or Android counterpart but acceptable. Some minor UI failures happen but given WindowsPhone's market share, thats welcome. The widgets are not as shiny as mGWT but again thats ok if WindowsPhone is in the game.

Conclusion: mGWT is still my choice of HTML5 dev environment. I code and debug typesafe Java and get optimized Javascript in return. The widgets are shiny and fast. Styling is peace of cake. However if supporting WindowsPhone is an issue, the only thing I could come up with is using jQuery Mobile. It would be best if Microsoft stops stupid PR campaigns like #androidrage and make themself available for real competition.

But honestly supporting WindowsPhone8? Seriously?!?!