Jump to content

Behind the scenes


AlexTaylor

Recommended Posts

Dear Members!

 

I've recently found UniGUI and immediately started testing it. It is a fantastic tool for a hardcore desktop VCL-developer... :)

But there is a question that I could't answer based on the available documentation.

 

Here is a sample code:

procedure TMainForm.UniButton1Click(Sender: TObject);
Var I:Integer;
begin
  UniListBox1.Items.BeginUpdate;

  For I:=1 To 100 do
    UniListBox1.Items.Add(I.ToString());

  UniListBox1.Items.EndUpdate;
end;

I know this code is run on serverside. All code on Delphi-level runs on server-side, right?

 

So, my question is: what is the workflow of serverside events? I push the button on the clientside and it triggers an AJAX-request to the server module?

After executing the Delphi-code, the ExtJS representation of the VCL-listbox receives its state from the server module? Is it right?

 

Or is there any architectural diagram about the event-processing or about the workflow of the whole UniGUI framework?

 

I am very newbie on this platforms.

 

Thanx! :)

 

Cheers:

Alex

 

 

 

Link to comment
Share on other sites

  • Administrators

Hi Alex,

 

As you stated in uniGUI we have Sencha Ext JS controls on client side. They are a complete set of visual components for modern browsers.

Each uniGUI component has a counterpart on client side. For instance, a TUniButton translates into Ext.button.Button.

 

Like wise events are translated between Delphi and java script. When a button is clicked, an Ajax event named 'click' will be generated and captured by the server. Event will be relayed to correct TUniButton instances which will generate a server side OnClick event. After OnClick is processed the result is captured and sent back to the client.

  • Upvote 1
Link to comment
Share on other sites

Thanx, guys! 

 

It is absolutely clear now.

 

In the meantime I inspected the HTTP traffic between Firefox and the UniGUI server application with the built-in developer tools in FF, and it lightened me up... :) I saw all AJAX-messages and noticed the client-side object IDs and also the response was very clear.

 

Thanx! :)

 

Alex

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...