What is the best way to develop a multi-user web frontend for a Delphi / FPC client/server solution?
I need to develop a web frontend for my Delphi/FPC client/server solution. The solution is a database app that displays grids and allows users to search and update data using a client software.  The solution has multi-user support so each user needs to logon to the client using a uid and a password.

Now, my users want to be able to access the database using a web client. As a result, I've been doing extensive research on RIA, commissioned a prototype based on ExtPascal (an ExtJS wrapper for Delphi/FPC) and also another one that uses ExtDesigner to link up to a FPC directly. For both prototypes, we had web session management for multi-user login.

The ExtPascal based prototype was totally unsuccessful as ExtPascal turned out to be buggy and not suitable for production use. The second prototype that uses ExtDesigner was successful but the amount of work to create and debug even a simple prototype was tremendous, the learning curve was significant. The other issue which I later discovered is that ExtJS apps don't work on mobile phones, this is an even greater problem than the earlier one.

Now, I'm looking for alternatives, particularly JQuery which is suppose to be simpler to use than ExtJS.

I'm trying to figure out which is the best way of making JQuery work with Delphi/FPC.  For example, should we let JQuery handle the entire session management?  Should we embed JQuery within Delphi or should we let JQuery send AJAX calls to the Delphi CGI?  I would appreciate any valuable insight that any of you may have.  Thank you.  :)
What is the best way to develop a multi-user web frontend for a Delphi / FPC client/server solution?
===

I need to develop a web frontend for my Delphi/FPC client/server solution. The solution is a database app that displays grids and allows users to search and update data using a client software.  The solution has multi-user support so each user needs to logon to the client using a uid and a password.

Now, my users want to be able to access the database using a web client. As a result, I've been doing extensive research on RIA, commissioned a prototype based on ExtPascal (an ExtJS wrapper for Delphi/FPC) and also another one that uses ExtDesigner to link up to a FPC directly. For both prototypes, we had web session management for multi-user login.

The ExtPascal based prototype was totally unsuccessful as ExtPascal turned out to be buggy and not suitable for production use. The second prototype that uses ExtDesigner was successful but the amount of work to create and debug even a simple prototype was tremendous, the learning curve was significant. The other issue which I later discovered is that ExtJS apps don't work on mobile phones, this is an even greater problem than the earlier one.

Now, I'm looking for alternatives, particularly JQuery which is suppose to be simpler to use than ExtJS.

I'm trying to figure out which is the best way of making JQuery work with Delphi/FPC.  For example, should we let JQuery handle the entire session management?  Should we embed JQuery within Delphi or should we let JQuery send AJAX calls to the Delphi CGI?  I would appreciate any valuable insight that any of you may have.  Thank you.  :)