On Wed, Sep 12, 2012 at 12:02 AM, Koen Deforche <k...@emweb.be> wrote:

> 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.
>

I can use doJavaScript() but I need to have some JS code there. and also
connection from a JS code to a Wt requires some Slot mechanism and this is
OK. But for every event having a round rip is not a good idea. But as you
said this is because of C++.

Will you please elobarate on the roundrip mechanism?

Which cases it will be useful? Is it good for IE only. If so we are not at
all considering IE based setup?

Also how to provide a JS implementation for C++ method?

How much the performance cost varies with Wt based event mechanism vs JS
based mechanism?


> 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
>



-- 
Regards,
   Rashad
------------------------------------------------------------------------------
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