On Tue, 21 Aug 2007, David Lyon wrote:
> Michael Van Canneyt wrote:
> > I know, I develop them myself, I even write articles about them.
> >
> Oh really ?
>
> So it is possible that you could do a Lazarus article in a Linux magazine at
> some point in the future if you had the time ?
I already do, and often. But all in a german magazine, and I am not
allowed to write for other magazines. (I could, but then I would no
longer be allowed to write for them)
> > > what I am proposing is keep the lazarus app... but when compiled, runs as
> > > a
> > > javascript app without rewriting it.
> > >
> >
> > That is not possible. Maybe with a 'hello world' app, but not with a
> > real-life application...
> >
> In software anything is possible....
>
> Others are telling me that it is already being done....
> > I just want that to make the same app inside a browser...
> >
> >
> > Yes, provided you design it from day 1 as a web-app.
> >
> Yes, in todays tools, that is possibly true.
>
> But Lazarus designs controls on a form with coordinates.... and has events....
>
> Please explain why that isn't possible to do a conversion of such an app using
> Javascript ?
Are you going to compile the pascal to javascript ?
> > > I'm not so sure it cannot be done...
> > >
> > > ok, let us look a bit more closely at those items....
> > >
> > > - database - all web apps, ie perl + python can access the db. It isn't
> > > significantly
> > > different than what we have in fpc. What I mean by this is that they use
> > > recordsets
> > > and database classes just like what we do.
> > >
> >
> > Either you miss the point, or I explain it wrongly.
> >
> > The DB API is not available in the browser.
> > So you need to totally implement a new database API to be able to access it
> > through the browser.
> >
> > This cannot be accomplished with a mere recompile of a desktop app: you need
> > to use the "web DB API" components or whatever you wish to call it, if you
> > wish to access the database from within the server.
> >
> So what you are actually doing is explaining a possible solution, right ?
What I am saying is that the solution always involves recoding the app.
(due to the asynchronous nature of things).
>
> If the things you say are done, then a solution is possible ?
>
> That is how I am reading what you are saying...
>
> > To make it specific: suppose you have an existing application, coded with
> > TDBF, accessing a dbf file. There is simply no way to just recompile this
> > so it works in your browser.
> >
> > You'll have to replace the TDBF with something else that talks to the
> > webserver, which then maybe uses tdbf to access the file, and sends
> > responses
> > back to the browser (asynchronously, because that is how AJAX works).
> >
> > Then you must use this new component in the application, and take care
> > of the asynchronous nature of the AJAX process -> again something to be
> > changed.
> >
> yes, perfect.
>
> You are a master problem solver !!
Partially, the problems can be solved.
>
> >
> >
> > > What is different is the rendering of the grids. They would be rendered
> > > via
> > > javascript
> > > instead of being rendered using the window manager api.
> > >
> > > In regards to the database location, that just sits on the LAMP server,
> > > and
> > > not the "database" server as we know it. It is still the same database,
> > > just more
> > > likely to have a web server on it as well.
> > >
> >
> > Exactly. And for this you need to implement a new set of components.
> > So a mere recompile is not an option.
> >
> Once again, you are describing how it might be possible.
>
> >
> > > - file - files now sit on the web server in the appropriate data
> > > directory. We
> > > might have to change program paths. Something we are already doing in
> > > the
> > > upgrade to vista.
> > >
> >
> > I am talking about access to the local file system where the browser is
> > running. I am talking about accessing MS-Word or OO-Writer using COM. I am
> > talking about registry access, or .ini file access.
> >
> > You cannot do this from within JavaScript.
> >
> You can read files from the server with Javascript.
Yes, but suppose I NEED the file on the browser side. Then what ?
and I MUST start Word, have it fill in some document and send it to
the printer. Then what ?
> > The widget set is the least of the problems. You can make any
> > windows app look just like a web-app. Only: no-one does.
> >
> True. Because they don't have the "Legacy" apps that we do.
>
> We have millions of lines of Pascal code we want to port across.
> > Have you seen a winamp-like application in the browser ? Skins and shaped
> > windows and all ? I haven't.
> >
> Yes. Within Plone. It is a python based CMS.
It shapes my actual IE or Firefox Webbrowser window ?
Can you prove this ? Screenshots ?
I'm NOT talking about the content inside the browser window, that's easy,
or even a window floating inside the browser window. I mean the actual
browser window.
> > Web simply works different than desktop.
> A little different yes. But web apps are looking more and more like native
> apps every day.
>
> > Morfik has a decent
> > approach, IMHO the only correct one, which allows you to code
> > your web application almost as a desktop one. But the 'almost' is the tricky
> > thing... You cannot completely hide the fact that
> > you run inside a limited browser environment.
> >
> Well you are once again saying it is possible and that there is a "correct"
> way.
Well, let's just say that I understand what you mean.
Only my idea of 'recompile and run in browser' is:
an absolute no-effort, load-existing-desktop-app and recompile kind of thing:
no compromise on previous functionality.
(such as moving files from the desktop to web server).
And _that_ is definitely out.
This was even not possible with the win32->.net change in Delphi.
There was always reworking involved :/ (vanilla apps not considered)
If we're talking 'coding an app in Lazarus as if one was coding a desktop
app' then my answer is: yes, this is possible. See e.g. Delphi's Intraweb.
(but then much more advanced). What is more, we're working on it. Slowly
but surely...
Michael.
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives