tags:

views:

114

answers:

5

if one wants to make a website that acts like a desktop software, isnt it better to just use one page and use ajax to retrieve all other php-files and update the content of current page with eg. jquery?

i mean, just ONE page, you get the idea of my question i think...

is this to recommend? what is the pros and cons?

i mean, its really smooth!

+2  A: 

That's how Meebo, Gmail, etc. do it, so there are clearly legitimate use cases. Do note that they have versions that work without JavaScript, to avoid losing audience...

ceejayoz
A: 

It can work well to an extent, butONE page is 1 (or several) steps to far, it depends on the application.The main drawbacks are page history (forward/back) and bookmarking, both can be sidetracked.

Paul Creasey
A: 

It depends on your application. If accessibility or SEO are considerations at all, you should rely on AJAX only for enhancing the user experience in capable browsers.

Matthew
A: 

First of all you should not create web apps that act just like desktop software (use Flash or Silverlight if you really need to) but design you application in a way that is suitable for the web.

However when creating web applications using AJAX is a good practice as it makes better user experience. It can also simplify the development as you can clearly separate the user interface from the functionality. You can use something like this http://yensdesign.com/2008/11/creating-ajax-websites-based-on-anchor-navigation/ to overcome forward/backward and bookmarking issues. The one big CON is that users without JS (many mobile browsers, but not only) won't be able to use your application.

Vasily Korolev
A: 

@fayer, sure, you can create such a "single-page application". IMHO there's nothing wrong in using standard web technologies to create browser-based apps that look and feel like native desktop apps. The browser merely becomes a runtime in this case, you may additionally also consider using browser-based runtimes like Adobe AIR or Titanium.

Starting from scratch or only with a low-level library like jQuery it is not trivial (if not impossible) to develop, deploy and maintain larger desktop-like web applications, but with a proper framework it can be straightforward and fun: have a look at qooxdoo, http://qooxdoo.org , a mature open source JS framework which addresses all those RIA requirements. To get the idea of a large-scale qooxdoo app, check out the free webmailer http://gmx.com (think of "Outlook in a browser").

Andreas Ecker