Tag Archives: ios

Fast JavaScript engine in Apple iOS 4.3 is in standalone Safari only, but why?

Now that Apple iOS 4.3 is generally available for iPhone and iPad, users have noticed something that seems curious. The fast new “Nitro” JavaScript engine only works in the standalone Safari browser, not when a web app is pinned to the home screen, or when a web view is embedded into an app.

This link at mobilexweb.com shows the evidence. Here is the SunSpider test standalone, showing a time of 4098ms, and pinned to the home screen as an app, where it shows 10391.9ms:

image image

The consequence: apps created using WebKit as a runtime, for example using PhoneGap, will not get the benefit of Nitro.

It would be easy to conclude that Apple is deliberately hobbling these apps in order to protect native apps, which can only be installed via Apple’s App Store and are subject to its 30% cut. However that might not be the case. It could be a bug – according to Hacker News it has been reported as such:

To add another note to this, its a bug that Apple seems to know about. I can’t link to it because its marked CONFIDENTIAL across the top of the dev forums, but in short its known about and being investigated.

or it could be a security feature. Using a just-in-time compiler exposes the operating system more than just interpreting the code; perhaps Safari has more protection when running standalone.

Either way, with the increasing interest in WebKit as a de facto cross-platform application runtime for mobile, this particular limitation is unfortunate.

Update: There are also reports of the HTML 5 offline cache not working other than in full Safari:

I’ve tested this by switching apple-mobile-web-app-capable from ‘yes’ to ‘no’ and offline cache works as expected. But whenever it’s switched back to ‘yes’, it’s not working anymore. This occurs when the app is standalone at home screen. As a website, viewed with Safari cache is working as expected.

The Apple iPad post-PC era in education

I am at the QCon conference in London where I attended a session by Fraser Spiers mysteriously titled The Invisible Computer Lab.

Spiers is the guy who won a certain amount of fame or notoriety by issuing all staff and pupils with Apple iPad devices at the Scottish private school where he teaches computing.

image

The session blurb did not mention the iPad but said, “this talk will argue for a new direction in school ICT.” I went along because I am conscious that the way computing is taught in UK schools is often ineffective. Problems include kids knowing more than teachers; out of date hardware; too much Microsoft Office; and often an exclusive focus on general purpose applications rather forming any understanding of what computers are and how they work.

There is probably a connection between this and the low interest in computer science in higher level education.

Spiers did mention this; but most of the talk was an iPad love-in. He is an Apple fan and showed us pictures of the original iMac and various Mac notebooks which preceded the arrival of the iPad at his school.

Nevertheless, he made a persuasive case for how the iPad had transformed teaching (not only computing) at the school. According to Spiers, the children write longer essays because they have discovered word processing for the first time; they have new artistic creativity; they use the web far more and the school had to upgrade its internet connectivity; they are escaping from a word-based approach to learning and presenting their work to one which makes use of multiple media types.

He added that some of the expected snags did not materialise. They were concerned about the virtual touch keyboard on the iPad and offered keyboard accessories to everyone; but in practice few wanted it. The kids, he said, now dislike plastic keyboards with their tiresome buttons.

It is not a new model of computing, it is a new model of education. Handwriting may longer be an important skill, said Spiers.

Now, I do make due allowance for the over-exuberance of an Apple evangelist; and that the reality may not be as rose-tinted as he describes it.

At the same time, you can see how well Apple’s controlled computing environment works in a school environment, where kids may try to break computers or do bad things with them, as well as how the design and usability revolution plays out in a school environment.

Note, however, that Apple is not yet really geared up for iPad in education and Spiers encountered silly issues like the inability to buy site licences for apps delivered over iTunes; each one has to be purchased individually, and they have to fudge the accounts since nobody under 13 can use the app store. I am sure issues like this will be fixed soon.

Objections? Well, there is the cost of Apple’s premium hardware and its tax on the software. There is the ethics of using Apple at all – today, as it happens, there are posts by Bill Thompson and by Tom Arah which do a good job of spelling out concerns about Apple’s authoritarian and increasingly greedy business practices, especially with iOS and the App Store. I would rather be writing up the impact of Linux or Android or open source in education.

However, I will close with my question to Spiers and his answer. What will happen, I asked, when these kids with their experience of iPad computing get jobs and are confronted by offices full of PCs?

“A child that starts this year is going to graduate in 2024,” he replied. “I don’t know what the business environment is going to be like in 2024. I think there will be convergence between iOS and the Mac. I think businesses that stick with the PC infrastructure will not be around in 2024.”

Adobe targets Apple iPhone and iPad browsers with tool to convert Flash projects

Adobe has released an “experimental technology” codenamed Wallaby on its Adobe Labs site. Not all Adobe Labs projects become fully released products, but it is an indication of serious interest. The experiment was first previewed at the Adobe Max conference last year.

Wallaby is an Adobe AIR application for Windows and Mac. The tool is simplicity itself: just select a .FLA file and convert it.

image

.FLA is the format of Flash projects, not Flash output. gauges

According to Adobe’s John Nack Wallaby has limited goals, focused on “converting typical banner ads to HTML5.” It is aimed at WebKit-based browsers, the implication being that Adobe’s main intent is to enable Flash ads to work on Apple’s iPhone and iPad, though it also works on Google Chrome and Apple Safari on the desktop. There is no ActionScript conversion, though you can edit the exported project after conversion and add your own scripting.

ActionScript is based on JavaScript so a conversion tool should not be too hard.

Other Flash features not supported include video, sound, 3D transforms, Filters, Inverse Kinematics, and gradient strokes

The fascinating aspect of Wallaby is in its potential. Users do not care whether a web site or application uses Flash or HTML5; they just want it to work. Adobe’s primary strength is in its design tools. One possible scenario is that Adobe might gradually extend its HTML5 support so that the tools are applicable for both platforms; Flash could become a workaround technology for legacy browsers.

No doubt Adobe would rather see the Flash runtime used everywhere but at least the company has a plan B. If, for example, Apple comes to dominate personal and mobile computing and continues to block Flash wherever it can, then that is important. Adobe already has a Flash to iOS packager for apps; now it has the beginnings of a solution for in-browser Flash on iOS as well.

Update: revised post with more detail about what is not supported.

Appcelerator releases Titanium Mobile 1.6

Appcelerator has released Titanium Mobile 1.6, an update to its cross-platform app framework for Apple iOS and Google Android.

The update adds 26 features for Android and 9 features for iOS. The Facebook API has been completely redone, keeping up-to-date with the latest Facebook API. There is beta support for the Android NDK – native code development.

Android 1.6 is now deprecated and will not be supported in future releases.

While not a big release in itself, Titanium Mobile 1.6 is require for using forthcoming Titanium+Plus modules, libraries which add support for features such as barcode reading and PayPal payments.

There is no sign yet of Aptana integration, following the acquisition of this JavaScript IDE in January.

Updating to the 1.6 SDK was delightfully easy on Windows. Just open Titanium Developer and click the prompt.

image

RunRev releases LiveCode for Android preview alongside iOS, Mac, Windows, Linux

RunRev has announced a preview version of its LiveCode for Google Android, which will join existing versions for Windows, Mac, Linux, Web and iOS.

image

LiveCode is like a modern-day HyperCard, an early database and simple application builder for the Mac. It includes a graphical development environment with scripting using the LiveCode language, described by RunRev as “A very high level language”. Here is a sample:

put “The fox jumped over the lazy dog.” into theText

put “ quick brown” after word 2 of theText

The advantage is fast development, once you have become familiar with the platform.

On a quick look I noticed that LiveCode looks great for building a business-oriented client, but looks more challenging when it comes to interacting with a remote server application, though it does have support for basic http and https requests as well as socket support.

Now that Android is supported LiveCode looks interesting as a quick and easy route to cross-platform mobile apps.

Mobile app developers can register to receive the Android pre-release version today at www.runrev.com.

Trying out MonoTouch – C# for Apple’s iPhone and iPad

I’ve posted an article on trying out MonoTouch, which builds on the open source Mono project to provide a means of developing apps for Apple’s iOS using C# and the .NET Framework.

It is easy to assume that since the .NET Framework is Microsoft’s technology, using a non-Microsoft implementation is risky. Then again, Mono is open source; and the more usage it gets, the better it becomes. MonoTouch is an important development for the project, since it is a commercial project which might actually be making some money for Novell/Attachmate. While it would be nice to get it for free, it is important that Mono makes business sense as well. MonoTouch has given the Mono project a significant boost.

Using HTML 5 to mitigate locked-down platforms like Apple iOS

Apple has created a beautiful mobile platform; but it has some drawbacks. One was highlighted yesterday, when Apple rejected an app from Sony for reading and purchasing digital books on the device.

According to Apple’s Trudy Miller, as quoted in the New York Times:

We are now requiring that if an app offers customers the ability to purchase books outside of the app, that the same option is also available to customers from within the app.

What Miller does not spell out is the further implication, which is that the purchase must go though the Apple App Store, and is therefore subject both to approval and to a 30% fee to Apple.

There is a suggestion that Apple is only applying the rule to books at the moment, but that could change. Other readers such as Amazon’s Kindle app will be affected though, after a grace period ending June 30 2011 for existing applications.

Currently these apps have a link which opens the browser, so that users can purchase on the web, and then download to the device, and this is what is annoying Apple. It is not clear to me whether Apple will be satisfied if that link is removed, but with users still to bypass the App Store by purchasing on the web.

It matters little. It is Apple’s platform, and tight control is one of its facets that makes it what it is. Apple can argue that it is enforcing the quality of the user experience. It seems to me that there are competition concerns if Apple comes to dominate a particular market; but don’t hold your breath for change driven by regulators.

What interests me about the issue is the extent to which HTML 5 apps provide a solution. Safari/WebKit on iPhone is a capable platform, and apps can even work offline and have local shortcuts installed. You can use local storage up to at least 5MB, with the user prompted to increase the limit if it is a SQL database – SQLite is built in to the platform.

Local storage is a problem for eReaders, though you can cache a fair amount of text even in 5MB. For many apps though, it is more than enough.

The more Apple locks down and taxes its platform, the more attractive the HTML5 alternative becomes.

Mobl: a new language for mobile applications, with Eclipse integration

It has gradually dawned on me that, contrary to first appearances, the Apple iPhone and iPad do come with a capable application runtime for those who would rather not tangle with Objective C; and one on which you can run applications without the hassle of negotiating the App Store. This runtime is the WebKit-based browser and JavaScript engine. This is for web apps of course; but as noted in my look at NS App Studio last week, you can blur the boundaries between web and local by creating a local shortcut and designing your app to work offline. Here is the Apple documentation, which notes:

Offline application support is available in iOS 2.1 and later and in Safari 4.0 and later

So you can do offline. There is also a local database, based on SQLite, documented by Apple here – putting iOS ahead of Windows Phone 7, which has no built-in relational database for Silverlight applications. Another plus is that other WebKit-based mobile browsers should work as well, including the one in Android devices.

It is possible to create application frameworks that wrap these features into a single development platform that compiles to JavaScript, HTML and CSS. PhoneGap is one example, and NS App Studio another; but today Reddit alerted me to another, Mobl, which has a modern feel and benefits from Eclipse integration. It is also free and open source, and with the right community momentum looks like it could be interesting.

Mobl is a statically-typed language with a syntax similar to Javascript – there is a guide and language reference here. The goal is to create a complete DSL (Domain Specific Language) for mobile development, which according to the web site:

Integrates all aspects of a mobile web application into a single language: data modeling, user interfaces, application logic, styling and web services.

The main author is Zef Hemel, from the Delft University of Technology in the Netherlands. Mobl makes use of Stratego/XT, which is a language and toolset for program transformation, and SDF  (Modular Syntax Definition Formalism), a language for defining syntax.

Mobl includes data modelling which handles object persistence and a concise language for defining user interfaces. AJAX support is built-in and there is integrated support for RESTful web services and for JSON (JavaScript Object Notation). The Eclipse add-in includes syntax highlighting, inline error reporting, code completion, and reference resolving.

All rather impressive for a project that has just burst onto the scene. I installed the Eclipse add-on and enjoyed its simple license:

image

“This software is distributed in the hope that it will be useful.” – though I have not found time yet to try creating an application.

There is more information on the nicely-designed website and blog and in the Google Group.

Update: thanks to @FransBouma for the link to the Mobl guide.

Microsoft pledges commitment to Silverlight – but is it enough?

Microsoft’s president of Server and Tools Bob Muglia has posted a response to the widespread perception that the company is backing off its commitment to Silverlight, a cross-browser, cross-platform runtime for rich internet applications. He is the right person to do so, since it was his remark that ”Our strategy with Silverlight has shifted” which seemed to confirm a strategy change that had already been implied by the strong focus in the keynote on HTML 5 as an application platform.

Muglia says Silverlight is in fact “very important and strategic to Microsoft”. He confirms that a new release is in development, notes that Silverlight is the development platform for Windows Phone 7, and affirms Silverlight both as a media client and as “the richest way to build web-delivered client apps.”

So what is the strategy change? It is this:

When we started Silverlight, the number of unique/different Internet-connected devices in the world was relatively small, and our goal was to provide the most consistent, richest experience across those devices.  But the world has changed.  As a result, getting a single runtime implementation installed on every potential device is practically impossible.  We think HTML will provide the broadest, cross-platform reach across all these devices.  At Microsoft, we’re committed to building the world’s best implementation of HTML 5 for devices running Windows, and at the PDC, we showed the great progress we’re making on this with IE 9.

The key problem here is Apple’s iOS, which Muglia mentioned specifically in his earlier interview:

HTML is the only true cross platform solution for everything, including (Apple’s) iOS platform.

Muglia’s words are somewhat reassuring to Silverlight developers; but not, I think, all that much. Silverlight will continue on Windows, Mac and on Windows Phone; but there are many more devices which developers want to target, and it sounds as if Microsoft does not intend to broaden Silverlight’s reach.

Faced with the same issues, Adobe has brought Flash to device platforms including Android, MeeGo, Blackberry and Google TV; and come up with a packager that compiles Flash applications to native iOS code. There is still no Flash or AIR (out of browser Flash) on Apple iOS; but Adobe has done all possible to make Flash a broad cross-platform runtime.

Microsoft by contrast has not really entered the fight. It has been left to Novell’s Mono team to show what can be done with cross-platform .NET, including MonoTouch for iOS and MonoDroid for Google’s Android platform.

Microsoft could have done more to bring Silverlight to further platforms, but has chosen instead to focus on HTML 5 – just as Muglia said in his earlier interview.

Whether Microsoft is right or wrong in this is a matter for debate. From what I have seen, the  comments on Microsoft’s de-emphasis of Silverlight at PDC have been worrying for .NET developers, but mostly cheered elsewhere.

The problem is that HTML 5 is not ready, nor is it capable of everything that can be done in Silverlight or Flash. There is a gap to be filled; and it looks as if Microsoft is leaving that task to Adobe.

It does seem to me inevitable that if Microsoft really gets behind HTML 5, by supporting it with tools and libraries to make it a strong and productive client for Microsoft’s server applications, then Silverlight will slip further behind.

Which mobile platforms will fail?

Gartner’s Nick Jones addressed this question in a blog post yesterday. He refers to the “rule of three” which conjectures that no more than three large vendors can succeed in a mature market. If this applies in mobile, then we will see no more than three survivors, after failures and consolidation, from the following group plus any I’ve missed. I have shown platforms that have common ownership and are already slated to be replaced in strikeout format.

  • Apple iOS
  • Google Android
  • Samsung Bada
  • Maemo MeeGo
  • RIM BlackBerry OS BlackBerry Tablet OS (QNX)
  • HP/Palm WebOS
  • Symbian
  • Windows Mobile Windows Phone 7 and successors

Jones says that success requires differentiation, critical mass, and a large handset manufacturer. I am not sure that the last two are really distinct. It is easy to fall into the tautology trap: to be successful a platform needs to be successful. Quite so; but what we are after is the magic ingredient(s) that make it so.

Drawing up a list like this is hard, since some operating systems are more distinct than others. Android, Bada, MeeGo and WebOS are all Linux-based; iOS is also a Unix-like OS. Windows Mobile and Windows Phone 7 are both based on Windows CE.

While it seems obvious that not all the above will prosper, I am not sure that the rule of three applies. I agree that it is unlikely that mobile app vendors will want to support and build 8 or more versions of each app in order to cover the whole market; but this problem does not apply to web apps, and cross-platform frameworks and runtimes can solve the problem to some extent – things like Adobe AIR for mobile, PhoneGap and Appcelerator. Further, there will probably always be mobile devices on which few if any apps are installed, where the user will not care about the OS or application store.

Still, pick your winners. Gartner is betting on iOS and Android, predicting decline for RIM and Symbian, and projecting a small 3.9% share for Microsoft by 2014.

I am sure there will be surprises. The question of mobile OS market share should not be seen in isolation, but as part of a bigger picture in which cloud+device dominates computing. Microsoft has an opportunity here, because in theory it can offer smooth migration to existing Microsoft-platform businesses, taking advantage of their investment – or lock-in – to Active Directory, Exchange, Office and .NET. In the cloud that makes Microsoft BPOS and Azure attractive, while a mobile device with great support for Exchange and SharePoint, for example, is attractive to businesses that already use these platforms.

The cloud will be a big influence at the consumer end too. There is talk of a Facebook phone which could disrupt the market; but I wonder if we will see the existing Facebook and Microsoft partnership strengthen once people realise that Windows Phone 7 has, from what I have seen, the best Facebook integration out there.

So there are two reasons why Gartner may have under-rated Microsoft’s prospects. Equally, you can argue that Microsoft is too late into this market, with Android perfectly positioned to occupy the same position with respect to Apple that worked so well for Microsoft on the desktop.

It is all too early to call. The best advice is to build in the cloud and plan for change when it comes to devices.