-
26 Mar 2010 6:29 PM #1
Native Bridge
Native Bridge
Hi,
I'm working on a pet project and wanted to see if its something people find interesting enough that I will develop it fully and release it.
Basically, it _currently_ does the following, entirely asynchronously via callbacks to your app:
- Read/Write Local and temporary files on the client machine
- Get directory listings on client machine
- Perform HTTP POST/GET operations across domains and get the results
- Create native 'system tray' menus with callbacks into your javascript.
For example, to read a local disk file and POST to a URL:
It can also prompt with the native Save As or Load dialog to browse the local file system and perform loads or saves.Code:var quark = new Quark(); // Non-blocking native operations quark.readLocalFile('/tmp/test.txt',function(data) { // Callback containing the read file data alert(data); }); quark.postToUrl('http://someotherhost/post.php',{ 'username':'user', 'passwd':'P123' }, function(response) { // POST response sent here when completed });
It can do this WITHOUT a client-side installer and works across all platforms, Windows, Mac, Linux.
Useful? Redundant? Am I re-inventing the wheel?
thanks.
-
27 Mar 2010 3:46 AM #2
Also forgot to mention that it requires ExtJS, so its for ExtJS apps.
-
27 Mar 2010 6:48 AM #3
-
27 Mar 2010 6:53 AM #4
Digitally signed, trusted Java applet hidden in the page. Then JavaScript<->Applet. Works great.
I'm going to add a lot of useful features I think like:
- ftp
- media
- native app launching
What else?
The cool thing about my approach over Air and Google Gears, again, is no client installer. All secure through browser security model. And works same across all platforms. No need to re-compile Air app for different platforms. No C++, etc.
Seems to work so far.
-
27 Mar 2010 9:38 AM #5
There are some things to mention. First of all, you have to have Java installed. Secondly, you have to trust the certificate owner (are you sure, everybody trusts you?). If you want to sign it yourself you have to buy a certificate which is IMHO expensive...
The desktop integration is good in Java but I think it's not that far as with Air.
-
27 Mar 2010 1:52 PM #6
Yes. You are right on those points. Java is installed with most browsers and OS's by default. At least moreso than installing Air or Gears which is never installed by default.
The act of trusting the Java applet is necessary. My company will produce the applet and get the appropriate Verisign/Thawte certs behind it. And its a good point to make.
Aside from that, the technique alone I think is better since it is sandbox security and not permanently installed on a users computer. So its good for distributing to users in a company, etc.
Thanks for the comments.
-
29 Mar 2010 8:05 AM #7
-
29 Mar 2010 8:16 AM #8Sencha - Community Support Team
- Join Date
- Nov 2008
- Location
- San Diego, Peoples' Republic of California
- Posts
- 2,040
- Vote Rating
- 7
Can be done with flash. I think 99.999% of browsers have flash already installed.
Can do the javascript <-> flash thing.SilkJS - Server Side JavaScript Swiss Army Knife and HTTP Server
Powerful, flexible, advanced charting for ExtJS and Touch: http://zingchart.com
Javascript rocks. Even on the server-side:
ExtJS Forums' Server-Side Javascript Social Group
-
29 Mar 2010 11:40 AM #9
No. You can't use the native tray with the flash plugin.
Definitely not
Although it has many installation there are many old Flash installations (e.g. version 7) out there. If you look at the current HTML 5 discussions I think that Flash will loose in the future. But there are more Flash installations than Java installations, that's for sure.
-
29 Mar 2010 11:47 AM #10Sencha - Community Support Team
- Join Date
- Nov 2008
- Location
- San Diego, Peoples' Republic of California
- Posts
- 2,040
- Vote Rating
- 7
All but the system tray can be done with flash.
I'd add the ability to do pure socket style communication as well.SilkJS - Server Side JavaScript Swiss Army Knife and HTTP Server
Powerful, flexible, advanced charting for ExtJS and Touch: http://zingchart.com
Javascript rocks. Even on the server-side:
ExtJS Forums' Server-Side Javascript Social Group


Reply With Quote