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

2010-06-18 Thread Burkhard Carstens
Am Freitag, 18. Juni 2010 04:13 schrieb Bee Jay:
> On 18 Jun 2010, at 02:58, Burkhard Carstens wrote:
> > What about ExtJS being GPL licensed? Got a developer license?
>
> Yes, if you make commercial apps.

:-(

> > 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 ..)
>
> fpWeb is general purpose framework. You may use it with any JS
> frameworks out there. Michael had made an example how to use it with
> ExtJS. So, fpWeb is already an apropriate name, IMO.
Sure, fpWeb is fine. What I mean:
1) clear distinction between 
a. "ExtJS Component" : a component of the ExtJS framework written in 
   JavaScript.
b. "fpExtJS Component" : a component of fpWeb written in pascal, 
   designed  to deal with an ExtJS component.
It's just a documentation/communication issue: "..ExtJS components can 
be modified to support jquerygrid.." vs. "..fpExtJS components can be 
modified to support jquerygrid.."
2) *if* fpExtJS components get modified to also support jquerygrid, they 
should be renamed to fpUniJS component (or so). A well choosen name, 
which reflects the functionality, relationship and restriction of a 
component saves half a page of documentation and makes it easier for a 
newbie to get an overview.

regards
 Burkhard

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


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

2010-06-18 Thread Michael Van Canneyt



On Thu, 17 Jun 2010, Burkhard Carstens wrote:


Am Mittwoch, 16. Juni 2010 23:01 schrieb Michael Van Canneyt:

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.


I already inhaled the WST chapter in Lazarus boork. Still need to read
up on SOAP and JSON.

What about ExtJS being GPL licensed? Got a developer license?


Yes.





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. If someone needs it NOW, then of course
I can help in the impmlementation.

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.

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


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

2010-06-18 Thread Burkhard Carstens
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

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] New website www.lazarussupport.com launched

2010-06-18 Thread Joost van der Sluis
Hi all,

Our company has launched the new www.lazarussupport.com website. It's a
new website about Free Pascal and Lazarus for new users. The goal is to
try to get more attention for Lazarus and to help new users to start.

The site is still very basic, the goal is to extend it in the future. As
you can see the layout of the site is based on the design from Bee. The
complete website is running on the fpWeb framework.

Please take a look and tell what you think about it.

Joost van der Sluis



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal