[fpc-pascal] The new book: "WEB and database programming with fpc and Lazarus for newbies and professionals"

Burkhard Carstens fpc at bcsoft.de
Fri Jun 18 10:18:40 CEST 2010


Am Freitag, 18. Juni 2010 09:25 schrieb Michael Van Canneyt:
[..]
> >> Joost uses jQuery and some Javascript components built around it.
> >> I'm sure that with his help, the ExtJS components can be modified
> >> to support jquerygrid and whatnot.
> >
> > Here you refere to the ExtJS components of fpweb, right? IOW. if
> > those are (or will be) universal, they should get renamed? (see,
> > you are in that stuff, so for you, all this is clear. for a newbie
> > (at least for me), it's still all confusing .. so having clear and
> > distinct names would help.. e.g. if it's about the fpWeb components
> > for use with ExtJS JavaScript Framework, they should be called
> > fpExtJS components ..)
>
> Nono.
> I'll give an example. There is TJSONRPCDispatcher. It 'knows'
> JSON-RPC. There is a descendent TExtDirectDispatcher, which simply
> overrides a couple of functions (they return names of fields in the
> json request) so the dispatcher understands the request sent by
> ExtDirect. Also, the TExtDirectDispatcher can generate an API
> configuration object.
>
> But if you don't use ExtDirect, you can simply use
> TJSONRPCDispatcher.
>
> For web data, it is similar. The base class is TWebDataProvider. It
> is independent of what happens on the browser end. It just knows how
> to analyze a web request and act on a dataset (all CRUD operations).
> The output of TWebDataProvider is handled by a different class:
> TWebDataFormatter: it is an abstract class that formats the result of
> TWebDataProvider.
> There is a descendent TExtJSJSONFormatter that formats the result so
> the TSONReader in ExtJS understands it.
>
> What Joost could do (I didn't find time yet) is write a descendent of
> TWebDataFormatter that outputs the result of TWebDataProvider in a
> format that the jQueryGrid understands.

Now THIS clears thins up!! Please add this to the fcl-web and/or lazweb 
README.txt. I started to get this picture, but it took me quite some 
time. 

> If someone needs it NOW, then
> of course I can help in the impmlementation.
Thanks, I might get back on this offer. I just saw extCore is MIT 
licensed .. I'll probably play with that first.

> What I'm trying to say is that I've tried to make the classes so that
> they can be used generally, and that one can make descendents that
> interface to different Javascript libraries out there.
Excelent!
Now I'm really keen on playing with this!

regards
 Burkhard




More information about the fpc-pascal mailing list