views:

902

answers:

7

Several frameworks for writing web-based desktop-like applications have recently appeared. E.g. SproutCore and Cappuccino. Do you have any experience using them? What's your impression? Did I miss some other framework?

I've seen related questions on StackOverflow, but they generate mostly standard answers like "use jQuery or MochiKit or MooTools or Dojo or YUI". While some people give non-standard answers, they seem to have little experience using this frameworks.

Can anyone share real experience developing destop-like apps for the browser?

A: 

I don't have any experience with SproutCore or Capuccino. But have made attempts to use Dojo on top of Django for this kind of work. Can only tell you it's slow and buggy.

Vasil
+4  A: 

To my point of view, Cappuccino is an example of what NOT to do. They implemented another language on top of JavaScript, which already bring slowliness while browser developper are already hardly fighting against, and, what is worst, they don't rely at all on the browser widget, breaking all the user navigation experience. For example, they implemented their own scrollbar, with the main drawback that using mouse wheel won't work anymore!

I really prefer Ext's approach which give you rich widgets while keeping the UI as close as possible from the browser.

gizmo
+2  A: 

I also, as gizmo, recommend EXT JS. Their license has changed and it may not work for all, but it's still a good choice if you want to do stuff like a desktop.

Here's their example page for a desktop environment: http://extjs.com/deploy/dev/examples/desktop/desktop.html

AntonioCS
+5  A: 

Due to the speed issues these high-level frameworks cause for many larger (as in: non-trivial) applications, we only use plain jQuery. In our tests, all high-level frameworks broke down in situations where there are many draggable objects or many drop targets, and in situation where long lists (with >1000 entries) were shown on screen.

Part of this is due to issues with IE6 and IE7 (where performance suddenly starts to deteriorate dramatically after DOM trees reach a certain complexity), but part is due to the overhead these frameworks generate.

So I would not recommend any of the high-level frameworks. My recommendation would be to use jQuery and work with the DOM directly.

Some tips to improve performance:

  • Where possibly, render HTML on the server.
  • Keep the HTML as simple as possible.
  • Avoid having many elements in the DOM tree.
  • Avoid recursive table structure (IE suddenly stops showing them after relatively few levels of nesting).
  • Remove invisible elements from the DOM tree.
  • Remove things from the DOM tree before changing them and then re-insert them, rather than changing them while they're in the tree.
LKM
+1  A: 

Apple is demonstrating that sproutcore does work, although it's hard to estimate how well it works. Currently I build web apps with a home-grown set of libraries, duplicating a set of functionality from our windows software suite (but adapted to a web interface). Up to now I've avoided frameworks particularly for the reason that I didn't want the bloat. The problem with this approach is that I waste an inordinate amount of time duplicating functionality that's already in the frameworks, and I feel that over time I'm going to approximate towards something that resembles these frameworks.

Because of this I've been experimenting with implementing a web app in extjs, and it was a surprisingly nice experience. The performance is excellent, and ease of development is quite high because their component set is good for actually building apps, not just for fancy demos (a common problem in web toolkits). I would definitely recommend it if you are interested in building desktop-like web apps.

The problem of scaling it up obviously still applies, but honestly, I feel that it's better to use a toolkit in situations where scale is not that important, and to fallback to basic javascript only where you need to (premature optimization being the root of all evil). Extjs can layer on top of prototype or jquery, so this approach is definitely workable. Avoiding too much content in the DOM is usually an approach of loading and unloading on-demand. For example, there's a third party extension to the extjs grid class that allows scrolling through a million row dataset by being clever about loading and unloading data.

Joeri Sebrechts
+1  A: 

You might consider using GWT-Ext (uses Ext underneath) might be a very clean solution if you're going to use Java.

vanja
+1  A: 

I like qooxdoo, although it takes the OOP approach of JS rather than the prototypal it is a solid framework and has a lot of features.

olle