Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grids
Message
From
06/10/1999 16:46:22
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
Re: Grids
Miscellaneous
Thread ID:
00272082
Message ID:
00273404
Views:
27
>>Jim,
>>
>>The speed of UDF-customized grid is blazing one. The downside of read-only column is negligible. Actually, you were the person who argued that editing directly in grid is bad interface. Also, nothing prevents from employing right-click menu editing.
>>Again, the major thing is that UDF saves query time, i.e. it reduces the initial delay when user opens/refreshes screen.
>>Obviously, I don't force anyone to proceed this way, but within my own experience I am free to make these judgements.
>
>Ed,
>
>No one is questioning your judgements here. This is a dialog so others can learn by hearing you and I support our differing opinions. If someone disagreeing with your appraoch causes you to think that means your approach has no merit, then that is a different issue altogehter.
>
>In my opinion, using a UDF for anything in VFP other than an extension of the underlying language is a bad design. UDF's are procedural programming, they don't allow themselves to be subclassed, they don't provide for polymorphism, and other limitations they have. Using a method might be more OOP, however, I don't like calling anything from a grid. I use cursors for grids when I need calculated values. The cursor (usually a view) is populated with only relevant records so it is quite fast (the user specifies their desires before the grid is populated).

Actually, I used abbreviation UDF for simplicity sake only. In reality I use methods, so our differences are not so big. I also agree with you that in most situations full-blown cursor/view is quite fast. However there are certain situations when either recordset is bigger that usual, or query algorithm is complicated (multi-table joins, outers, some non-standard filtering etc.) All these things may increase query time. However, if grid itself will be entitled to do specific data retrieval (by each visible row), then it might be faster if this number (visible rows) is significantly less then number of records in recordset. This case, it's enough to retrieve by query only master file ID and get other fields through methods (or UDF :-), obviously it's ultimate case and real solution should be somewhere between: some fields are real, and some- calculated.
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform