Hey Mohammed,

2012/8/10 Mohammed Rashad <mohammedrasha...@gmail.com>:
> In firebug I can see for each mouseMove a request is sent to wt app
> ofcourse I connected mouseMoved event to mouseMove function
> but if i do a simle HTML+JS code with a mousmove event nothing comes on
> firebug
> and its a complete client side things
>
> I want to do some things on client side which will uses JQuery,AJAX,JS.
>  but dont need to give request to server for each and everything like
> mousemove mouseclick etc..
>
> Do you think this will make app slow?

Certainly, doing things on the client-side will avoid a round trip.
The penalty of a round-trip varies widely depending on how your
application is deployed (intranet, extranet, internet or mobile).

The big benefit of JavaScript in the browser is that it can be used to
update a page rather than requiring requiring a full page reload for
any interaction. Using Ajax, the browser is able to make non-blocking
calls to a server in the background. Both of these aspects of
JavaScript are fully exploited by Wt.

It is true that by default, since you program using C++, Wt will make
a (at most single) round-trip to the server for each interaction, but
you do have the ability to optimize this away by moving things to
JavaScript when needed. There are ways to connect JavaScript to
events, and/or to provide a JavaScript implementation for a C++
method. The latter method has the benefit that your application will
still work consistently for a non-JavaScript browser.

There are other situations where Wt will be more performant than
client-side JavaScript: most notably on slow JavaScript engines (like
Internet Explorer), doing many small updates client-side (DOM
manipulations) can be slower than fetching a snippet of HTML rendered
server-side.

Regards,
koen

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to