DataGrid + RecordSet = Awesome App

Dude, wtf, I’ve been seeing this question on Flashcoders for 3 years now; it pops up at least once a month.

“I’m putting 10 billion records in my DataGrid, and it’s slow. Any suggestions?”

…no, just abashed questions actually:
– why?
– no… seriously, why? Why are you putting that much data into a DataGrid?
– I’m not a DBA, but even I’ve heard of paging? Condescending? Dude, your the one coding RecordSets…
– can the end user actually digest that much information?
– why not present the information in a more digestable way. If you’ve ever been to cnn’s homepage, or the old NutScrape, information overload blows; if your building an app, the user is accomplishing a task. Help them, don’t throw a bunch of tools at them, put them in the right place and in the right order.
– use an interval or an onEnterFrame (broken every 2 frames since doLater is used in a lot of places in the DataGrid to redraw the dataprovider changes, and it updates the frame after you’ve changed the model) to throw chunks in the grid, small pieces at a time, whilst showing a nice modal ProgressBar. Why not do that?

Why do some people want to yuke MySQL into Flash DataGrids?

I don’t get it. :: goes to try :: …well, it does feel kind of cool… naw, that can’t be it.

12 Replies to “DataGrid + RecordSet = Awesome App”

  1. because you can do it with html? it looks like crap, and sucks for the user… but.. you can do it with html.

    that’s my 2 cents and I’m stickin’ by ’em.

    *stab* *stab* *slash*…. *thunk*

  2. Actually business ppl want it no matter how hard you try
    to explain to them..

    Any intranet applications and enterprise level applications are driven by business and they still want million records in a page. lol It’s not understandable, but sadly true. And also they don’t like paging either. If you really really have to use paging, then they will accept it. For the most cases the answer is why paging..

    That’s my observation while being in a big corporation’s enterprise application development team. That could be a part of reasons macromedia products are not used in intranet environment and not supported by IT group. It’s all about business ppl and other stakeholders of the app(who’s usually business ppl too).
    That’s my 2cents.

  3. SImply put:

    I blame EXCEL.

    I’ve had often a few requests ‘can we show me records’ in my career often by monkeys in suites… i simply go ‘why’..

    answers that typically follow:
    – because i want to sort/filter them all…
    – because i want to scroll instead of clicking 1, 2, 3 and so on..

    My replies
    1) You don’t need them all to filter/sort i can provide you with form controls to do that…again..why.

    2) If you are scrolling that much information then i am failing in presenting you the data grid. Obviously you need more search filtering what is it you need and why…

    Excel servers a purpose, but even in excel you tend to use more and more sheets then freakin 1billion rows/columns

    I blame lazy UI development and Excel mentality.

  4. Heard this a bunch too… Although, paging can be problematic sometimes too. Seems like it would be nice if the view on the dataset would get delta data on every event that altered the view… For example, clicking the down arrow causes a new request for n-records into the set. Dragging the bar causes an event to fire on an interval that requests the set that is now ‘within’ the view. Perhaps a demo within the Flash docs showing a best-practices of viewing recordsets would help alleviate the questions…

    Come to think of it, I wish the majority of text editors could do this… when you are perusing through a 50 meg logfile would be nice if the whole thing didn’t need to load, just the bits that you are currently looking at. I think some hexeditors do this, but not many text editors…

  5. Any Flash developer with any real experience KNOWS that Flash is not good/fast at parsing large amounts of data. It’s not the right tool for that job and if implemented in an enterprise environ to handle giant data loads, was done so irresponsibly. A tool is just a tool. It’s gotta have a person to swing it around and take someone’s eye out. :)

  6. said:

    ‘Any intranet applications and enterprise level applications are driven by business and they still want million records in a page’.

    Yep, that’s true, my sad reality, some times a query return me like 100 000 records, and man! thats a bunch of records to handle, at least the data grid struggled a lot. At first I was ‘pseudo’ paging the data grid, set a max amount of records to show at a time and page according to that number.

    RIght now, well I dont really care any more, sometimes I just throw all the garbage to the data grid and let it do all the dirty work, shame on me!

  7. Well, actually there is a good reason to load a datagrid with thousands of records. Some sales type applications want to show quantity and give the customer the ability to narrow or expand results on the fly. Granted, this should not be common practice, but considering the context, the customer is always right.

    So, is there a way to load thousands of records, 9 columns, all sort enabled and Flash to fizzling to a halt? :-)

  8. Hi,
    When I first loaded my flex datagrid with 190 records I was really disappointed. It was almost impossible to scroll tha grid or resize it. It seems like flex components are much slower than flash components. What is the reason??

  9. Gotta agree with an earlier post about using flash to do large data display being irresponsible. It’s all about the right tool for the right job.

    Millions of records? Don’t use a web app. Use a desktop application that can handle it, sure read the data from the intranet DB, but don’t use flash for this. Crazy.

    Look into REALBasic and Einhugur’s datagrid. It can handle enormous amounts of data. The trick it uses is it only displays and stores what has been requested (IE you scroll and it fires an event saying ‘I need Row X’s data when Row X comes into view) so at most you’re looking at 20 requests at a time. Pretty nifty if you ask me.

  10. A little late to this convo but …

    I’ll list my reasons:

    1. It’s easier to program. Paging is a pain in the ass. At least currently. If I want to “see all the records in category xyz” then show me them. It is easier to take the recordset and bind it to the datagrid.

    2. Scrolling is easier than paging. In HTML you just output the data to a table and use the scroll bar. Since it’s usually sorted alphabetically or numerically you can find what you are looking for much faster. Or use ctrl + f to find the record on the page.

    3. Paging is a hack (sortof). Paging is a way to handle a limitation of the hardware or network. Computers will get faster and 1 million will be normal and we will be told to page 1 billion records. Paging is a way to handle large amounts of data over the network. It is a way to handle the model more than a design choice of the view.

  11. Hi,
    My requirement is “Initially bind first 10 records to the datagrid. On scrolling the scrollbar need to bind another set of records. Scrolling should be on both upwards and downwards. Another requirement is I need to implement Server-Side Sorting on datagrid”.

    Please do help me in this.

    Thanks in advance…

Comments are closed.