Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: AW: [rap-dev] Sessions in RAP

Hi Frank, thank you very much for your clear answer, this helped me very
much! One last question before I´m satisfied;) Which class on Clientside
handles the JavaScript - Stream from the server?

Thank you very much!

Bye

Martin

> Hi,
>
> I'm not quite sure what you mean by 'main action' but as RAP uses events
> for user-interaction I guess you mean where and how for example the
> button-click will be executed on server-side. This happens in the process
> action phase of the request lifecycle. The method that is used to trigger
> all listeners added to a widget is Event#processEvent(). You can use the
> call hierarchy to investigate where this method gets called. Note that
> despite the fact I just mentioned the method gets often called in the read
> data phase. But never the less the actual execution is deferred to the
> process action phase.
>
> You are guessing correctly, the javascript is calculated on the server and
> sent to browser as response. At the client site there is a javascript
> application running, that executes the javascript stream. This application
> is build on top of the Qooxdoo library and controls the communication
> between client and server. User input is traced and if an event occurs
> that needs to inform/invoke the server the application sends a request in
> way that is understandable for the RAP lifecycle. First all widget state
> is applied and after that the event processing takes place. Last but not
> least the render-phase writes the javascript that represents the changes
> that take place in the action phase.
>
> The kind of magic you are looking for in the render-phase is done in the
> JSWriter. For example take a look at line 214 of JSWriter. The set method
> does nothing if the property value hasn't changed. So only the changed
> values are sent to the client.
>
> AJAX is simply used for the asynchronous request handling, that means that
> we do not have to replace the whole document as in earlier days of
> web-developement (This reduces both network-traffic and server-load).
>
> Ciao
> Frank
>
> -----Ursprüngliche Nachricht-----
> Von: rap-dev-bounces@xxxxxxxxxxx [mailto:rap-dev-bounces@xxxxxxxxxxx] Im
> Auftrag von abo@xxxxxxxxxxxxx
> Gesendet: Freitag, 14. September 2007 17:01
> An: rap-dev@xxxxxxxxxxx
> Betreff: [rap-dev] RAP Architecture and Communication
>
>
>
> Hi,
>
> I still try to understand the rendering phases in RAP.
> What I really can´t figure out is, where in the source-code the main
> action takes place.
> I understand how the different widgets work, together with their LCAs, but
> i don´t get the point on the communication between client and server.
>
> What happens, if a client accesses a RAP-Application? I believe, the
> JavaScript is calculated on the server and then sent to the client, on the
> client, qooxdoo manages the rendering of the widgets.
> Now, if some component changes its state ( so it has differences to its
> preserved state) , the so called "Deltas" are sent to the client and the
> client has only to render the values which have changed, right?
> But as I read the code, it seemed to me, that all the JavaScript Code is
> sent to the Client everytime something changes.
>
> So I would be very thankful, if someone could give me a short-guide to the
> code, especially some classes where I can find:
>
> where the communication happens, especially the "Deltas".
> Where does AJAX come into play? I must admit, i don´t know Ajax very well,
> so where is this handled?
>
> Thank you for your effort
>
> Martin
>
>
> _______________________________________________
> rap-dev mailing list
> rap-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/rap-dev
> _______________________________________________
> rap-dev mailing list
> rap-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/rap-dev
>


Back to the top