r/angularjs • • Mar 30 '15

Why The World Needed Another AngularJS Grid

http://www.angulargrid.com/why-the-world-needed-another-angularjs-grid/
61 Upvotes

18 comments sorted by

5

u/andwaal Mar 31 '15

Had the same challenges he describes way many times. Actually ended up with KendoUi grid. Jquery based, but supports angular. Expensive, but cheaper by far than to roll you own. The killer feature is not the performance, but the great server side support for filtering and paging. Why put n x 1000 rows on your client when you can introduce paging and do the heavy lifting server side instead?

Anyways excited to see that someone trying to solve this in a open source solution!

5

u/ceolter Mar 31 '15 edited Mar 31 '15

n x 1000 rows in the client is useful so you can filter, sort and group in the client, and it will work much faster than if server side paged (assuming you don't mind the initial load time for the client) - not to mention the possibility of charting (I plan to get in 'click to chart' functionality). Also, once you get the data in, you don't need to do anything else to get the advanced grouping / filtering etc, if you wanted to filter or group you server side, that would be work for you!

and lets not forget columns, even with a 'page full of rows' and 60 columns (yes my app has 60 columns, it's an enterprise app), ui-grid was a pile of crap (the app i mentioned in my article where we have to rip ui-grid out was less than 100 rows) - the vertical scrolling in ui-grid was soooooooo poor.

2

u/prettycode Mar 31 '15 edited Mar 31 '15

Why put n x 1000 rows on your client when you can introduce paging and do the heavy lifting server side instead?

Because you're making a round trip to the server, and probably also to the database.

If your UI can handle it, as much data as possible should be pushed down to the client, don't you think?

That's also assuming of course that your development group has the time to write a UI that handles bigdata appropriately. :)

2

u/andwaal Mar 31 '15

In our case we got 11k rows and possible 166 columns. By default we got paging with 150 rows per page and 10 enabled columns(user may enable/disabled columns). By using heavy caching we manage a server response on average 200ms and even shorter redraw time on the client-side. All actions are done server-side, sorting, paging and filtering.

We might have got the client to handle it, but it would be a stupid thing to focus our efforts on when its possible to make it so much better by doing the heavy lifting server-side.

On a side note, in my opinion, a common issue with front end development is that people tend to try solve to many problem client-side. It might be that they they feel front-end is their domain and this is where the problem should be solved, when in fact many of the problems people are facing could be solved very easy server-side. Large data sets is one, exports of data sets to csv/excel as mentioned above could be another example. It a browser and it's an environment you can`t control. Even though it feels super-snappy on you iMac with monster CPU, it might not be the same experience on an old crappy computer or even worse an underpowered Citrix intranet solution. So why take the chance when can can optimize your effords improving the part of your application you actually can control?

With that said im very impressed with this grid and will probably use it in project with smaller data sets than the problem im working on right now. Keep on the good work with the grid the enerprise needs this.

0

u/[deleted] Mar 31 '15

[deleted]

1

u/ceolter Mar 31 '15 edited Mar 31 '15

imize your effords

I agree with everyone on this chat! Think we'd make good drinking buddies!! . . . . . I've spent a lot of time on all parts of the stack, and understand the problem of "GUI guys want to do everything in the GUI", "Server guys want to do everything in the server" and "Database guys....." - so yes, it's a 'best solution for the job'. I have a vision of internally facing enterprise GUI grids on fast networks (so fetching the data is fast) with fast browsers that can do slice & dice of data in the browser. The trend for data has been moving away from the database disk - what I mean is, 15 years ago, data-warehouses was about querying the star schema for each query. Now with large memory on servers, loading the data into server memory is possible, and hence we have the 'in-memory-databases' and 'no-sql-databases' . . . as networks and CPU and memory improve, the data comes closer and closer to the GUI. It is inevitable, for certain category of reporting apps, for the data to migrate closer and closer to the user. I think that will open up a form of analysis with everything in the GUI previously not possible when working of a remote dataset, for example giving a graphical representation of the data, with the graphic driving a drill-down that's represented in a grid.

8

u/CarpetFibers Mar 31 '15

Well, shit. I just finished a massive application built on ng-grid, but this is giving it a run for its money. I may have to look into replacing ng-grid with this at some point.

Do you plan to implement features like data export to csv (which is a really attractive feature of ng-grid in my opinion)?

3

u/[deleted] Mar 31 '15 edited Mar 31 '15

Check out ngWidgets's ngxGridView. It's JQWidget's implementation of their controls in AngularJS. http://www.ngwidgets.com/angularjs-widgets/

It works pretty well for me so far

Edit: I should mention it has the export functionality built in

1

u/ceolter Mar 31 '15

Had a look at ngwidgets - looks nice. However I'm not convinced. It appears to be a wrapper around jqxWidgets. There is no option to use AngularJS in your custom cell editors. Also I don't see any option for providing custom filters, and if there was, don't see allowing AngularJS in here either. Styling appears to be tied to just changing the background colors?? Also no examples for large data. I think this might be just jqxWidgets presented differently, in which case, I'm probably going to have the same issues using it :( . . . .

1

u/[deleted] Apr 01 '15

I'm not yet sure if it's just a wrapper. I created my own grid directive wrapping their jqxGrid before they had their Angular stuff released. Having Angular cell data in the jqxGrid was an enormous hurdle that required some pretty hackish coding to get around; I haven't got to this point yet in the ngxGridView but am now dreading it.

1

u/CarpetFibers Mar 31 '15

I have no idea how this is the first time I've seen these widgets. These are really well-made. Thank you!

1

u/zomgwtfbbq Mar 31 '15

For me, I think the reason is this - http://www.ngwidgets.com/license/

I'm not saying they aren't worth paying for, we just tend to only use FOSS stuff on our projects. Those controls really are nice though.

1

u/[deleted] Apr 01 '15

Agreed. Luckily I work for an institution that qualifies for the free version.

3

u/beau6183 Mar 31 '15

github, bower.json and cdnjs submission, please!

2

u/ceolter Mar 31 '15

Already on github! bower.json and on my 'to do 'list.

2

u/Strat-O Mar 31 '15

Excellent article, Excellent justification for a new grid, Excellent all around! And thanks--rueful ng-grid user.

1

u/dvidsilva Mar 30 '15

Cell renderers and grid themes allow customized behaviours and look and feels.

looks pretty good, will try it out

1

u/oliverzy Mar 31 '15

wo, it's great to see that finally angular community will have one grid component for enterprise web application. I will definetly give this one a serious try, thanks

1

u/TheAceOfHearts Mar 31 '15

Whoa, I'm amazed. This actually has good performance, even with 100 columns.