http://www.perlmonks.org?node_id=1050368


in reply to How do I mix up Perl and jQuery (for beginners)

Yes, see if your boss will spring for some training.   Maybe at a local community college?

Let me see if I can set the stage for you a bit.   In a modern web application, there are two programs in play:

  1. The client, written in JavaScript and probably using some client-side toolkit such as JQuery, which runs on the end user’s computer, and ...
  2. The server, written (partly) in Perl, which delivers all of the web-page content to the client side and which then responds to incoming requests (AJAX ... JSON ...) that are subsequently generated by the client-side program.

Most commonly, the user simply navigates to a page, and when he does so, that page includes <script> tags which cause the user’s browser to request and to download all the script content (including JQuery itself).   Then, say, a onload event, again on the user’s browser, causes the browser to start running all that code.

That JavaScript code, running on the client’s browser, actually builds and runs most of the user-interface.   The server now takes a supporting role, not a starring one.   To obtain information, or to request that things be done, it issues asynchronous HTTP requests (AJAX ...) to the server, which is running programming that could have been written in Perl or Python or Java or Visual Basic (dot-Net) or anything-else.   Things such as “JSON” refer to encoding schemes by which the messages that are passed back-and-forth are formatted in a compact yet HTTP-compatible way.

These are “elementary basics” of the scenario, but you must understand them thoroughly before anything else will make the slightest lick o’ sense.   Training exists.   Avail yourself of it.   In due time, “the little light will come on,” and don’t feel out-of-sorts just because it hasn’t done so quite yet.   There most assuredly was a time when all of us said, “huh?”