Using Ajax in Intraweb

IntraWeb 9.x was included in Delphi2007. Atozed has done a good job to include "callbacks" for all the standart IW components. But you can consider some tricks to use Ajax.

One of the attractions in Ajax is than there is a lot of "ready to use" client libraries .Some of this are free and/or open source, and others are commercial. But really there is a lot "chooses", and they are "easy" to use in a ASP application, in many cases by putting it in the web directories. We want do it in our IW application.

Use "Ajax client libraries" in IntraWeb.

The objective is to use some of the Ajax frameworks in the IW application.

Trick 1. Put the Ajax libraries in the files directory of the IWApp.

Really is a very "obvious" step, but is the first very simple way to use Ajax in your old IW program. You can put a "complete" JavaScript program in the /files directory and execute it, for example in a frame.

How communicate this "separate" program with the Iw program?

Trick 2. Communicate by intercepting OnBeforeDispatch.

The more "rudimentary" way to intercept any Iw server call is by do it in the ServerController.OnBeforeDispath event.

You can "check" the Request object to know information about the call.

This method is "simple" too, and the worth problem is than you must manage the user sessions.

procedure TServeerController.BaseBeforeDispatch(
Sender: TObject; Request: TWebRequest; Response: TWebResponse;
var Handled: Boolean);
var n:string;
if n='xxxx' then
end else if n='yyy' then
//... more
// if Handled is still false then the "normal" dispatch continue for the call


Trick 3. Communicate with the Iw form

You can use the technique showed in ajax4intraweb.htm to do the callbacks to your old IW form programs.


In this moment, I don't know the plains in Atozed about supporting other Client Ajax FrameWorks. But sure than you have a lot of frameworks in your mind

Really there are many ways to do the Ajax in a Iw old program, with a "old" IntraWeb version. (The techniques are compatibles at least since iw7.x versions)

You can start to use it now, and do the "Ajax injection" steep by steep by using this "old" technique in old forms and start to use IntraWeb 9.x in new forms.

I just testing and knowing different Ajax platform. Here are mi first comments.

BackBase : Its a complete and very good framework, lot of examples and semi/ready to use complete programs demo. It use a very compact code to render the pages, with own tags param definitions. A pre-procesor render the HTML result. But maybe it is heavy to understand for a novice, it is very expensive too. The source code is ofuscated.

Problems with localization (the ñ or á )

Zapatec : Its a very good library with a clear and well commented source code. Very good examples. Very good style support and you can use themes.

Good classes for Windows, Menus, Tabs, Form, Calendar... The grid support have sort and query functions. It have a complete framework to interchange data with the server: XML, json and HTML documents.

Prototipe : Very good base library to work in object oriented in javascript. It has not hi level widgets, but it is the base to make it. It is much used in other third party libraries. For example

And its a school for other "clone" librarys.

The site haven't documentation or examples you can see the introduction of this library in:Prototype Links












Teléfono: 978-610539 - Fax: 978-610861 -Trav.Agustina Aragón 1,1e 44002 Teruel ( España ).webmaster

Copyright © 1997-2004 , [Multi-Informatica Teruel, S.L].La información contenida en este documento está sujeta a modificaciones sin previo aviso. Otros productos u organizaciones mencionadas aquí son marcas comerciales o marcas registradas propiedad de sus respectivas organizaciones o propietarios.