On Mon, 20 Aug 2007, David Lyon wrote:

> Michael Van Canneyt wrote:
> > Well, they're working at it since 2000 or earlier, so this is not
> > something easy. And you'll need to rewrite your application anyway so
> > it works...
> >   
> I don't like that idea....

You'd better get used to it :-)

> 
> on a web app (today) I have seen what look like what we know as multiple
> windows that "popup", scrolling database lists...

I know, I develop them myself, I even write articles about 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...
 
> I thought we liked the way the current RAD environment works.... I do....

So do I.

> 
> I just want that to make the same app inside a browser...

Yes, provided you design it from day 1 as a web-app.

> 
> > But please be realistic:
> > There is no way to port an application to the web by just recompiling.
> > It just can't be done. Think database access, file access etc.
> >   
> 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.

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.
 
>  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.

> 
> - 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 do this if you have a native application.
 
> > If you want to work using the web, you must program for the web:
> > client/server. The browser is an extremely restricted environment.
> >   
> Web Applications are starting to look really nice.

Yes, but they are designed for the web.

They are not recompiles of a desktop app...

> 
> Dare I say better than the widget sets we have in windows.

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.

Have you seen a winamp-like application in the browser ? 
Skins and shaped windows and all ? I haven't.

A simple ERP thingy, yes; and even so: all designed from scratch
as a web-app.

Web simply works different than desktop. 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.

Michael.

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to