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

Michael Van Canneyt michael at freepascal.org
Wed Jun 16 23:01:15 CEST 2010



On Wed, 16 Jun 2010, Burkhard Carstens wrote:

> .. anybody knows where I can buy it? ;-)
> After spending hours on www.w3c.org and www.w3schools.com, extjs.com
> (now sencha.com) and jquery.com reading a lot about html, dhtml,
> javascript and checking out some docs and examples about extjs and
> jquery, I got the feeling that all these pieces could form a nice
> picture .. just I still couldn't see it.
> Then I found this artice and now all of the sudden, everything makes a
> lot more sense:
> http://www.ibm.com/developerworks/web/library/wa-ajaxintro1.html
>
> Guess, it might be good to start from ground up (now that I found
> ground):
> Make some nice html files with some JavaScript functions, which just
> "call" my cgi via XmlHTTPRequest to insert something into the DB or
> return some results or tiny html snippets.

This is exactly how I am programming web with FPC.

FPC is used for the server. You'll see all components I use in fcl-web/src.
The client is programmed completely in ExtJS. The FPC components have been
built so they can work with any Javascript framework, but ExtJS has been
worked out best - simply because I use it. Currently there are 3 important
areas I am working in:
- SOAP calls using WST. fpweb can be used to route and handle SOAP transport
   for WST. The code has been donated to WST.
- serving data to a (currently extjs) datastore in Javascript.
   (see fcl-web/src/webdata)
- 'simple' JSON-RPC programming: JSON-RPC versions 1 and 2 are supported.
   As an extra, I especially made sure that the Ext.Direct variant is well
   supported.  (see fcl-web/jsonrpc) I'm still working on a Ext.Direct
   wrapper around WST.

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.

4 areas are open for work:
1. File cache mechanism in fcl-web.
2. a kind of intraweb/extpascal/unigui framework.
    I have the basic plans ready. Lazarus has the IDE support for it.
    (joost uses it in his webdesign package)
3. IIS module support. 
4. Translation of Pascal to Javascript. The basics for this are in the FCL:
    fcl-passrc and fcl-js. What is needed is conversion of one syntax tree to
    another. Not very hard, but tedious and a lot of work.

I hope this makes sense and gives you some ideas of the directions you can
take. If there is any area you might want to work on, let me know, I'm
willing to help.

Michael.



More information about the fpc-pascal mailing list