TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Build Cross-Platform Applications for desktop using HTML, CSS, Javascript

117 pointsby elliotlaiabout 13 years ago

21 comments

GeneralMaximusabout 13 years ago
I'm enamored with the idea of writing desktop applications with web technologies, but I'm not enamored with the idea of running a node.js instance locally for every such desktop application.<p>What I would <i>like</i> to see is a "privileged mode" Chromium (or Firefox) that would let applications break out of the browser sandbox and directly perform operations such as filesystem I/O. Privileged Mode Chromium would obviously be a huge security threat if it's allowed to run any old code, so it would be wise to prevent it from downloading and executing scripts over the network, or maybe have some kind of script signing support in place so that the only scripts allowed to execute are the ones with the app developers' signature on them. Or maybe I'm talking out of my ass here and what we have right now works just fine. Feel free to correct me here.<p>Also, one question. Isn't the node.js instance serving my application visible to other applications on the same system? Can't a malicious application take advantage of this fact and cause my app to misbehave?<p>(Offtopic: I must point out an irritating and potentially harmful design trend that is emerging as a result of Twitter Bootstrap's popularity: the top navigation bar that stays in place as you scroll downward. It wastes precious screen space, looks ugly and doesn't add anything of value to the website. Why is it so important that I be forced to look at your website's logo and navigation bar <i>all the time</i>? I'm not picking on the AppJS developers here; this is a general sentiment directed towards all the designers who embrace this terrible trend.)
评论 #3964629 未加载
评论 #3964215 未加载
评论 #3965074 未加载
评论 #3964224 未加载
评论 #3965851 未加载
评论 #3965069 未加载
评论 #3964259 未加载
评论 #3964501 未加载
评论 #3965165 未加载
nardiabout 13 years ago
Q: "What's better than this stack for application development?"<p>A: So many things. Cocoa comes to mind.<p>HTML/CSS/JavaScript were never created to build applications, and it's very apparent when you do so. I've built a lot of web apps, but out of necessity. I think we're going to actually see the opposite trend in software: moving client-server apps away from browser-based solutions and toward native apps. In fact we're already seeing that movement—and I would argue that a big reason behind it is how much writing client apps in JavaScript sucks.
AshleysBrainabout 13 years ago
This looks really cool, but for HTML5 games to work well it really could do with these things:<p>1) support for hardware-accelerated rendering with canvas2D<p>2) support for hardware-accelerated WebGL<p>3) ability to turn off the extremely restrictive driver blacklists in Chrome (which will turn off hardware acceleration for ~50% of users, and is not necessary if building a desktop app)<p>Yeah, basically games <i>really</i> need hardware acceleration. I know they don't mention games at all but something like this is great for additional distribution platforms and monetisation, as long as it has hardware acceleration. Anyone know if it covers that?
评论 #3963863 未加载
评论 #3964870 未加载
sktrdieabout 13 years ago
I think Topcube does this as well: <a href="https://github.com/creationix/topcube" rel="nofollow">https://github.com/creationix/topcube</a><p>Topcube, however, is missing the Mac version.<p>Another interesting idea would be to ditch Node all-together and use HTML5/CSS3 literally for everything your desktop app needs. With localStorage and other APIs being implemented in Chromium, one does not need the server part anymore.
arturadibabout 13 years ago
The hardest part of all of this is getting a runtime that builds/installs seamlessly across platforms. I just did an 'npm install appjs' as per docs, and it failed (Mac).<p>I myself have gone through great lengths to create a similar (minus Webkit) runtime for Mac, Windows, and Linux:<p><a href="https://github.com/arturadib/node-qt" rel="nofollow">https://github.com/arturadib/node-qt</a><p><a href="https://github.com/arturadib/node-five" rel="nofollow">https://github.com/arturadib/node-five</a><p>Despite all my efforts there are edge cases where it simply won't install/build.<p>Keep up the good work though -- this is a much needed project. (Bear in mind too that Mozilla and other companies are coming out with their own runtimes for web apps, so such projects will likely be rendered obsolete by them).
评论 #3964081 未加载
评论 #3965086 未加载
评论 #3963985 未加载
评论 #3964717 未加载
duncanwilcoxabout 13 years ago
<a href="http://sandofsky.com/blog/apps-vs-the-web.html" rel="nofollow">http://sandofsky.com/blog/apps-vs-the-web.html</a> <a href="http://sandofsky.com/blog/shell-apps.html" rel="nofollow">http://sandofsky.com/blog/shell-apps.html</a><p>Cough.
评论 #3965147 未加载
评论 #3965392 未加载
评论 #3963844 未加载
christiangencoabout 13 years ago
Very interesting - kind of like PhoneGap for your computer.<p>I'd recommend placing a few screenshots of example apps on the front page running natively on different systems (mac, windows, linux). Well done!
napoluxabout 13 years ago
Hey men, what about Adobe AIR then? It's out there since 2008, it works on Mac/Linux/Windows/Mobile and it's far more complete than App.js or any other competitor.<p>You can use flash (OMG) or just plain HTML/JS (I've developed something in the past using both)<p>But you know, we are in an app era right now and this technology has lost part of his original appeal
评论 #3977541 未加载
darkstalkerabout 13 years ago
I personally find disturbing how people wants to do _everything_ with web technologies. Can't they just learn how to write native apps? I wouldn't like to see my desktop full of slow and bloated web apps.
评论 #3966036 未加载
评论 #3965437 未加载
评论 #3965673 未加载
mratzloffabout 13 years ago
Pokki (<a href="http://developers.pokki.com" rel="nofollow">http://developers.pokki.com</a>) is a similar platform that builds to Windows and supports WebGL.
jiyinyiyongabout 13 years ago
`node-webkit` looks similar to this: <a href="https://github.com/rogerwang/node-webkit" rel="nofollow">https://github.com/rogerwang/node-webkit</a>
vimotaabout 13 years ago
This seems to be done currently through means like this: <a href="http://www.quora.com/Rdio-online-music-service/What-technology-drives-Rdio%E2%80%99s-Mac-desktop-app" rel="nofollow">http://www.quora.com/Rdio-online-music-service/What-technolo...</a>, it'd be nice to see an even simpler approach (like appjs) replace it.
tferrisabout 13 years ago
If your app runs on HTML/CSS/JS where's the point to make locally installed app out of it?<p>One reason might be a better hardware accessibility (at the moment) but with the pace Chrome, WebGL, etc. are evolving there shouldn't be any reason in near future and you would have cross-platform apps without any installation and update hassle.
solox3about 13 years ago
It felt a bit like Prism (<a href="https://mozillalabs.com/en-US/prism" rel="nofollow">https://mozillalabs.com/en-US/prism</a>). Unlike them, who are just slapping a browser inside a chromeless window, you are actually building it from the ground up?
评论 #3964431 未加载
chris_engelabout 13 years ago
What a waste of time! Appcelerator is putting its titanium desktop framework under opensource which does EXACTLY THAT. It already works on win/lin/mac and would only need a cleanup and update.<p>Why wasting time and re-creating everythin from scratch?!
rmATinnovafyabout 13 years ago
If you could do a one click install with no internet access this could have huge potential.<p>Yesterday, while working with C# and sql compact I realised the need for something like this.<p>Not that I have anything against C#. Love that thing, but it is complex (.NET).
评论 #3964865 未加载
outside1234about 13 years ago
It seems to me that ember.js is a better approach to this - much cleaner application model and richer data support with routing and view state.<p>That said, I'm with you broadly on Javascript+HTML5 on the desktop. Actually just wrote something up around my thoughts on how to do this with Ember.js if folks are interested:<p><a href="http://bit.ly/LybVgo" rel="nofollow">http://bit.ly/LybVgo</a>
评论 #3963947 未加载
mhitzaabout 13 years ago
I still find XULRunner better suited for this task.
captaincrunchabout 13 years ago
I think for us, this is redundant as we made a direct jump to the cloud, but for applications that need to be built on the desktop, this would be great.<p>Mike/Verelo.com
hobbyistabout 13 years ago
isn't this is an overkill.. using node.js for running desktop apps
its_so_onabout 13 years ago
What I don't get is, honestly, the reason web apps are so much more awesome on PC's and Mac's than desktop applications are is that they are 0-configure, 0-install, 0-trace. These days, the people with the fastest computers aren't the geeks - they're people who buy a fast clean empty computer, install Firefox <i>and never anything else</i> and just use web apps. If they uninstall any crap that came with the computer, and keep, say, Windows (or Mac) and Firefox updated (both these OS's and Firefox are pretty proactive about this too), then after a year, their computer screams compared with anyone who downloads anything. (Such a person will normally at least start up skype, an antivirus, media programs, office suites, cam software, sometimes bittorrent or other specialty software, etc etc etc. The list goes on. All of which like to update themselves, have an update process in the background, sometimes hanging, bugging the user, etc, and all of which like to start up with the computer.)<p>Honestly, what the desktop experience is missing is quite simple: 1) seeing the first screen within 5 seconds of asking for it 2) every action takes a few seconds including 'installation' 3) when you close the tab it's gone.<p>Honestly, even if you have a VM that is 100% in RAM on the fastest computer available today, usually all programs fail at number 2 - if for no other reason than that their installation program requires the user to click Next Next Next Next Finish.<p>What would fix this? Well, for one thing if any web app also had root access to a non-networked-except-with-its-own-servers 100% do whatever they want with it local VM. Yet to my knowledge there is not even a distribution (of any kind of operating system whatsoever) that is geared toward giving its entire stack over to 1 application, assuming that it is all now 'tainted'.<p>Off hand, it would seem the requirements of such an OS would be:<p>- Fast startup, no unneeded services<p>- Very small footprint, so that a web service can go wild on it, modifying it however it wants, removing anything it doesn't want, basically, it's theirs now - and the resulting blob can be written out to disk quickly when the app closes.<p>- Extremely secure. No way for the app to break out of its jail, where it has total root.<p>- Some graphics acceleration would be awesome if this can be done securely, secure access to opengl, etc.<p>- EXTREME STANDARDIZATION THAT DOESN'T CHANGE FOR YEARS OR IS SUPER-PREDICTABLE.<p>This is the MAIN area where Firefox shines: you can TARGET it. Whereas, targeting Windows: good luck. Targeting Linux: um, a slew of questions immediately pop up. Mac: which version?<p>The difference between offline games and online games is just huge. Imagine if you could run any hardware accelerated game "right from your browser" waiting a few seconds for it to load. The threshold to trying it out would fall 1-2 orders of magnitude. (I would argue, for an indie house falling 3 orders of magnitude).<p>I do realize that this overlaps with NaCL. However, NaCL is not really about providing the full desktop STACK to developers in a standardized way: instead it focuses (from what I gather) on just the op codes. That's great, but it hardly provides OpenGL (or DirectX) or a slew of other things that desktop applications have if they want it.<p>Basically, I am saying: <i>if VM software is advanced enough that security researchers run random viruses on their everyday boxes with their normal hard-drive mounted, just in a vm, then how is VM software not advanced enough to give a full desktop access to a web site, all cordoned off with write-on-modify semantics and standardized, so that the user has 0 security implications to this</i>?<p>Basically, the ONE thing I would add to the experience is putting at the top of any tab that has this, the number of VM's currently running. Whereas I expect flash to work well with 10 instances, that may be asking for too much here.
评论 #3965861 未加载