I have built a multi-touch application which is based on a Java EE backend and combined with BlazeDS to a Adobe Flex frontend. The application runs on a DIY-Multi-Touch which I built. Now I want to use another solution. The Adobe Flex frontend (with a multitouch library) and the BlazeDS adapter should be replaced by a solution which covers iPhone/iPad, Android and commercial Multi-Touch displays.
The problem is the iPad/iPhone, there is no Flash Player runtime (not the jail-breaked ones), but the application should be runnable also on those devices. So Adobe Flex and a Java frontend (no JVM on the iPhone/iPad) is not possible anymore. At first, starting the developing of the application it was not neccessary, to run it on Apples mobile devices, but this changed :-(
So, what can I do, using HTML5? So I can use it for Android and iPhone/iPad. But I also want to make it possible to use it on a commercial multi-touch-display and normal display with a mouse (I only have gestures for one finger, the 2-finger gestures are not neccessary). Are there any frameworks that allow this? Because I do not want to create several frontends (App for iPhone/iPad on Objective-C and a Adobe Flex for all other devices), it would be great if I can build a frontend for all devices.
Does anyone know how I could realize this?
Best Regards Tim
Take a look at Sencha Touch, it's a HTML5 framework dedicated to iOS and Android devices, which should make it relatively easy to build web apps that feel like native apps on those devices.
The Adobe Flex frontend (with a
multitouch library) and the BlazeDS
adapter should be replaced by a
solution which covers iPhone/iPad,
Android and commercial Multi-Touch
displays.
Android 2.2 and higher supports the full Flash Player, and therefore also supports Flex applications. However, Adobe has spoken of improving such support for the next Flex release, expected out early next year.
Apple has kind of specifically said they want to prevent the type cross platform development you're trying to accomplish.
Without knowing, or seeing, your application it is hard to say whether HTML5 will support you. But, yes, many parts of HTML5 should work across multiple browsers.
You may want to investigate Elips Studio which brings ActionScript applications to multiple devices including apple devices.
Related
Though we can develop the i-phone application in the X-code
Why we need to use the Airplay-sdk?
can anybody differentiate between them?
I use Airplay SDK (see www.immortalcode.com) and it works well. Their code has been evolving, but it is pretty solid now. The big advantage for me is to be able to keep my source code in C++, and to be able to use a single code base for multiple platforms. I have built multiplatform games (iPhone, Android, bada, Windows) all from Visual Studio on Windows. The main caveat with Airplay SDK is that you may not get access to all the functionality you would normally have on a given platform. In particular, you probably won't get the native UI look and feel, and you may not have important options like using the ad provider of your choice. My understanding is that they've recently made strides in opening up the full range of native APIs on iPhone and Android, but still I think there will likely be problems when it comes to certain highly platform dependent stuff. Again, working with certain ad providers comes to mind as the main example.
You don't need to use the AirPlay SDK. You can write an iPhone app without it.
Airplay is a cross platform development solution allowing you to write applications for iOS, Android and other smart phone and tablet devices.
It differs from Xcode in that Xcode is an Integrated Development Environment (IDE) with support for writing (mainly, but not only) Mac OS and iOS applications.
Airplay is a Software Development Kit (SDK). It is not in itself an IDE. You still need to use an IDE in order to write applications, and it appears that Airplay works with both Visual Studio on Windows and Xcode on Mac OS X.
It appears that Airplay uses C++ as it's main language, providing access to iOS APIs through a wrapper of some kind. It also appears to have its own UI library, meaning your app will look the same on all devices, but not the same as other apps written natively for each respective platform.
Airplay SDK is a C/C++ programming environment that supports multiple mobile platforms. It consists of several wrappers to native libraries for various mobile OSes and consoles ( Iphone, Android and Symbian amongst them ) and of a cross compiler ( gcc under the covers ) that integrates with Visual studio ( on Windows) and Xcode ( on Mac ). The wrappers provide an uniform programming interface among all supported operative systems. Basically you develop on your desktop and then you deploy on multiple platforms with a single click. The SDK is fair complete covering 3D and 2D graphics, a basic UI framework, sound and resource managment facilities for example. The main drawback is that multithread is not supported and that it may be problematic to use native features of a given OS. Also the GUI system doesn't provide out of the box the same elegance and look and feel one can found on the Iphone or Android. On Android, Iphone and Windows there is an extension mechaninms that allows one to link native libraries. I am using it to develop a 2d platform with Iphone and Android as the main targets. I found that the programming model proposed by Airplay suits a videogame very well but it may be inconvenient for GUI-heavy applications. However the framework is extremely solid and works well and I haven't found bugs so the code is well tested. If you are planning to develop a multi-platform game you should definitely give it a try. If you need to have more control on what happens under the covers and you would like to use native features I would also consider COCOS2D-X (http://www.cocos2d-x.org/) as an alternative.
The project is still immature and has a few bugs but I have tried it and I found it extremely promising. Moreover you have full source code: if you find a bug or need an extension you are free to provide your own solution.
Marmalade / AirPlay SDK will be providing access to native UI's in a forthcoming release. Check out their road map at http://www.madewithmarmalade.com/marmalade/releases-and-roadmap
If I wanted to develop my mobile app's front end using js,css,html in order to target both Android and iPhone, what gotchas do I need to look out for?
I'm not looking for the comparison of native vs web development as much as I'm concerned about performance and development issues.
I've been doing a fair amount of research into this, below are a few of the main problems i found.
Touch events are inconsistent across different devices.
There isn't any good way to perform fixed positions. Which would be required for a simple title bar.
Currently there is no framework that supports multiple resolution devices, i.e. the UI looks pixilated on the new iPhone 4 retina display.
Mobile devices have small amounts of memory and slow CPUs, the use of any mainstream JavaScript framework significantly reduces performance (including jQuery).
Make sure you use WebKit animations/transitions rather than performing the animations in JavaScript (this utilizes hardware acceleration).
I cant think of any more right now, but when i do i'll let you know.
Android currently doesn't have hardware acceleration in the browser, but that's changing in 3.0 - http://android-developers.blogspot.com/2011/03/android-30-hardware-acceleration.html.
If you are using native scrolling (preferred on Android at the moment), make sure you handle touch correctly so that when you scroll touchstart isn't immediately opening new views.
LocalStorage is fast. You can store JSON in LocalStorage by using JSON's stringify and parse. HTML Database with SQLite is slower.
Sencha is beautiful, but restricting. jQueryMobile has a strong support base with great feature set, but still buggy.
Google Closure Compiler has issues with PhoneGap, and other libraries. May want to use YUICompressor.
In Android, use native choices for maps and menus. Maps are a link to google maps. Menus are lists stylized a button (see jQueryMobile).
Use a templating engine like Mustache or Handlebars. Handlebars allows for logic and helpers, plus all the goodies Mustache supplies.
CSS3 tables are your friend for 100% flexible content buckets.
Check out PhoneGap plugins in Github. There's a ContactView I wrote for Android for the company I work for - http://www.reardencommerce.com, where we are building html5 apps in javascript and node.js.
AJAX cross-domain or from local file system works on mobile. It also works on Safari Mac only if you read app from file:// protocol.
There are settings you can change in Chrome windows/mac to allow cross-domain AJAX, but it lowers your security levels. You may get viruses.
Too many CSS3 Gradients greatly slow down your app.
Drop Shadows, gradients, and rounded corners with CSS3 aren't pretty on Android.
I often use GWT for web UIs. I have heard of it being used a fair bit in conjunction with Gears for offline solutions (probably nowadays HTML5 "offline storage" is all the rage) and I'd like to experiment with building a GUI in GWT and use it on my iPad. Tips/tutorials on how to deploy it onto the device to act as much as possible like a resident "App"? This is just a curiosity/experiment to fill a week-end... (I can "free" the iPad for the experiment if need be yet I am sure a lot can be done without doing so...)
phonegap(now Apache cordova) makes available the ios/android native features like camera,device file management,contacts,geolocation etc to our app.
GWT and mgwt :::
Using mgwt,gwt( both are opensource) and GwtPhonegap we can develop cross platform mobile applications which can behave exactly like native apps. in performance perspective these apps are bit slow when compared with native apps but the convenience is that the app can be installed in multiple platforms.
GwtPhonegap
GwtPhonegap acts like a bridge(provides abstraction) between device native functionalities and to our app. We can get good look and feel using css.
We have support for gwt-html5-database for which to perform cache storage.gwt-html5
Try using gwt in conjunction with phone gap. It will expose many of the native Apis to make them available for use in gwt.
https://code.google.com/p/gwt-phonegap/wiki/GettingStarted
Additionally I've had very good experiences using the m-gwt as a UI framework. MGWT makes creating native looking UIs using CSS+JS very easy.
http://www.m-gwt.com/
I'm looking to create a mobile version of our website/web app. What's a good way to provide the best, most fully featured version.
Part of the reason for creating it is instead of an iPhone app, so I'd like to offer an iPhone web app that takes full advantage of the iPhone's version of WebKit (so CSS animations, being able to rely on good javascript support etc). However, I'd also like the site to work well on other smart phones as well as more basic mobile phones as well.
Do I create two sites (Mobile WebKit and basic mobile web) and redirect based on User Agent? Can I create one site that degrades well? What are the possibilities, and how do other people handle it?
Also: are mobile web simulators worth a damn? I have an iPhone, so can test easily on that. If I want to test on Blackberry/Palm Pre do I really need a device or are there reliable simulators?
These are some of the iPhone specific libraries that provide a native look and feel on webkit:
iUi
jQTouch
Sencha Touch
iWebkit
Getting it to work on most phones will definitely be an issue with most libraries as they are built around with the iPhone's screen size (320x480) in mind.
To get a wider coverage of devices including Android and J2ME phones, checkout Yahoo Blueprint. It's a markup language that translates for various platforms and devices.
You could either get the mobile view based on User Agent by dynamically switching the stylesheet on your server when spitting the page. This is not a recommended approach though for heavy-duty pages as you will still be sending huge chunks of data that would not be rendered. Alternatively, if you have a clear separation of your views, you can templatize the view based on User Agent and/or other parameters. This has the advantage of keeping your controller logic in one place with only changing views. You could use the above libraries for iPhone/iPod Touch and switch to a simpler mobile version for other smartphones or tweak it as you want.
Creating a separate mobile version of the site can be painstakingly difficult to maintain when changes arise.
The iPhone and Android simulators are as close as it gets to the real deal. The iPhone won't let you do stuff like make calls on the simulator for obvious reasons, but the Android provides mock implementations for basically everything on the device.
Recently we are going to develop some products on mobile phone (specially for 3g). There are many platforms about mobile phones: iPhone OS, Symbian, Blackberry's. If I want to develop a product, should I use Java or write every program for the main platforms?
Particular one question for iPhone development: are there many Java programs on iPhone? Most iphone app I've seen are developed by their own xCode.
I need some guidance on how to do coding for mobiles correctly.
All these platforms are completely different beasts as in the old days. About symbian, (which I am most familiar with) you can use Qt for quality native applications. Native api is confusing so avoid it where possible. If your application is simple, you can even get away with python.
In short, use the language which you are most productive available for each platform. Their apis are wildly different anyway. Language choice doesn't matter as much as the choice of platforms you are supporting.
Java is not available for use on the iPhone; you can use Objective-C, C and C++ to develop iPhone applications.
There is currently no Java for iPhone, so you need to develop separately for iPhone in objective C.
Alternatively you can create application which runs in web browser, it'll be available on all platforms, but not every application is suitable for web.
Have you considered you using web technologies?
There are a couple of cross platform tool kits for iPhone and Android. They work in the same fashion as Adobe Air. Allowing you to make HTML/JS based web app and run it as native code in the browser.
Titanium Mobile (Android & iPhone) HTML/CSS/JS
Corona iPhone Only via Lua
Palm's Web OS is also based on web technologies.
Finally the old guard, Symbian Provides a Web Widgets system, that works in on all handsets with 9.2 fp 2 installed (n95,e72, n97 etc.) The api supports some hardware functionality.
The only one left out in the cold is Windows Mobile. There is some 3rd party support in the form of Web Widgets by torch mobile
It's currently limited to iPhone, BlackBerry, and Android (and possibly WinMo) but you may want to check out the open source project called PhoneGap. I think it is basically just a native wrapper around the built in web browser for each device, but it does expose some functionality not normally available in that environment such as geolocation, accelerometer, sound, etc.