On Wed, 22 Aug 2007, David Lyon wrote:
> Hi everybody,
>
> As we are discussing porting delphi/fpc/lazarus apps to the web I propose we
> start discussing the available web models.
>
> I say this because at the moment I am working on a web based cms implemented
> in another programming language. It is the plone cms written in python.
>
> Interesting thing is, they have an enormous amount of good ideas that lead me
> to think that we could adapt some of the concepts.
>
> For example:
>
> - as a base, they use their own web server program. optimised to serve the
> kind of
> output that the system outputs. Translating, they have a web-server written
> in
> lazarus - makes writing and running child lazarus programs a lot easier than
> tacking them to another web server like apache.
This is not so relevant as you may think. The working is the same.
> - the use an "object publishing model". They build pages full of objects.
>
> It isn't dissimilar to Lazarus. Only that the forms are web pages.
>
> A page is built by assembling a group of objects, ie what we would call
> controls.
>
> Every (web)"object" has associated code along with it. It isn't dissimilar to
> what we are familiar with. It seems only the sequence for producing the
> outputs is slightly different in the web model.
>
> That is, in a native model, a form is produced with components. Which then
> exist for the life of the form.
>
> In the object publishing model, the web form is recreated from the object
> list, every time a significant action is performed.
>
> The object publishing model is really advanced....
They have no other option, because python is a scripting language which
is invoked from the webserver. It's stateless. I'm also not sure that we can
do what they do: python is interpreted, after all.
When creating it using lazarus there are 2 options
- Standalone app which is a webserver
- Apache module.
Both work the same way; only the former does the listening for HTTP requests
itself, in the latter it's apache which does that.
In these structures it's faster to have the form per session in
memory (stateful), so what you call the 'native model'.
It's also much easier and intuitive to program.
Michael.
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives