Developing a cross-platform self-contained HTML application - javascript

I am thinking of building an application, kind of like TiddlyWiki in the sense that everything is self-contained in an HTML file, or at least in a bundle where a user won't have to install anything. It works on just about any browser, and on mobile phones (Android and iPhone), and in some browsers (e.g. Firefox), manages to save to the local filesystem without a plugin (albeit, it launches many security warnings, but there are other solutions for that). Other browsers happen to use a Java plugin to bypass this restriction.
Are there any technologies that exist that make this possible? HTML5's web storage sounds like it would be almost perfect, except that the data would be tied to the browser.
Any assistance would be appreciated (even if that just means editting / retagging the question to get more folks looking).

Whats about the fileapi: http://caniuse.com/#search=fileapi

I am just adding a relevant comment with this but not exactly an answer...
When you are saying that you want to develop application which contains everything... Then I would like to add about Titanium, PhoneGap, and others (Corona)...
This softwares provides JavaScript base which will be running on all the mobiles (if mobile applications), desktops (if desktop applications) and so on.... But Titanium (as i am working on it) works on the SDK of all the other languages for development...
Now TiddlyWiki, what i have understood from the link is that it is creating a web application or something like that which will work on all the other mobile devices. But this is NOT Good always, Since some application needs to be a NATIVE environment (which is supported by Titanium). Native applications will be much more faster than any other developed applications..

Related

Is there an HTA-like solution for modern web apps?

I have been developing an app using HTML, CSS, and JS, using the App Mode command line argument for Google Chrome. It works nice, but I would like some ability to use the local file system without manual input from the user. That is, if I want a file accessed directly, I want it automatically done, not requiring the user to load the file in.
One option is to disable web security, which I'm not doing because there is a need to use Google Chrome normally. I haven't been able to use a command line argument to create a separate instance of Chrome, either.
I tried working on an HTA, but any attempt to port the code to HTA ends in headaches. Also, it doesn't seem to enjoy the perks that Blink/Webkit grants.
I looked into Electron and other similar platforms, and it requires installing a handful of things, which is a no-go due to the computer setup.
Are there any solutions with a sort of portable app, that can be dropped in a folder with the HTML document (say, labeled index.html or main.html), and upon opening the browser it directly opens that file without having to configure anything? A sort of barebones chromium-based browser that only opens a single file, allowing use of HTML, JS, CSS, along with local file access? Kind of like HTA but modern?
The good news, is that it does exist, but it's not as "out-of-the-box" as HTA.
My team has migrated from HTA to WebView2.
The overall approach is to build a program with the WebView2 browser (you're basically building your own HTA like browser). Your javascript code can communicate back and forth with the program, which in turn has full access to local resources.
WebView2 is the Microsoft Edge Chromium browser, so you're getting the latest web tech and layouts (a big pain for HTA dev.). The program that contains the WebView2 control has full access to local files, scales, printers (without a pop-up dialog).
The approach has all the benefits of HTA (html / javascript programming, local file access, web based deployment, etc.), plus all layout and other benefits of a modern browser.
The program you'll build is very small, especially compared with the HUGE runtime of similar solutions, like Electron.
Rick Strahl has an excellent article on WebView2, and tips for building the program I'm describing. He has great advice on how to build an installer for it, including "Evergreen", which keeps the WebView2 up-to-date with the latest browser tech.
Microsoft's introduction to the technology here.
https://learn.microsoft.com/en-us/microsoft-edge/webview2/

Substituting HTML/Javascript Sidebar Gadgets?

I am a web developer and have a Windows Sidebar Gadget written in HTML/Javascript. It's very popular (500 000+ downloads) and users are requesting solutions for Windows 8 since gadget support has been removed. Microsoft will also remove the sidebar functionality in Windows 7.
What platform/SDK options are there for substituting a sidebar gadget?
I get all kinds of results from Google but none seems like an obvious choice. Adobe Air seems like a whole new piece of technology that requires a lot of learning. Simplicity is key and it's the main reason why i am so attached to sidebar gadgets.
These are the requirements:
Runs on Windows
HTML, Javascript, AJAX based
Support for no window decoration (no titlebar, minimize- or close button)
Minimum platform/SDK wrappers
Ability to read/write xml data to disk
Bonus would be if:
It also runs on Linux and Mac
SDK/Platform dependencies could be included in the app package
Super-duper bonus would be if:
The SDK is supported on handheld devices such as iOS and Android.
Take a look at XUL. Meet all you check list:
Runs on Windows
HTML, Javascript, AJAX based
Support for no window decoration (no titlebar, minimize- or close button)
Minimum platform/SDK wrappers
Ability to read/write xml data to disk
It also runs on Linux and Mac
Here you can find what is it. I hope it helps buddy.
For those who stumbled upon this thread and looking for a way to create HTML/javascript desktop applications. I'm just gonna list AppJS as another potential SDK. The framework to embed with your scripts is 50 MB.
http://appjs.org/
TideSDK seems like another multiplatform option similar to AppJS.
http://www.tidesdk.org/

Would Apple allow V8-powered Javascript apps on iOS?

There's been a lot of talk about Google being forced to go with UIWebView for Chrome for iOS, and Facebook ditching HTML5 entirely for their iOS apps because UIWebView was too slow. I'll soon be needing to port an HTML5 application that requires lots of intensive Javascript computations (too much code to rewrite natively given my time constraints) but none of the display functionality that a browser provides (i.e. it works fine headlessly on Node.js). I've never heard of anyone trying to embed Google's V8 into an iOS app, but given that MobiRuby does practically the same thing (linking in the mruby interpreter), would it be permissible to do something similar, linking in Google's V8 interpreter within the same process? As long as code isn't downloaded, and processes aren't forked, it doesn't seem to be against the rules, but has anyone ever tried this?
EDIT: I'm aware of PhoneGap/Cordova and similar technologies, but they all work with a full UIWebView, and due to Apple's paranoia, UIWebView cannot JIT-compile Javascript code (which, as I said, is essential for my application).
According to what is mentioned in this this thread on the v8-dev mailing list, it may now be possible. You may be interested in the state of the work on this issue.

Desktop application development with Javascript and HTML

I am looking for Titanium Appcelerator alternatives for Desktop application development with HTML and JavaScript. I want to convert a web app to a desktop application. Hence, there will be a lot of server interaction. Appcelerator was a good choice, but it looks like the company is no longer interested in the Desktop SDK. Also, ajax request from Appcelerator does not retain cookies.
I read that Adobe Air can be used for desktop app development, but I don't want to use flash.
How good is XULRunner? Will it allow features like Growl notificaiton and creating tray icons?
Will I be able to develop applications using mostly Javascript and HTML in Qt?
I started looking into Titanium for desktop dev. I liked the concept but not the implementation. I then stumbled upon chromiumembedded and have been mostly very happy with it. It's basically a web browser control based on chromium.
http://code.google.com/p/chromiumembedded/
It's written in C++ so you can do all the low level OS stuff you want(Growl, tray icons, local file access, com ports, etc) in your container app, and then all the application logic and gui in html/javascript. It allows you to intercept any http request to either serve local resources or perform some custom action. For example, a request to http://localapp.com/SetTrayIconState?state=active could be intercepted by the container and then call the C++ function to update the tray icon.
It also allows you to create functions that can be called directly from javascript.
My biggest challenge has been debuging. It's very difficult to debug javascript directly in CEF. There's no support for anything like Firebug that I am aware of.
Appjs (appjs.org) looks very promising.
You could also check Bowline which is another alternative: http://bowlineapp.com/.
Although it's not officially intended for general-purpose use, a number of people have had success using brackets-shell for HTML/JS desktop apps. It embeds Chromium (CEF) and adds APIs for menu bar management and file IO. It also embeds an instance of Node.js so you get access to all its APIs for launching processes, etc. It's MIT-licensed and available for Mac & Win, with a Linux version currently making rapid progress.
As I mentioned, it's not officially a general-purpose app shell, but someone wrote a detailed blog post about how to customize brackets-shell for your own uses.
I notice that the other answer about Titanum says CEF is hard to debug. I'm not sure if that's true in Titanium, but in brackets-shell it's easy to debug JS – you just open http://localhost:9234/ to load a full instance of the Chrome Developer Tools (including breakpoints, profiling, etc.).
TideSDK is a continuation of the old Titanium desktop http://www.tidesdk.org/

Is the Android Emulator browser suitable and reliable for testing an HTML/Javascript Application?

I'm developing an HTML / Javascript application meant to run on an Android device running Froyo (2.2). Assuming I don't need multitouch functionality, will the emulator's browser be a reliable means of debugging HTML, CSS and Javascript? Or is it possible that I would work out all the bugs in the emulator but find the actual device handles things differently?
The underlying code for WebKit is identical in the emulator and the actual device. The only thing you need to worry about are the other components inbetween (some carriers have proxies, for example. I used to have problems with T-Mobile where it would simply send me a outdated cached version of a site instead of even contacting the site).

Categories

Resources