[fpc-pascal] Servlet server for Fpc apps

Dariusz Mazur darekm at emadar.com
Mon Mar 30 20:00:15 CEST 2009

Michael Van Canneyt pisze:
>>> 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.
I don't agree. Only one requirement should be fulfill, respond in 
reasonable time, say less than 500ms.
My way:  only visible rows are send to browser, say 30 rows, they took  
about 3kb, time 3ms in LAN, 100ms when server is on second side of 
world. Rendering 100..300ms, on slow browser maybe longer. Even it it 
will be done after each of user action its no problem for server neither 
rest of infrastructure. On application side: its no matter that is 
desktop or web based, events and response are the same.

Your way: first transmit whole database to browser, JS compute what part 
should be display. When set of date is bigger you can send partial. But 
after select combobox all data must be send  to compute filtering. On 
slight set it may work, but not on big.
But even on small sets of data time of response will be notable (I've 
seen  ExtJS demo, its only on browser side, and its work rather slow, 
can you expect, that most of your code will have better optimization)

And what about transfer tons on JS to browser?
>> 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.
I cant found any site/application prepare by Morfik. Do you know any 
site, that I can see it at work.


More information about the fpc-pascal mailing list