We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

JQuery Datatables

Hi, Any body have integrate Jquery Datatables?

That's a client side plugin - nothing to do with server side or Phalcon.



969

Hi, take a look at https://github.com/lampjunkie/php-datatables I've used this for my last project. It works ok, but the architecture of the component isn't very nice.

Next time I would integrate DataTables with templates (client-side JS) and the server-side (REST calls) is nothing else than a DB query.



16.3k

@l-e-X i've tried https://github.com/lampjunkie/php-datatables actually i am new to phalcon and try to use Phalcon in my projects but i was stacked when the project need jquery datatables integration so i am back to laravel and codeingniter. :D but Phalcon always on my head ;-)

@quasipickle here are laravel integration https://github.com/Chumper/datatable https://github.com/bllim/laravel4-datatables-package

and here is codeigniter integration https://github.com/IgnitedDatatables/Ignited-Datatables/

Currently i worked with DataTables in one of my projects. And that's it, a Phalcon DataTables component - https://github.com/m1ome/phalcon-datatables. Currently not all DataTables features support, and it's not covered by any test suite's, but i will work for it!



775

I have used them What is your main problem with datatables?

edited Dec '15

it seems to me, or you have taken from the database all the data, and front-end displays have by limits? If so, then your adapter will harm performance at larger tables.

Currently i worked with DataTables in one of my projects. And that's it, a Phalcon DataTables component - https://github.com/m1ome/phalcon-datatables. Currently not all DataTables features support, and it's not covered by any test suite's, but i will work for it!

This adapther have 3 ways to get data from DB:

  1. QueryBuilder
  2. ResultSet
  3. Array

In 1 there were be query builded to fetch all data (with limit and so on). In 2 some DB's like Postgres will use a iterators and will stop when it should, and not grab all data from DB to memory. Only in 3 way all data will store at memory array.

And in conclusion - no, my adapter not fetch all data from DB. It have a choice for user and only user use way they want.

it seems to me, or you have taken from the database all the data, and front-end displays have by limits? If so, then your adapter will harm performance at larger tables.

Currently i worked with DataTables in one of my projects. And that's it, a Phalcon DataTables component - https://github.com/m1ome/phalcon-datatables. Currently not all DataTables features support, and it's not covered by any test suite's, but i will work for it!

Павел, спасибо за ответ. Просто мне наверно так показалось из Ваших примеров в .README я даже сделал логирование ф-ии count у resultset. и в любом случае (при начальной загрузки или при пагинации) в логах всегда было полное кол-во записей в таблице бд. Но возможно это по неопытности что-то не понимаю.

Спасибо за ответ.

You will see your standard listing requirements. https://github.com/ozrsrk/pDataTable