[web-devel] richer client experiences

Bardur Arantsson spam at scientician.net
Tue Jan 25 22:42:26 CET 2011

On 2011-01-25 22:00, Greg Weber wrote:
> To Bardur Arantsson and those with the vision of a richer client-side
> experience- I very much share that.
> The Yesod Widget model may be basic, but provides you with the concept of
> bundling the client-side aspects of html, css, and javascript together.
> Currently the server-side integration is for form elements that can be
> integrated with Persistent. We are certainly open to adding more advanced
> functionality.
> The advantage of this widget system is that it is at a level of abstraction
> that is still very approachable for web developers, and works well for its
> current use case (nicer form inputs).

I get this definite feeling that people are assuming that I'm somehow 
"afraid" of the client side... which isn't the case. I don't have a 
problem with programming client-side, and I'm actually quite comfortable 
programming JavaScript with, say, jQuery. (Douglas Crockford has a lot 
to do with that.). I just think that it's pointless if you can move to a 
better way of doing things.

There are problems with this model, though:

    - Testing is horrendous. I'm well aware of things like Selenium, but 
I want to be able to guarantee that the JavaScript is correct *by 
construction*. The server-side component can generate correct JavaScript 
for each browser if there are differences. It is extremely rare that I 
see completely correct hand-coded JavaScript *in practise*.
    - No static typing. I want to work in a statically type checked 
environment all the way to the user. That includes checking that a 
server-side callback is actually receiving a correctly typed message 
from the client and such things. I want the framework to handle this 
correctness checking (and related security) *for me*.
    - Usually there's a LOT of boilerplate code that goes into the 
client<->server communication bits, packaging the client UI state into 
JSON, posting that and unpacking the results into some client UI, etc. 
IMO, Wicket and Vaadin solve this reasonably elegantly (maybe not at the 
implementation level, but I'm also trying to address that). However, it 
may just be that I haven't seen "the right way" to do this.
    - Cross-component consistency in Look & Feel may be easier to 
achieve for your average application developer.

On 2011-01-25 22:00, Greg Weber wrote:
 > This direct client-heavy model works well because you can program it 
 > more directly instead of working through layers of abstraciton on the 
 > server side to generate a richer client.

The things is: You won't have to. The goal is to be able to trivially be 
able to compose widgets/components to get larger/better 
widgets/components. One just needs to bootstrap just enough of the 
compontents which can be used as building blocks. This is easy in Wicket.


More information about the web-devel mailing list