Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: web-based application or desktop application?

by BrowserUk (Pope)
on Dec 04, 2003 at 23:24 UTC ( #312372=note: print w/replies, xml ) Need Help??

in reply to web-based application or desktop application?

Like you, the first time I coded an app. to use a html interface rather than a gui interface, it felt like a retrograde step. So many of the things I was used to doing with a gui became horrible to achieve with html. I tried various routes -- dhtml, javascript etc., but even given that the site was a died-in-the-wool MS shop and the latest greatest version of Explorer was the only choice of browser I has to cater to, emulating the typical gui features was a nightmare. Menubars with drop-down menus, drag'n'drop, pop-ups etc. that are so typical of your average desktop app. are extremely difficult to implement and a nightmare to debug.

After several iterations and a lot of wasted effort, the realisation dawns. Almost all the problems come as a result of trying to emulate the desktop gui approach. If you can clear your mind of the need to approach the interface in this way, stand back from the problem and concentrate upon the usage patterns, then the problems and the solution to them become a lot easier.

That doesn't mean that all the problems go away. One particularly intractable problem is the need for dynamic updates of some part of the display. Only updating as a result of user interaction just isn't enough for some applications, but using a refresh timer to update the entire display every n seconds or minutes also isn't viable. If there are other parts of the same display that the user might need to scroll to read, the refresh will cause a loss of their position, and if they are entering information, the problem is even worse.

The best solution I found to this problem was to use iframe tags to create small areas to contain the dynamic content, and use the meta refresh tag to cause them to be updated. The server application then re-writes the dynamically refreshed url whenever required and it gets redisplayed within the refresh time period. If the browser being used has a sensibly configured and enabled caching policy, the body of the iframe will only be updated if the file on the server has been modify, further preventing unnecessary updates.

It is even possible to provide a crude kind of drag'n'drop, though it requires the use of a little javascript to make it effective, which maybe okay in an intranet environment. Basically, you provide readonly edit fields which automatically select and cut when activated and then when the user drops (pastes) the cut text into another edit field, it automatically submits. Like I said, crude, but possible if needed.

A couple of other advantages of using a browser is that it simplifies internationalisation of your apps, especially where different character sets are required. It also makes it easier to enable your application for color blind, partially sighted and/or blind users. The ease with which they can override such things as font sizes and colour choices and even use speech-readers if they have the appropriate setup is considerably easier than trying to enable all these features in all of your applications.

HTML interfaces will likely never be appropriate for all applications -- CAD/CAM, graphic editors and the like -- but for many more, the enforced divorce of interface from business logic, the inherently cient-server/centralised storage and (if used appropriately) the demarkation between content and presentation can become a compelling feature of writing applications this way.

Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail

  • Comment on Re: web-based application or desktop application?

Replies are listed 'Best First'.
Re: Re: web-based application or desktop application?
by EvdB (Deacon) on Dec 05, 2003 at 11:06 UTC
    Related to iframes what I would like is something like <icontent> where you could do something like this:
    <p>You currently have <icontent src="" /> items in your basket. <!-- server determines who user is through cookies -->
    As i understand it this is tricky in iframes as you need to set the height etc which are prone to change.

    This would allow you to create, for example, static product pages on a web-shop and only hit the cgi for the dynamic content such as the number of items in a basket.

    --tidiness is the memory loss of environmental mnemonics

      Why would you want that, and what do you want to accomplish with that? This can already be achieved by a simple Perl CGI script, PHP, or -oh, let's throw this back in- Server Side Includes, if I understand your point (what I probably don't do)...
        If you take a typical web-shop page, such as say the whole page is standard issue - the same for every customer. All, that is, for the little bit in the top right which says "Loot: Your cart is empty.".

        It would be great to save the whole page statically to the server and then only have to generate that tiny little bit from the CGI. This would allow some really heavy processing to be applied to each page, such as category generation and related products, safe in the knowledge that it need only be done when te database changes, not for each request.

        It also would allow the page to be cached by proxies and would allow you to slurp small amounts of data from other sites - stuff that is currently done using images - such as hit counters.

        Just because you have not felt the need for it does not mean that it is not desirable...

        UPDATE: This could be made into a mod_perl filter is suppose - that is a thought...

        --tidiness is the memory loss of environmental mnemonics

      There's no reason that you can't use <IMG> for that, except that hardly any browser can deal with <IMG> getting back text. Or better yet, the proposed <OBJECT> element, but, Netscape being the dominant browser at that time, suffered from NIH syndrome, so it was never broadly used.

      Oh well, the web could have been great. Instead, we got Netscape to ruin it.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://312372]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (9)
As of 2017-01-23 17:18 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (194 votes). Check out past polls.