Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

html, css and js can be used to build beautiful(and useful) ui's (specially with html5 and css3) and lots of people already know them. Though its still way beyond my reach, but how difficult can it be to bring the whole web app thing to desktop apps (we already develop apps on our local servers before hosting them). According to me, its a nice simple idea which will bring a boom in desktop apps, plus given that these apps will already be sharing so much code with web apps, they might be able to offer better connectivity. Why isn't it being done?

share|improve this question
9  
Hasn't this just been announced as Windows 8? –  ChrisF Jun 12 '11 at 21:41
    
sry, not much of a windows enthusiast, what i am exactly asking for is an open source framework for developing db based desktop apps which can connect to net, and yes, finally something path-breaking from ms –  kapv89 Jun 12 '11 at 21:45
    
Why isn't paper used to build cars? (yeah, it's bad-analogy-time :) ) –  haylem Jun 6 '12 at 2:24
add comment

5 Answers 5

up vote 21 down vote accepted

Adobe already did it with Adobe Air, and Mozilla too with Prism . Google also tried to bridge the gap between desktop and web with Google Gears.

But in general, web technologies are not suited for many types of desktop applications, here some reasons why:

  • No immediately available full hardware access.
  • No low level system access.
  • No easily available filesystem access (the technologies I mentioned above allow you to get fs access but every one of them as its own different solution).
  • Performance. A native, compiled application is generally faster than a Javascript application.
  • Easy for a competitors to steal the source code
  • No libraries available for specialized tasks. Ex. image-processing, sound encoding, database access, network programming etc...
share|improve this answer
    
To be fair, not all applications need full hardware or low level access. VM languages like Java surely work well without that kind of access –  TheLQ Jun 13 '11 at 5:48
1  
Well, do you know many desktop Java apps? –  Yoni Roit Jun 13 '11 at 7:26
    
what about javascript on google's v8, i have read its really fast (as fast as java), i can see the difference myself when i run a heavy js animation in chrome and other browsers. And with growing api's for html5, js realy brings a lot to the table, with the canvas stuff, you can do image processing and all... so i don't think js really has that bad set of tools, as a plus, it is more of a functional programming language, (functions are first class objects) –  kapv89 Jun 13 '11 at 7:45
    
just checked out prism(now WebRunner) and google gears, nice stuff to tinker with,thanks –  kapv89 Jun 13 '11 at 8:04
    
yes v8 is fast. Taking as an example image processing, you can't access the already existing and very good libraries written in compiled code, you have to reinvent the wheel again. At the end, it boils down to what you application must do, if it's just accessing some data online and displaying them then the technologies I mentioned may fit your needs. –  Pastronio Faruglio Jun 13 '11 at 12:00
show 1 more comment

The framework that comes to mind is Adobe Air. It allows web developers to use Javascript/HTML to develop desktop applications. Javascript/HTML on it's own is not suitable for desktop applications because often times a desktop application will need access to services provided by the operating system, e.g. opening files, launching other applications, etc. Javascript on its own does not allow access to such services so you need something extra and frameworks like Adobe Air provide that extra glue.

share|improve this answer
add comment

There are a couple of ways to do this now. There's the Mozilla Application Framework which is often used by web browsers like Firefox but is also used by, for example, ActiveState's Komodo IDE.

There's also Qt, which in Qt Quick has CSS and a Javascript-like language.

share|improve this answer
    
nice, gonna look into Mozilla app framework –  kapv89 Jun 12 '11 at 21:52
add comment

IMO, I dont adopt HTML, CSS as a way to layout GUI's becaue there is no compiler I know of for these languages. If I have an error in the code, I have to go look for it myself or I maynot even knowtice it (or go to the HTML site to test it).

In c++ I like that it wont let me compile unless the code is correct (except for catching runtime issues).

Also I dont believe CSS & HTML play very well together yet, such as using float in CSS - depending on your HTML code & use - the result of float will have different outcomes - a lack of consistancy compared to using absolute positioning in win32 or the great java swing layout managers.

share|improve this answer
2  
HTML and CSS validators which will do basically what your C++ compiler is doing: syntax checks and type checks. I believe that some powerfull IDE come with such validators. –  user11715 Jun 13 '11 at 9:49
1  
For the positionning part, CSS also has absolute positionning, and HTML5 has much more than Swing's layout managers. Some editors will also let you design your GUI in a WYSIWYG fashion. –  user11715 Jun 13 '11 at 9:52
add comment

One major reason is that if you didn't want your app to be easily stolen and copied you would have to also create an application that held a WebControl that directly linked to your files packaged up some way.
In fact, there are applications that do this. Titanium Appcelerator is one. I'm not recommending you use it because the last time I looked at it it was full of bugs and was poorly supported. You'll have to do your own research into whether it's worth it.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.