Problems? Is your data what you think it is? | |
PerlMonks |
Re: MongoDB ObjectIDby 1nickt (Canon) |
on Oct 12, 2019 at 20:55 UTC ( [id://11107385]=note: print w/replies, xml ) | Need Help?? |
Hi, good choice of tools! "Should I serialize every ObjectID on the way to HTML" Yes. You should pass the data for your table to your template as a hashref or arrayref of arrayrefs, serialized to JSON. (And make calls to your Dancer app passing JSON representing SQL ops.) It'll be a long string (or you use paging). Then use a front-end framework for building and displaying the actual HTML table. I have had great success using the DataTable jQuery plugin with Dancer2 and TT2. It has great support for autoscrolling and callbacks for making cell data click into other things. There's an add-on that provides interactive CRUD ops to your server via Ajax, and also of possible note is DataTables (and maybe Web::Library::DataTables). Hope this helps! Glad to help with Dancer2 questions here!
The way forward always starts with a minimal test.
In Section
Seekers of Perl Wisdom
|
|