Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Wouldn't it be cool if...
Message
De
20/02/2001 19:16:31
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00477849
Message ID:
00477854
Vues:
29
That is actually very neat and eye-opening to me. I must say I've been limiting my thought to using XML to pass data to other systems, not within my own. I think I've been afraid of speed issues. How about speed? Is it just as fast to generate XML within the method and then parse it back out by the interface (for example), as it is to open a table or view? Then there's also the issue of the time involved in generating indexes.

If the speed is comparable, then is it ever feasible to just bypass the dbf altogether and save XML files as text, working exclusively with that?

>A few years ago, I wanted the ability to pass cursors to/from objects and procedures. Now instead, I just use XML and Rick Strahl's wwXML to convert cursors to XML and back. It is freakishly simple. No data sessions to worry about.
>
>http://www.west-wind.com/wwxml.asp
>
>>As I'm sitting here looking for something to do for a few minutes to relieve my brain from intensive coding, I'm wondering about two really cool possible features which, to the best of my knowledge, don't exist.
>>
>>The first would be the ability to pass tables and cursors. Wouldn't it be very cool to have a function which could pass a table or cursor to an empty work area? How many times have you done complex logic to generate a cursor on the fly, and had to repeat it because of the issues with datasession swapping. I've created many of the above functions using datasession swapping, only to refactor them out after reading a number of opinions about switching datasessions in code. And yes, I know there is ADO which solves much of that need, but not everyone is a big fan of ADO either, and I'm prefer a native object oriented solution to a proprietary technology.
>>
>>Sometimes, you want to keep all knowledge about data in a business object, so when the time comes to retrieve data to populate a listbox, you can create a "stupid" interface which asks for and gets a read-only cursor in the specified work area. Does such a thing already exist?
>>
>>The next cool thing would be the ability to return arrays in functions (which brings up how great it would be to have pointers in VFP). I know one can pass arrays by reference, but I find that for me, that leads to code which is much more difficult to read, and thus to debug. I have so much code that returns arrays via reference and it frequently leads to subtly sloppy and complicated code.
>>
>>I'm curious what others think of this - and ask that if I am being naive, and there are in fact ways to do these things, people gently inform me of my ignorance.
>>
>>OK - back to work.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform