Executable HTML/Javascript Applications on the Desktop? - firefox

I'm wondering if there is a way to create a Desktop Application that is essentially a Browser, except that it only runs my Application, doesn't need installation and is a static executable that contains the HTML/Images/CSS/JavaScript packaged into it, with an option to access arbitary embedded resources through JavaScript?
I believe Mozilla/Firefox allows this through their XUL Framework, which is actually used for Applications (see Celtx). However, the last time I looked into it (~3 years ago), it was a horrible experience and overly complicated.
Has this changed? Or is there a WebKit based option?

You should try Chromeless.

.. doesn't need installation and is a static executable that contains the HTML/Images/CSS/JavaScript packaged into it, with an option to access arbitary embedded resources through JavaScript?
Chrome supports .crx files which is essentially a zip file with the resources archived into it. It doesn't technically require installation since it's run on the Chrome browser itself.
I know it's not directly relevant to your question but I think building web apps with HTML5, CSS3 and JavaScript is the way to go. You can even package it and have it install like an app and distribute it via an app store even.

I went with XULRunner in the end. The latest version is much improved over the one I looked at several years ago.

You could use NW.JS:
https://github.com/nwjs/nw.js
NW.js is an app runtime based on Chromium and node.js. You can write
native apps in HTML and JavaScript with NW.js. It also lets you call
Node.js modules directly from the DOM and enables a new way of writing
native applications with all Web technologies.
Basically you create a folder with your entire html app. On Windows, just add 4 files (or more depending on your needs): package.json, nw.exe, nw.pak, and icudtl.dat. When you run nw.exe, your app will launch in a packaged version of chrome with node.js support. You can access the file system using node commands directly from your original html.
The drawbacks: NW adds ~60MB to your application and additional memory overhead.

Related

Are there standalone libraries for Firefox Sync?

For example, I'd like to write a script that retrieves all my bookmarks that contain the word "html5" in the title, and adds the tag "web-development" to those bookmarks.
I know there is an Client API specification, but it seems like a complicated protocol, and I figure someone must have developed a library already. It's hard to see which documentation and libraries are up-to-date. There's this page on the Mozilla Wiki, but it has this message:
Warning: Most of the information on this page is outdated. Weave has been renamed Firefox Sync and is now part of Firefox 4. Many APIs documented here have evolved.
What's the current version of the Firefox Sync protocol used?
I've found this code inside Android Sync (a month old), and weaveclient-python (2 years old). Are there any standalone libraries I can use in my own programs?
It seems no stand-alone lib to use. You can also check shaman's project page
https://github.com/emergentdotorg/shaman
Hope this can help.
There is a FirefoxData-android library which can help you to integrate an Android app with Firefox Sync https://github.com/mozilla-mobile/FirefoxData-android

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.

Fastest/easiest way to build a WebKit based Windows application?

I am a web developer. I don't know how to build native Windows applications. I recently built a Mac desktop application (using MacRuby) which is a WebKit wrapper around one of my web applications. I'd like to do the same thing for Windows (preferably in Ruby, but whatever is easiest).
Since this is not the core of the application, I'd rather not spend a lot of time trying to build and maintain it. I just need a Windows application that can:
Open a specific website on application launch using an embedded WebKit WebView
Trigger Growl notifications via JavaScript (with some sort of named bridge)
What is the easiest, fastest, cleanest way to do this?
Update: So far I've come across some frameworks like Qt and Awesomium. I don't know how these frameworks compare to other options available, so if you have any opinions or advice, I would appreciate it.
Check out http://appjs.org/ it's built with NodeJS at its core! And it uses chromium webkit at it's core :D
Well, this is a very old question, but if you are still interested...
I'd recommend Qt. There are some very good books available with a lot of boilerplate code and wizard-type tools. You will be able to find example code demonstrating the embedded Webkit that you can modify to suit your needs. It is free and redistribution is free (last I knew). You won't have to know anything about native Windows development, nor even use any native Windows dev tools.
Good luck!

writing an abstract code for windows and the web?

I hope this isn't a stupid question:
I wonder if there’s a way to build a web client and a windows desktop client (that looks the same and offer the same features) with the same code (not just same language), at least till a certain point - in other words, having an abstract code that will fit the web server and windows?
Thanks!
You should take a look at Adobe's FLEX, you can have same classes/layout for both web apps (run under Flash) and desktop app (run under AIR). The only difference will be in the main file, you will have one for each flash and air app. (The rest of code will can be compiled into one SWF, also have in mind that you should use same functionalities for both web and desktop )
I believe Java can do what you want, with minor modifications to have it run as a full-blown desktop application vs a Java applet.
One thing you'll need to do, is ensure that for the app, your main function is very small (ie, only call the main JFrame or whatever), and replicate that simple call in the applet code.
For the differences between the two, see for example, here and here. You'll need exactly one tiny source file that's different for the applet vs application.
Real Studio will also let you do this to some extent. Newer versions can create web applications and desktop applications. Non-UI code can be shared with web and desktop apps. The UI code will have to be different, though.

Recommended way of deploying cross-platform mac application

I am working on a job where we are developing a set of cross-platform applications using C++, Qt, and CMake (among other things). On the Mac we run into the problem that we need to package all of our shared libraries into each .app (currently there are 4 of them), which causes the size of the download and install to get large fairly rapidly.
We want to remain friendly to the Mac way of doing things, which means that we want to support the capacity to drag and drop applications. Does anybody have any ideas on how to do this while keeping the total size down?
The project is currently a set of four executables or apps that each use a common set of shared libraries (qt and in-house). There is also a set of ruby bindings that rely on the in-house libraries. I realize that you could probably create a Framework and install it in System/Library/Frameworks, but I haven't read about that much yet. Doing that way seems like it would break the ability to drag and drop the app between machines.
Does anybody know of any examples of applications that do a similar thing on the Mac? Any creative ideas would be most welcome.
Make an installer, preferably using the standard package maker which comes with XCode tools.
Having an installer for a suite of applications is not that uncommon. Apple's own iWork has an installer and shares libraries.
Making a standard .pkg is important if you want to distribute your app to a corporate customer: the IT admin would want to automate the install process remotely, which is possible for a standard .pkg but not if you write a custom installer yourself.
As for the file placements, you should understand File System Domains as described by Apple. Basically, all the directory structure is repeated three times:
/System/ : system domain
/ : local domain
/Users/name : user's domain
The first is reserved by Apple. The second is for things shared by users on a machine. The third is for a specific user.
The shared objects are put into directories called Library. So we have
/System/Library
/Library
/Users/name/Library
You'll typically install things in the last two. Inside Library, the directories should be organized as described here. Typically you put the frameworks in
Library/Frameworks/
or
Library/Application Support/your_app/Frameworks/

Resources