views:

299

answers:

11

I have to write a web application, and I am not sure which technology to choose. The user interface has to look like a desktop application. From my (limited) experience with HTML, CSS and JavaScript, I know this is far from easy. What I'd like is to be able to program just like in C++, C# or Java, because I think these languages are far more suited for implementing a GUI.

My question is threefold:

  • Is this possible?
  • Which technologies can be used for this?
  • And if it is possible, why are most web applications still made using HTML and JavaScript?

Update: Thanks for the many responses!

+7  A: 

Yes, it is possible you could use Silverlight or JavaFX (even though it would require a minimum of HTML like 4 tags...).

The problem with Silverlight or JavaFX and Flash at the same time is that they suck at SEO, that is search engine optimization, as Google & co can't look inside your app.

Gab Royer
+1 for JavaFX, which I forgot to mention :-)
Chris W. Rea
I'm surprised I'm the only one to mention it! As much as I dislike JavaFX apps, it is a valid and well established alternative to Flash and Silverlight.
Gab Royer
Google (don't know about other search engines) can look inside Flash just fine if you tell Flash/Flex/whatever to produce 'accessible SWFs'.
Noah Medling
+3  A: 

Most web applications are made with HTML and JavaScript for portability. But, if you want a really "rich" user interface, you might want to investigate Adobe Flash or Flex, or Microsoft Silverlight (with which you can program in C#). But, you will be requiring your users to have the appropriate plugin.

Chris W. Rea
Gab's suggestion of JavaFX is equally valid.
Chris W. Rea
Abode flex, forgot about this one.
Gab Royer
+1  A: 

Silverlight seems like it would be closest to what you're talking about (C#, etc)

You could also use Flash for rich internet applications.

Honestly though, you SHOULD learn at least basic HTML before you start web programming. You should learn much more than that, but at a minimum.

And to answer your last question, why people still use HTML...

Not everyone using the web is at a moderately powerful desktop computer. People access the web from phones, computer programs, etc. Not all these devices support RIA and so you're left with either leaving them out or putting things in a medium that everyone can see.

Additionally, accessability (blind people, for example) require screen readers to help them on the web. Because of this, the ability to read a document to a user is imperative.

There are certainly more reasons, but those are a couple examples.

Hugoware
+1  A: 
  • Yes
  • Silverlight/Flash/etc
  • Lots of reasons: accessibility, SEO, portability
mgroves
+3  A: 
marcgg
"a web application shouldn't look like a desktop application". I certainly agree. However, within my company they want to port our C++ application to a web app, so I think they'll want to see *all* functionality ported :(
Dimitri C.
+4  A: 

I'm not convinced that looking like a desktop application is the key to success - and what does that really mean anyway?

Jquery UI gives you an idea of what is possible using the standard html/css/js combo, and is easy to implement.

Rich Bradshaw
+1  A: 

As I've seen the syntax used in Java FX, I think you would be better off with a regular Java Applet (being a bit subjective with good reason). An Applet is a Java application (with certain restrictions) embedded in the browser.

The reason that HTML/CSS/Javascript are used for web pages is because that's what they're intended for. They let you construct documents that are searchable and flexible regarding layout e.g. Putting a Java Applet (for example) in the browser restricts you when it comes to appearance, styling, SEO (as mentioned) +++...

Silverlight is also an alternative, as suggested. That is also an embedded application running in the browser.

If you master Java, an applet would be a decent choice if you can live with these downsides.

Yngve Sneen Lindal
+1  A: 

Take a look at Wicket. You can build a web app with it coding only in Java in a very similar way you make desktop apps with Swing.

EDITED: Ok, I have to admit, you need a little HTML experience (which you do have), but Wicket does the most of the tricky JavaScript and AJAX stuff for you.

Also GWT is somewhat similar: it automatically translates Java code to JavaScript and generates most of the HTML for you.

Ilya Boyandin
+7  A: 

You can use Python with Pyjamas, Objective-J (and a little JavaScript) with Cappuccino, or Java with GWT.

If you don't mind being reliant on browser plugins, you can also look at Adobe Air, Adobe Flex, Flash, Silverlight, or JavaFX (or just plain Java).

To answer your other question, most web apps are written in HTML/CSS/JS because those are what most browsers can run without help. Everything I mentioned above either compiles to those or relies on the user having a plugin installed.

Noah Medling
Cappuccino is Objective-J, not C#. Script# is C#.
Nosredna
Fixed it; thanks.
Noah Medling
+3  A: 

A few points:

It's impossible to have a web page without HTML.

If you use plugins like Flash as others have suggested you still need HTML, because that's the language of the web. HTML, CSS and Javascript are used widely because plugins are mostly proprietry and not understood by the browser.

For example you can't normally copy-paste text easily from plugins, and other browser functions and shortcuts don't work. You will have to weigh up what is more important.

If your app must look like a desktop application, make it a desktop application

Why not make a desktop app, with internet connection capabilities? It's kind of deceiving making it look like something it's not, and also weird when it's running within another app (the browser).

And whatever style you use, it still won't look like the user's OS in most cases. Every OS is different, and each one allows much customisation. You can use a cross-platform framework to remove or reduce these issues.

DisgruntledGoat
"Why not make a desktop app": We already have got a desktop client for our server, but our sales department now thinks web-apps are the way to go :-(
Dimitri C.
Then you need to explain to them the pros and cons of each approach and how each is suited to your project. If a web app *is* more appropriate, I'd recommend keeping it "open" and accessible by using HTML over plugins, and making it work like a web app, not a desktop app.
DisgruntledGoat
+1  A: 

Script# is pretty nice for C# web development.

Nosredna