Did anyone here ever try Morfik? IMO, that's the best way we should implement Lazarus web-widget, even better than IW. Morfik makes things simpler by separate browser side event and server side event. Browser side is handled by JavaScript code, while the server side is handled by an application server (could be a CGI app or an Apache module).
Any browser action which requires to be proceed on server side would request to application server through Ajax request. The reply then will be represented on the browser side using Ajax techniques. The biggest advantage that's offered by Morfik is that we could write the browser side using object pascal too. Morfik would "compile" it into browser side JavaScript (plus auto generated HTML and CSS files), using something they called as JST (javascript synthesist technology or whatever), similar to gwt (google web toolkit). On the server side, Morfik compile object pascal code plainly using FPC. For client-server communication, they're using web service (SOAP?) protocol.
I think the idea is very possible to be done. For early stage, we could ignore about the OP to JS compiler. We could think about this on the next stage of the development. First, let the developers code the browser side event using JS. To ease our web widget effort more, we don't need to build the JS widget entirely from zero. We could use JS GUI frameworks from out there. There are some frameworks to choose upon: extjs (dual license ala mysql), qooxdoo (MPL), jQuery, and YUI. Personally, I prefer extjs though I'm not quite pleased by its license scheme. It's because extjs, AFAIK, has the most complete and stable JS GUI framework plus a comprehensive documentation. I found it the easiest framework to be understood and used. It also has almost any standard GUI controls as on Lazarus component palette, even better.
So, for the start, we could focus on 2 things: (1) web widget that transforms LFM into HTML+CSS+JS using chosen JS GUI framework, and (2) standard client-server communication protocol (using JS GUI and Ajax request on browser side, and app server and web service on server side). But, due web application way of works, we couldn't transform desktop app into a web app or vice versa. Just like IW or Morfik, developers should had known that s/he would build a web app since the beginning.
Had anyone done this? What do you think?