IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Grid views, basically
Customer (or vendor) gets a view of all current orders. They want sorting and filtering by clicking on column headings. It's trivially easy to create a control in Visual Studio that does a single query, then keeps everything in memory doing sorts, filters and paging on that data set.

Whether that's a good thing to do is the question. We just had a meeting on this and two of us insisted that we should be hitting the DB for every sort and filter operation. I can live with keeping it in memory for paging, because it avoids the pathological case: User is on page 2, a record is at the top of page 3. Before they click "next" someone clears an item on page 1 or 2. Now I'm on page 3 and I never saw that record, which is now on page 2.

Maybe that's not worth having a different mechanism for paging than for sorting/filtering. Maybe I'm just trying to find a middle ground between what we have and what I think we need, so there's less resistance to doing it.
--

Drew
New Re: Grid views -- thoughts
My answer is "it depends". What's the size of the data? Is it enough to go to the browser and allow it to store/sort it (usually not).

Do you have enough memory to store it at the web server layer? (Sometimes yes, sometimes no)

Do you have an N tier? An Application Server between the Web Server and the DB that can store it there?

Finally, then look at storing it in the DB. Is the data static or changing? Dynamic data might force you to keep a cursor open (Not good). Static (or near static) and you can pull down the set of rows you need by providing a start/stop/ordering-filtering conditions.
     Question on DB "best practices" - (drook) - (31)
         We don't even... - (folkert)
         Design coin flip - (jay)
         dumb datastore is easier to debug imho -NT - (boxley)
         Step away from the gun... - (malraux) - (17)
             Wow, not the response I was expecting - (drook) - (16)
                 Why that should not be in the DB: - (malraux) - (1)
                     Very interesting. Thanks for the detalied explanation. -NT - (Another Scott)
                 I wasn't expecting that trend, either. - (static) - (13)
                     Re: I wasn't expecting that trend, either. - (malraux) - (6)
                         I think I know what the problem is - (drook) - (4)
                             Paging is tricky. - (static)
                             Re: I think I know what the problem is - (malraux) - (2)
                                 Grid views, basically - (drook) - (1)
                                     Re: Grid views -- thoughts - (S1mon_Jester)
                         And ORMs have gotten better, too. - (static)
                     DB does have one key advantage here - (jay) - (5)
                         This -NT - (drook)
                         As scott said - (crazy) - (3)
                             Yes, this is where my preference is going now. - (static) - (2)
                                 There comes the moment when the constraints get dropped - (crazy) - (1)
                                     That's exactly why I want the App to know what to do! :-) -NT - (static)
         Well, it depends - (lincoln) - (9)
             5,000 to 10,000 lines long? - (malraux) - (7)
                 I still win - (crazy) - (5)
                     Let me guess - No comments, too? ;-) -NT - (Another Scott) - (2)
                         Don't recall - (crazy) - (1)
                             I remember looking at it... - (folkert)
                     Hmmm. - (malraux) - (1)
                         :-) -NT - (Another Scott)
                 they were written over a dozen years ago - (lincoln)
             Amateur - (drook)

Those bastards!
167 ms