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.

I have the impression that more and more applications with a user interface use HTML+CSS+JavaScript client-side instead of a native GUI framework.

I wounder what are the most important driving forces for this? or in other words what are native GUI frameworks lacking to be competitive? e.g. is it easier to do some kind of things with HTML+CSS+JavaScript than with native GUI frameworks.

If we suppose the application is a client-server application where the client has a graphical user interface. What is the most important things that are easier to do in HTML+CSS+JavaScript than in the most popular native GUI frameworks?

share|improve this question
add comment

7 Answers 7

up vote 6 down vote accepted

The most important factor, to my knowledge, is deployment.

With desktop applications, you have to:

  • make sure the software runs on all clients (with different hardware, OS versions, other stuff installed, etc.)
  • somehow transfer the software to each client
  • install the software on each client
  • troubleshoot each client individually
  • repeat all the above each time you want to roll out a new version
  • be very careful not to break compatibility with previous versions (e.g., version 4.3 better be able to load version 4.2's saved files)

Web applications also have a few advantages by nature for which desktop applications have to jump through quite some hoops:

  • a user's settings and documents will be available anywhere in the world, as long as there's internet access and a compatible browser (which is much less of a problem now than it used to be 5 years ago)
  • users can simply bookmark pages inside the application (if you do it right) and resume their work later, exactly where they left off
  • access to the application can be controlled centrally; users can be added and removed without modifying anything on the client; with desktop applications, the application would need a reliable (and fairly hack-proof) way of disabling or removing itself

In terms of development effort, I'd say writing web applications requires a slightly different mindset, but it isn't intrinsically easier or harder than desktop programming, given decent enough tools.

share|improve this answer
    
I've upvoted this but a lot of what you've said doesn't make sense for most corporates where the application is only to be used in a few locations and the SOE is locked down. We deployed new builds of the application by overwriting the one master copy on a network share & the users all ran the .exe by loading it from there. In that situation using a web app doesn't make sense but a lot of corporates are doing so at great cost & little benefit as far as I can see. –  mcottle Oct 12 '11 at 5:40
1  
@mcottle: That's a fair compromise - you still use a few of the benefits, and you have to figure out solutions for a few other things such as storage and authentication, but other than that, the decision is ultimately an individual one, and the factors differ from case to case. (And if the cost for a web application is significantly higher than a desktop application would have been, including setup and maintenance, then you're being screwed.) –  tdammers Oct 12 '11 at 5:47
    
They were screwed. The authentication the .exe used is a weeks worth of Daily WTF posts :) –  mcottle Oct 12 '11 at 8:18
add comment

We have switched over to intranet web sites because it requires virtually nothing on the client workstation. We can maintain two servers (primary and backup) instead of dozens of workstations scattered around the country. And since the servers are on the Internet, all maintenance / repairs / upgrades can be done remotely.

It is also nice that we are platform-independent of the workstations; Windows, Linux, Mac, we don't care. Everything from Windows 2000 to Android "just works".

share|improve this answer
add comment

It's truly cross-platform. Web app will work not only on PC and 2-3 operating systems, but in fact on wide range of devices, like mobile phones, interactive TVs, gaming consoles, tablets etc.

share|improve this answer
4  
Except when it doesn't. –  AndrejaKo Jul 9 '11 at 12:36
add comment

I have mostly done GUI development using Java Swing. But I have also used some JavaScript and jQuery for web applications.

The things that have been much easier with JavaScript web applications are:

Mobile code

This makes deployment much easier. The user doesn't have to install anything, and the application silently upgrades on the next request (if a new version is available). This also makes server development easier since it's mostly not more than one client version that is used.

Built-in network client

It helps a lot that the web browsers handle all network connections for you. In example when you want to post messages to the server, you have to do almost nothing to handle the network connection. Compare this to using Apache HTTP Client, specially when you want to use a secure connection via HTTPS. The new Websockets will make this even more powerful.

Easier to make layout

This may only be an advantage against Java Swing, but maybe not compared to WPF. But doing the layout declaratively using HTML+CSS helps a lot compared to as in Java Swing where all layout is done using Java code. That would be like making layout and use of components only via JavaScript.

Easier to make asynchronous programming

Consider a sign-up form, where the user chooses a "username" and fills other fields with information. In JavaScript it's very easy to asynchronously check (using Ajax) if the username is already in use without blocking the UI, while the user can continue to fill in the other fields - and if the username is already in use, notify the user about it. In many other native GUI frameworks, you have to fire up a new thread for such asynchronous things and make the code less readable as in JavaScript+Ajax.

share|improve this answer
    
+1 for the "built-in network client" argument. Writing a (robust) client/server GUI application can be challenging (and I'm a GUI application developper only) –  barjak Oct 12 '11 at 12:06
add comment

If it is pure UI + some data manupulation that can be done remotely, the web based application would suffice. Native code comes into picture when you need to do some costly-operations or access some resources on the host (i.e) say you want to write an application like "wireShark" to moniter your ethernet interface on your computer.

Now comes the combinations,

Pure web-based: it is for light weight applications, that doesnot need much of processing on the host side. Pro's: easy deployment through servers, Con's: can't do much.

Pure native code: Pro's: All powerful, Con's: deployment & maintenance headache.

The mix of Web-based + Native Code Plugin: Pro's: This is interesting it is a mix of boath, a web-front-end & a native code backend.Yeah, a little easy to deploy & is powerful. Cons: needs knowledge of both the sides, browser support will be a headache for the plugin development i.e, each browser(IE,FFX,Chrome) is special in a way.

share|improve this answer
    
Pure UI which is relatively simple. No web application UI can come remotely close to a good desktop UI without serious pain. –  Alan B Dec 13 '13 at 15:06
add comment

What it boils down to is this:

HTML+CSS+JS = highly malleable medium to develop truly platform independent* rich UI.

BUT its still a thin client, if you need a fat client experience then you need to have a full desktop GUI**.

*Excluding cross browser compatibility

** Arguably the lines of distinctions are becoming more narrower

share|improve this answer
add comment

I think it's easier to just get a webapp going and doing most of the right things, as opposed to native GUI applications. And here "easier" is in terms of programmer effort. Native GUI apps generally require a lot of fiddling to get buttons in the right place, text fields wide enough, etc etc etc. In the late 80s, early 90s, people built careers on doing all the fiddly GUI stuff right.

You trade off absolute control in a native GUI for rapid, easy getting it 80% correct in an HTML/JavaScript/etc GUI.

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.