More recently I played around with CGI::Ajax. Interestingly the Ajax web client/server communication concept deals with the context issue in a very clean and intuitive way. Instead of the usual submit-form action the web client will directly address my server side Perl sub e.g. to request a database and the page is updated using the return values from my server side sub.
To achieve this CGI::Ajax requires a few extra functions to reside in the web client to support communication with the server. Therefore it injects Javascript functions in the head part of the HTML form before that form is sent to the web client.
The concept of cooperation between client-side Javascript and server-side Perl where the Javascript is totally encapsulated/hidden within a Perl module strikes me as a promising approach: we can make the web client more productive without having to write an extensive amount of Javascript as some set of functionality can be provided via Perl modules.
I am looking for a few modules so that I only need to maintain Perl code while I can still benefit from web client side actions.
What is your (production) experience with these concepts? Any caveats? Any Perlmonks that have created Perl modules that encapsulate web client code e.g. to deal with drag-n-drop functions and server side actions related to them? Any stable interfaces that help cooperate with existing Javascript libraries perhaps?
In reply to Encapsulating web client side code in Perl modules? by varian
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |