Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5968075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:02:15+00:00 2026-05-22T20:02:15+00:00

There are already questions about the Perl+AJAX, like here , here or here and

  • 0

There are already questions about the Perl+AJAX, like here, here or here and several others. They’re more than 2 years old and I was hoping for some new stuff.

The questions are:

  • What is the most preferred method today making AJAX apps with a Perl backend?
  • Are there some active and commonly used Perl modules that help build AJAX based applications?

Something, for the usual workflow:

 if clicked this button (or changed this field.. etc),
 POST these data to the server,
 read the JSON answer,
 and update this/these DIV(s) in a DOM... etc.

This question is can be classified as vague, but I’m really lost and need help with this: what is the most common way making AJAX apps in the Perl world, TODAY.

Looking for a helper module that help me build the browser-side javascript.

I found these:

  • https://metacpan.org/pod/OpenThought
  • https://metacpan.org/pod/HTML::AjaxTags
  • https://metacpan.org/pod/CGI::Ajax (but this is CGI based and IMHO not the best for Plack world)

These modules have not been updated for several years. Are they stable and in use? Or are they deprecated and is there some better way? (for the modern Perl technologies – like Plack).

UPDATE

As I read answers, I’m thinking that the main problem is probably in my English. I don’t know how to express myself right.

I know Perl. Maybe I’m not an expert, but I wrote several thousand lines of code. I know Dancer, and already write some apps in Mojo…::Lite. Know JSON{::XS} and I know how AJAX works.

Now (for some reason) I prefer using Mason2, with Mason::Plugin::RouterSimple and several other CPAN modules and Moose. Catalyst, Jifty are too big for my needs.

Back to the question:

My favorite JS framework is jQuery, I’m using it in several projects for modal windows, or accordions, tabs etc.

BUT

My main problem is exactly in Sismetic’s answer. I don’t want to write JavaScript. Don’t like it. (Don’t know it very well, and hate every language where I must write something like: var arr = new Array(); instead of my @arr)

So, looking for a solution, how I can minimize (or in the ideal world – totally eliminate) the need of writing the JavaScript code. Don’t want write into my templates

$('.clickableButton').click(function(e) {
      .... etc... etc..
)}

but something like:

 $ajax->make_button( -onchange=>$url, -updatedom=>'#thisdiv", some_special_button_description_in_perl );
 $tohead .= $ajax->gen_libs();
 $tohtml .= $ajax->gen_html();
 $jsdocready .= $ajax->gen_jsinitcode();

An in my templates will output only $tohead in the head part (so include jQuery), $tohtml will come into body, and $jsdocready will come into the end of body as JavaScript init code.

Offcourse, the above is an very stupid example, but hopefully shows what I mean. Simply: The ideal solution was (probably does not exists) is totally eliminate the need writing JavaScript, only Perl code what will generate the needed JS.

Therefore I mentioned the above modules, especially https://metacpan.org/pod/OpenThought, because these really help minimize writing JavaScript. The problem is – these have not updated for 2 years. ;( And unfortunately – I don’t know any others.

  • 1 1 Answer
  • 3 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T20:02:16+00:00Added an answer on May 22, 2026 at 8:02 pm

    The reason you’re not getting answers isn’t just the vagueness of the question. The problem space is very wide and has a many angles of attack.

    Let’s clarify that the “x” in Ajax shouldn’t be taken to mean XML anymore. JSON is obviously more natural and doesn’t suffer from nearly as many problems so all my advice will point toward it.

    What hobbs said already is right on. You do not want to mess with the server-side code much at all but adopt a framework. This is not because dealing with Ajax is hard in Perl; it’s trivial. It’s because the problem space gets messy quickly and you’ll end up repeating your code in endless minor variations. So–

    Perl/Server-side

    Any of these will make you happy eventually. They all have a learning curve. There are other options but these are the Best™.

    • Catalyst (Catalyst::View::JSON)
    • Dancer (Dancer::Serializer::JSON)
    • Mojolicious (prefer Mojolicious for HTML5/Websockets)

    Deployment SHOULD be Plack/PSGI based.

    Take the time to really learn the core of Perl’s Ajax handling: JSON(::XS) so you know what the views in the various frameworks do under the covers.

    JavaScript/Client-side

    This is essentially an embarrassment of riches at this point.

    • jQuery
      • Many Perl hackers like this kit; it seems to hit the same sweet spot Perl does. I adore jQuery.
    • Dojo
      • I’m not a fan — they had the worst documentation possible in early versions and broke compatibility while deleting what little docs used to exist — but it’s well-liked in its current version.
    • MochiKit
    • MooTools
    • YUI
    • ExtJS
      • This, now distant, fork from YUI is the 800lb gorilla of client-side JS. I personally dislike it because of its lack of graceful degradation, et cetera, but it is highly regarded and very sharp looking out of the box.

    I personally dislike and can’t recommend prototype and though I’ve never used it I also chose not to put script.aculo.us on the list.

    There are plenty of other amazing specialty kits out there too; e.g., Modernizr. When you are looking into JS, consider how important standards compliance and forward-looking features like CSS3, HTML5, extended event handling like multi-touch are to what you’ll do. Good luck and have fun.

    Update: Possibly of further interest

    • Jemplate – templating in JavaScript
      • Catalyst::View::Jemplate
    • Jifty – YAWF
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here are already several questions in SO about the safe template languages , like:
There might be several questions about this already but I'd like to get an
There are already several questions with a similar title, but they received either no
There were questions about multilingual apps in MVC here on SO but they were
I know there are already several similar questions here, but I need some recommendations
There are already some questions about dependency managers here, but it seems to me
There have been several questions already posted with specific questions about dependency injection ,
I know that there are already several questions on StackOverflow about std::string versus std::wstring
I know there are already several questions about renaming files by using a version
Ok, I know there are already questions on here about this but none are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.