02-20-2011 03:48 AM
02-21-2011 03:31 AM
OK I think I see what you are supposed to do - wrapper the whole web app as a WebWorks application.
I have to say that from what I've read, it appears to be a very complex and tortuous process, particularly, as I say, if you compare it to the simplicity of what's involved in iOS.
OK, on iOS if you want a web app to be submitted to the App Store (eg in order to monetise it) then you need to go through the process of wrappering it in something like PhoneGap which I guess is a similarish exercise, but there is a whole class of mobile web apps where such a process is unecessary and the "add to Home Screen" mechanism is sufficient.
I'd like to suggest to the Blackberry folks that an "add to Home Screen" equivalent should be considered for the Playbook and this will really encourage rapid development of web-based apps on this device.
02-21-2011 04:36 AM
Well, I suppose if you're already a Java developer who is familiar with Eclipse, then it's simple, and yes, like Phonegap, WebWorks opens up access to more of the built-in capabilities of the device, but for most business applications (which is my main focus), such things are generally overkill.
I'm not particularly suggesting an either/or, more of a "wouldn't it be nice to have the additional simple option" of an "Add to Homescreen" equivalent. If nothing else it gets you up and running with a basic web app that has a native look and feel without any additional hassle, and it's then possible to consider whether or not the extra step of compiling to a true native app is really worth the effort or not.
02-21-2011 04:49 AM
RIM has said that the only apps that they will allow on the device are those that are submitted through their app world, my guess is that this includes online only apps.
I recall from the webworks seimnars that you can make an online app by simply zipping an XML file pointing to your URL and then compiling it. What you want can probably be done in a dozen lines of XML. Someone else can point you in the right direction I'm sure, but it will be something like:
02-21-2011 05:08 AM
OK there's still a compilation phase which is presumably where Java comes in. If it can be done without the need for Eclipse - ie via the command line - then I'd be OK with that and interested to explore.
Just to compare with the iOS mechanism - "add to Home Screen" doesn't create an app as such, it just does 2 things:
1) adds an icon (of the developer's choice) on your home screen that provides an automated shortcut to the URL of the web app
2) fires up Safari without any "chrome" so it runs full-screen when the icon is clicked. With the kind of styling provided by a framework such as Sencha Touch, the result is something that looks like a Native App but which is actually a remotely-running web app.
There are no security issues as it's just a browser-based app running in the browser's sand-box, and no need for the extra overhead of submitting the app through an app store which can be useful to avoid at times.
Apart from the chore of adding such a mechanism to the Playbook, I can't see any reason why Blackberry would be averse to such an addition.
Anyway, many thanks for the info! Much appreciated
02-21-2011 06:22 AM
Theres no need to compile it with Java, and its all done with the command line, in fact I don't even have the webworks plugin, I use aptana.
All you would need to do is put that config.xml file into a zip file along with the icon.png file and run
wala you will have a compiled application ready for signing and sending to RIM.
I don't claim to know what RIM's plans are but they have stated that they want to keep the device closed and for applications to be installed only via blackberry app world, becaise the functionality to make these fullscreen website apps is so easy I would hazzard a guess that this is the only way to do it, but as I said I have no idea really.
02-21-2011 07:55 AM
There has been talk in the past around allowing a chromeless shortcut. So far, security has had a bit of an issue with it where people could create phishing attacks when a user can't see the URL bar of the website you are on.
I'm not sure if they will be changing their minds on this topic or not. When it's packaged in a webworks application you have it signed by the developer so if malicious things happen in the application there is tracability.
You can also create a webworks application that simply does exactly what you are talking about without packaging any local content.
Simply whitelist "*" for the domains, and have the <content> element point to the URL of your website. I understand that this doesn't have the simplicity of a chromeless browser icon, but it will yield the same end result.