Cross-platform HTML application options - ajax

I'd like to develop a stand-alone desktop application targeting Windows (XP through 7) and Mac (Tiger through Snow Leopard), and if possible iPhone and Android. In order to make it all work with as much common code as possible (and because it's the only thing I'm good at), I'd like to handle the main logic with HTML and JS. Using Adobe AIR is a possibility. And I think I can do this with various application wrappers, using .NET for Windows XP, Objective C for iPhone, Java for Android and native "widget" platform support for Mac and Windows Vista & 7 (though I'd like to keep the widget in the foreground, so the Mac dashboard isn't ideal). Does anyone have any suggestions on where to start? The two sticking points are:
I'll certainly need some form of persistent storage (cookies perhaps) to keep state between sessions
I'll also probably need access to remote data files, so if I use AJAX and the hosting HTML file resides on the device, it will need to be able to do cross-domain requests. I've done this on the iPhone without any problems, but I'd be surprised if this were possible on other platforms.
For me, Android and iPhone will be the easiest to handle, and it looks like I can use Adobe AIR to handle the rest. But I wanted to know if there are any other alternatives. Does anyone have any suggesions?

You might be interested in Appcelerator's Titanium. It's an alternative to Adobe AIR that lets you build native mobile and desktop apps using HTML and JS (with the WebKit rendering engine, so you can take full advantage of HTML5 and CSS3). It also satisfies your two sticking points:
SQLite is available for persistence storage.
There are no restrictions on cross-domain requests.
I used Titanium Desktop for a recent project and it was a relatively smooth development process. It's also open source so you have access to the full application at all times.
Check it out and let me know if it works for you.

You can create a desktop application with HTML, CSS & Javascript using either of the following two frameworks
TideSDK
AppJS
For mobile you can use the similar HTML and Javascript using PhoneGap

Related

Electron js: development differences between windows and mac

Context:
I'm starting to implement a cross-platform app for Windows and Mac with electron Js.
The bundle that will use or use this electron Js app is developed in Angular.
My questions are:
Are there differences when developing the app for windows and mac?
Differences in, for example, how it is handled at the code level:
Native menus.
Notifications.
System app events: Minimize, maximize, close.
Running the app in background.
If there are differences, should I indicate them at the code level or Electron Js take care of translating this to each system and I just develop generically without worrying about it?
If I have to indicate at the code level, should I have two projects or can I indicate in the same project that and when something is used for Windows and for Mac?
Electron is designed to be cross OS compatible.
There should be no difference between building an Electron application for Windows, MacOS or Linux.
Implementing the use of native menus, notifications, system app events (minimize, maximize, close), etc with Electron's API's will ensure your application is cross OS compatible.
Some features of Electron modules may be particular to only a certain OS but these are clearly defined and explained within Electron's Docs and API. EG: The movable option when creating a new window new BrowserWindow({movable: true}) can only be implemented on MacOS and Window, not Linux.
As Node.js is bundled with Electron, you will need to be mindful on how you implement some Node functions. EG: Directory separators will be different between Operating Systems so using methods such as path.join([...paths]) would be prudent to make you code cross OS compatible.
As Chromium is also bundled with Electron, keep in mind your use of any particularly new HTML features. Ensure you are not trying to use cutting edge HTML features which have not made it to the version of Chromium you are using within your version of Electron.
Lastly, Angular is a front end framework, this will not be affected by the type of OS used.
In summary, one code base, designed and coded well, will work without issue on Windows, MacOS or Linux.

Is there an Adobe AIR like product for just HTML5 (no flash) on Windows

I would like to create a Windows desktop app using HTML5 features, specifically H.264 video,Web SQL Database,FileReader API. I don't want to use AIR (which currently does not support the video tag, instead uses Flash). Ideally I would like an exe file that just wraps the latest version of webkit in a basic window. It should be stand alone, not rely on the user having Chrome etc. installed. It could load an index.html file in the same directory as the exe. That is it.
I have been unable to find anything like this. I was going to build it myself using QTWebkit but the latest version (4.8.0) does not support the Video tag due to some kind of build issue. I assume the 4.8.1 version will fix this.
Does anyone out there know of something like this that is available now?
For anyone coming across this, Titanium for desktop is no longer supported by Appcelerator, but the project is still supported as an open source initiative. As of today (10/14/2012), it is called TideSDK. According to their Twitter account, they're behind in the 1.3 release due to some sponsored work that will end up in the code base.
Additional options not yet mentioned include AppJS (OSS, requires node.js) and Sencha Desktop Packager (quite pricey).
I think titanium is not totally gone. There is this stuff called tideSdk
I couldn't try it out yet also , so video support and the codec are open for your exploration. Here is how they say:
Create multi-platform desktop apps with HTML5, CSS3 and JavaScript
TideSDK is the new standard for creating beautiful and unique desktop
apps using your web development skills.
I recently thought about doing the same thing, you can still do it with air without using flash, but you could also use Chrome Packaged apps, mozilla prism (although inactive today) or Microsoft HTA (html application).
You can think of using a framework that does the browser embedding for you like Titanium. It's mostly used for creating apps that can be published to iphone, android, and windows devices. It will create a windows MSI install.
Another option is to use the CEF project ( Chromium Embedded Framework for C/C++). I havn't looked at it much, so I can't tell you how difficult/easy it is to work with. Their main site also has wrappers for Java, .NET, and other languages.

iPad development without a mac

I am interested in developing an app for my new iPad purely for my own use. (well to start with at least)
Is there a way to develop an app without a mac?
Can I install the app only on my own iPad without having to sign up to the right to publish it when I might not even want to do that?
EDIT:
Could i use an old G3 powerbook for development? They can be picked up really cheap on ebay. Would something of that spec be up to running the xcode development environment?
I think the best option is to develop the application using HTML5 / Javascript and CSS, and use a service like appMobi or PhoneGap to compile it for IOS. They both have an online service that can make the build for you without needing you to own a Mac.
You have also the added advantage that you can compile your app not only for IOS, but for Windows Mobile, Android, Blackberry and even the good old web.
You have some Javascript libraries like JQTouch that allows you to easily implement the IPhone look and feel in your web app. Normally you can't access the native API from Javascript, but these solutions (appMobi and PhoneGap) offers a Javascript API that you can use to access Camera, GPS, Gyro, etc...
I think normally serious apps are coded for many platforms, and if you don't have the structure to pay to 4 different skill sets, it makes sense to code in HTML5, and from there you have a more future and device proof solution. Even if you "can" pay different developers to code in diffrent mobile platforms I would prefer to do it in HTML5.
Oh, and also take a look at applicationcraft.com, pretty cool online IDE (wysiwyg) connected to PhoneGap, really easy to develop prototypes. The generated HTML/Javascript is not very usefull to continue editing it outside their IDE (a bit complicated), but, again, for something very simple or a prototype it's something you must check out.
Good Luck
Is there a way to develop an app without a mac?
Officially, no. Realistically, unless you like wasting countless hours, no.
Can I install the app only on my own iPad without having to sign up to the right to publish it when I might not even want to do that?
No, you must be a paid developer in order to push to anything but the simulator.
xcode for windows.
http://ipodtoucher55.blogspot.com/2010/12/installing-ios-sdk-and-xcode-on-windows.html
Yes, you can develop without apple computer (using hackintosh).
And yes, you can install the developed app on your iPad without having to pay for developer program. There are a tons of guides over the internet about running (thus installing) apps on ios devices without developer program.
check this:
How can I deploy an iPhone application from Xcode to a real iPhone device?
You can develop for iOS without a Mac by using Adobe Flex. The Flex SDK is free and Open Source, and includes a compiler + packager. If you want an IDE, you can get Adobe FlashBuilder (not free, but with a free 90-day trial), which makes your development time much more productive.
You would not develop in C, C++, or Objective C, but in a combination of ActionScript (a dialect of Javascript) and MXML (markup language, mainly for rich GUI layout).
On the minus side: you have less control over what you can do (you can still do a lot) and you cannot use the iOS SDK directly.
On the plus side: it is very easy to develop great looking apps, and with very little changes, you can recompile them for Android, Blackberry Playbook, Windows, and Mac OS X.
You do not technically need a Mac to develop an app, unless you are serious about it. There are couple of solutions available to you for developing mac-less.
First, there are some services that port your HTML5 web apps into an iOS app, so you only need to write your code HTML5.
Second, if you dont want to buy a Mac, you can instead buy Snow Leopard or Lion, and build your own "hackintosh" (a windows computer hacked to run off the mac operating system).
Finally, you cannot make your app available for purchase in the App Store unless you are a paid developer. However, you could publish online as an HTML5 web application, or you could publish your app in a third-party app developer market (however you could only intall that app if you jailbreak your iPad).
Not sure how new this is, but Dragon Fire SDK is 100% Windows based (you do submit your code to them for compilation), but at no time are you required to own a Mac.

Can I create a cross platform application with HTML5?

I have to target Windows, MacOS, iOS and Android. My plan was to create separate applications for each platform.
However, I am now considering making an HTML5 website (that has different presentations based upon the device being used).
I can create a wrapper for each platform. Windows can include a Webkit control, iOS will have Safari, etc...
The wrapper will load the HTML5 pages into the browser and negotiate input/output for persistance. I can use WebSockets for communication with the outside world (ie. my server).
What am I missing here? What else would be required and what would be the obstacles I would have to overcome?
Best option for making cross platform applications is PhoneGap.
In PhoneGap you write HTML5 and JS code, it provides access of native APIs using JS code and allows you to compile your application and submit to different App stores.
http://www.phonegap.com

How to embed a web browser control in a cross-platform application?

I need to write quickly this application: a simple window that wraps
a web browser control, that runs html pages.
The Browser UI (e.g. Navigation buttons) should be suppressed.
As a .net developer, I would embed the WebBrowser OCX in a Windows Form.
But this has to run on Mac as well!
I found the following cross-platform candidates.
Which one would you choose (in terms of simplicity, stableness, community support, etc.):
wxWidgets: http://www.kirix.com/labs/wxwebconnect.html
QT: http://www.youtube.com/watch?v=Ee8eRwjbcFk&feature=related
MONO: http://www.mono-project.com/WebBrowser
Why not to use embedded Webkit?
QtWebkit:
The Qt port of WebKit currently compiles and runs on Linux (including Maemo), Windows, Mac OS X and Symbian.
Click here for build instructions.
A very simple test browser is built along with the port.
Since you have (assumption made from your post) .Net experience I'd go with Mono.
Have you considered Adobe AIR?
http://www.adobe.com/products/air/
Mono is probably the best choice if you're primarily a .NET developer and don't care very much about making a well-integrated Mac app (one that behaves like a Mac app in all the many ways Mac users expect). Given your problem space, that sounds like where you are. That said, pay special attention to this limitation from the WebBrowser page if it applies to your problem:
The Mono Webbrowser currently lacks
support for window.external, the
bridge that allows Javascript code
embedded in the browser to communicate
with the managed world using the
ObjectForScripting.
QT is very well established, and a great platform if you want to develop this in C++. Remember that there are licensing fees if this is a commercial app.
I've played a bit with wxWidgets. It's big advantage here is that it's probably going to be the smallest distribution, since you only have to include what you need. If all you need is the web browser, I'd look at this, but in my experience it's hard to make wxWidgets programs look good or act correctly on Mac (or on Windows for that matter).
Another option may be to write it as a Java app using the Eclipse Standard Widget Toolkit. This includes a browser control that embeds IE, Safari or Firefox, depending on the current platform, and generally behaves well on OS X.

Resources