Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Views vs cursoradapters
Message
De
15/06/2015 11:48:43
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01621008
Message ID:
01621010
Vues:
108
>Hi,
>
>I haven't worked with Foxpro for years and I'm presented with an programming issue. I'm not if because I have just been using other tech for so long that I have forgotten how to think in Foxpro or there are real reasons to use a cursoradapter.
>
>So the question is:
>
>If you are only required to work with one data source such as sqlserver (I realize cursoradapters can access other data sources). Is there an advantage to using cursoradapters over just creating a standard sqlserver view? The sqlserver views are update-able.
>
>Johnf

Yes.
You get IMO a better abstraction and hooks between your cursors and the backend - be it for adding standard upsert info addon data, timing, logging or troubleshooting or just less boilerplate code setting the view parameters (although not totally dry, only better). The base functionality of update confilct managment strategies are identical - just better control for you. Dunno how evolved your dataclasses are/were, but it is nice to have a logical framework to enhance with the things that crop up instead of introducing data classes just to add common behaviour for views.

Upd: one nice thing: you don't have to use safe select mechanics in cursors via cursoradapter to bind them to grids and .Requery() the data /Upd

I worked with views before and always argue for cursoradapter now. Relearning view tricks will be faster than first learning CA, but CA is not rocket science. If the project is calculated to amount to a few programmers days, stay with views, if there are weeks and you are expected to maintain, go for CA and plan for more than an hour but less than a half day for learning CA.

my 0.02€

thomas
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform