[dancer-users] HTMX, simplicity, stability

Niels Larsen niels at genomics.dk
Sat Mar 2 22:28:36 GMT 2024


Dancer2 developers,

Are someone picking up on HTMX (http://htmx.org) like 
Django is doing? HTMX finally allows interactivity by
the server rather than client Javascript. A great 
relief for us who think the best use of Javascript is
minimal. 

I have made a rather large perl based single user DNA 
analysis package that is deployed in industry. Its 
results outputs are sets of text tables and corresponding
inter-linked HTML files that the user can navigate. 
Lately the need for more interactivity and instrument 
control has come about, and then I thought of Dancer 
+ HTMX. A simple route handler that calls my functions
that produce smaller or larger pieces of HTML should
be enough. No need for Plack, an "app" file layout,
login, security, just a route handler where I can set
the port number. Your tutorial, below this appealing
script:

#!/usr/bin/env perl
use Dancer2;
 
get '/' => sub {
    return 'Hello World!';
};
 
start;

state "We want to emphasize that writing a script 
file like this with a start command is not how you 
would typically begin writing a Dancer2 app." But 
why is that? is there a speed problem? I will have my
own cron-loop and could just make sure this runs in 
background, like I do with Apache web server. But I
must be able to set the port at install time, since
3000 may be busy for other things. Also, the route
handler will always be on localhost, i think. 

Finally, I see long-standing bugs on github and nearly
no traffic on the mailing list. This makes me wonder
if I dare base my package on it. 

Comments?

Niels L

Niels Larsen, PhD, CEO
Danish Genome Institute
Skt. Lucas Kirkeplads 8
8000 Aarhus C
Denmark

E-mail: niels at genomics.dk
Skype: niels_larsen_denmark
Mobile: +45-3091-5426 (GMT+1)



More information about the dancer-users mailing list