Aldeed:tabular vs aslagle:reactive-table


#1

What are the main differences between these two packages:
aldeed:tabular & aslagle:reactive-table

When to use which.
The “examples” provided on atmospherejs for these two packages, tend to show that they are very “similar”?


#2

I tried aldeed:tabular and ran into problems because it is cumbersome and not flexible, particularly when you have a parent-child data relationship.

I now use aslagle:reactive-table.


#3

Hi tab00, Thank you for the quick reply…


#4

Just to follow up: I’ve been using aldeed’s package for over six months now, and I agree that it can be cumbersome, and the learning curve is a bit steep, especially compared to the relative ease-of-use provided by datatables.

That being said, you can do just about anything with those tables once you figure it out. The only current limitation I run into is the ability to search joined/manipulated columns. The workaround is making sure the data that you want to be searchable is entered into the document, which leads to data duplication. For instance, I have a unix_timestamp field/value that I can send to a helper to make look pretty, but that helper output isn’t searchable, so instead I have a formatted_timestamp field that is actually in the doc (and searchable).

Not advocating for or against any one solution, but thought another perspective may help!


#5

Hi vigorwebsolutions, Thank you for sharing your views on this…


#6

I must say, I found aldeeds package really simple to implement, I’ve been using it in production for almost a year.


#7

Hi! I’m facing this decision too right now. What to choose - tabular or reactive-table…

They seem like they do mostly the same things. Which one is easier to get into, and handles common things like filtering, pagination/infinite scroll and subscriptions best? I would love some more input from people with experience :slight_smile:


#8

I have used both in production. Aldeed:tabular cannot operate with data from arrays where aslagle:reactive-table can. I also found that aslagle:reactive-table was smaller, but offered less features. I write my own tables from scratch now but my experience with aslagle:reactive-table was better on the whole.


#9

Thanks!
I went with reactive-table. It was an easy setup and I got everything I needed. A lot neater than the non-componentized tables I had cobbled together hehe. By just adding a Template.reactiveTable.onCreated callback with some jQuery hacks I was able to give it infinite scroll too :slight_smile:


#10

Are you willing to share your infinite scroll code?


#11

Sure, here it is. There are some performance problems though, as I realized the entire table gets rerendered when you add rows.

Template.reactiveTable.onCreated(function(){
  var t = this, rows = new ReactiveVar(50);
  t.data.settings.rowsPerPage = rows;
  t.data.settings.noDataTmpl = Template.noData;

  $(window).scroll(function(){
    var table = $('.reactive-table');
    var rowCount = $('tr').length;
    if(table && $(window).height() + $(window).scrollTop() + 50 > (table.offset() || {}).top + table.height()){
      if(rows.get() < rowCount + 10){
        rows.set(rows.get() + 50);
      }
    }
  });
});
Template.reactiveTable.onRendered(function(){
  var t = this;
  $('.reactive-table-container input').keyup(function(){
    t.data.settings.rowsPerPage.set(50);
  });
});
Template.reactiveTable.events({
  'click th.sortable': function(e){
    Template.instance().data.settings.rowsPerPage.set(50);
  }
});

#12

There are approximately 500000 rows in one of the tables of our app.

Would aldeed:tabular or aslagle:reactive-table be better at handling a table this size?


#13

You would probably want to have some sort of server-side pagination/filtering with so many rows. Rendering a 50,000 row paginated table would be quite expensive both in terms of DOM manipulation and bandwidth.

We also had difficulty using aldeed:tabular to render and search data with relationships, so decided to use aslagle:reactive-table instead.


#14

I have used aslagle:reactive-table for a production app and it’s working fine. Although, learning curve was steep especially related to custom filters. Also, there were some issues that I just couldn’t fix ex. freezing the table header (<th>) for a vertically long table. If anyone has done, I am all ears :slight_smile:


#15

Thanks for your reply @brylie :slight_smile:

On a different thread, I read that aldeed:tabular does server-side pagination as well…

Has anyone any thoughts on either package’s server-side pagination?


#16

I’m answering my own question here…

I have tested both aldeed:tabular and aslagle:reactive-table.

Our bigger table seems to prefer aldeed:tabular.

Has anyone any thoughts?