[fpc-pascal] Servlet server for Fpc apps

Michael Van Canneyt michael at freepascal.org
Mon Mar 30 17:57:30 CEST 2009



On Mon, 30 Mar 2009, Dariusz Mazur wrote:

> Michael Van Canneyt pisze:
> > On Mon, 30 Mar 2009, Dariusz Mazur wrote:
> >
> >   
> > > Michael Van Canneyt pisze:
> > >     
> > > > On Mon, 30 Mar 2009, Dariusz Mazur wrote:
> > > >
> > > >   
> > > >       
> > > > > > I want to write my client-side GUI code in pascal. I have no wish to
> > > > > > learn
> > > > > > Javascript. All extensive computation (mostly queries and database
> > > > > > stuff)
> > > > > > happens on the server, but the GUI must be programmed in Javascript
> > > > > > because
> > > > > > that is all the browser understands. 
> > > > > >   
> > > > > >       
> > > > > >           
> > > > > Yes, You have to had client-side write in JS. But its not so huge  as
> > > > > You
> > > > > imagine.
> > > > > But maybe I dont understand your need.
> > > > > You think about counterpart of LCL level, or computation wide consist
> > > > > in
> > > > > event
> > > > > (form.onclick, form.onedit) function in Delphi ?
> > > > >     
> > > > >         
> > > > All events and almost any class I need should be available in the
> > > > client...
> > > >
> > > >   
> > > >       
> > > What for?
> > > You want to move 20% of application to browser. And you think that will be
> > > faster? more flexible?
> > > will  work on most browsers?
> > > I dont think so.
> > >     
> >
> > What I want doesn't matter. Our clients want rich web 2.0 webapps. 
> >   
> that is no problem at all, I can prepare every site as want,
> But problem is: internet application should have the same behavior as desktop
> or better, not less in any point.
> Do you try to achieve browser key: back and reload aware without communicate
> with server.
> And what about keyboard enabling, modal dialogs, grids with more than 100k
> lines without slowdown
> I've test ExtJS and they not care about it (so deep as I need)

I know, Morfik does all this.

> 
> > I just want to make them in pascal and keep the codebase and know-how I have
> > in my team.
> >   
> As I. I want (i;ve done succesfully) reuse 90% of desktop code in webbased.
> But you want to rewrite quite huge part to JS. Why? What for.

Because some of the (rather complex) business logic must be in the client 
to make it respond as a desktop application. 

A simplified example: 2 sets of data. 2 comboboxes. User chooses from set 1
in combobox 1. Based on his choice, the data in the second checkbox must be 
filtered. This must be done without round-trip to the server, because the
data 2 set is large, and combobox 1 is used often. So I need some part of the 
business logic (complex relation between items in 2 sets of data) on the client.

> Till now there is no example of  any issue, that cant be done without
> translating pascal to JS without preserve all needs.
> 
> > If it was up to me, client/server would do the job just fine. But I cannot
> > ask all parents of all pupils of all our schools to install a client
> > application:
> > a) They don't want it. They are mostly computer agnostic, but they can surf
> > the internet.
> > b) Our helpdesk would find and emigrate to an unknown island somewhere in
> > the 
> >    south pacific because of the installation and upgrade problems :-)
> >   
> I agree. But I think that is new niche (cloud computing) and chance for me.
> This is quite new opportunities,  many approaches , and we should know how
> choice proper.

As far as I'm concerned, Morfik is the correct approach. 
If I can do what they do in Lazarus and open source: I'm sold.

Michael.



More information about the fpc-pascal mailing list