Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: Perl Contempt in My Workplace

by vkon (Curate)
on May 05, 2021 at 13:57 UTC ( [id://11132072]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Perl Contempt in My Workplace
in thread Perl Contempt in My Workplace

So I found that the library was missing (not exactly missing - there were CPAN modules which haven't fulfilled my needs)
but I found what I needed in nodejs ecosystem http://www.npmjs.com/

But I see your point about creating such a module myself and uploading it to CPAN. And ~10 years ago it was the approach which I probably have choose, because all other libraries are here on CPAN.

Perl have lost critical mass of its users, who will fill the gaps on missing modules, unfortunately for me and for other perl users.

Replies are listed 'Best First'.
Re^4: Perl Contempt in My Workplace
by marto (Cardinal) on May 05, 2021 at 13:59 UTC

    "who will fill the gaps on missing modules"

    Various 'Datatables' modules exist on cpan, you didn't say which ones you tried and how they failed. Luckily, you don't need a perl module to return the data required for datatables, as has been made clear to you, the perl core modules achieve this without issue.

      this is what I've tried
      use strict; use DBI; use DataTables; my $dbfile = 'base.db'; my $dbh = DBI->connect("dbi:SQLite:dbname=$dbfile","",""); my $dt = DataTables->new(dbh => $dbh); #set table to select from $dt->tables(["t"]); #set columns to select in same order as order of columns on page $dt->columns(["LPAR", "UCODE", "BOX", "Serial Number", "Box Name", "TE +ST", "N_OF_TEST", "N_OF_ERR"]); use Mojolicious::Lite; #print json back to browser get '/data-source' => sub { my $c = shift; $dt->print_json; }; app->start;
      Ok, now I've remembered on what's missing here.
      I need to work with database of 10_000_000+ records, those do not fit just JSON.

      I see that this module recently updated... How can I trust version 0.08? Author makes it clear that the module far from robust?

        DataTables doc makes clear that for a set that large you need to use server-side processing. This involves passing query params to a listening program on the server, for paging, filtering etc. It may be possible to write a plugin for a web framework providing the ajax routes, but there'd be so much config based on the individual application that it's difficult for me to see how to abstract enough to make it useful.


        The way forward always starts with a minimal test.

        "I need to work with database of 10_000_000+ records, those do not fit just JSON."

        Again, this has nothing to do with perl. The DataTables (JavaScript library, not Perl module) is very clear that you're doing it wrong, you can't have read the documentation for the tool you've decided to use. Server Side Processing. This would be the case regardless of what language you choose. You could or add clauses to your search query and/or page results, neither of which you've done. I don't use this module at all, and just return JSON data as explained earlier.

        "How can I trust version 0.08? Author makes it clear that the module far from robust?"

        Where does the author make it clear that is it 'far from robust'? How do you trust any other module or code you pull down regardless of language? Again, no perl/cpan issue here.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11132072]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-25 19:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found