Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dummy question about inheritance
Message
De
26/05/2006 20:27:44
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01125440
Message ID:
01125458
Vues:
25
Ricardo,
I always had trouble with n-tier terminology:) MVC or facade-data-logic are most popular application models but ask me, I can't even define what they really are. MVC pattern when I read it sounds to be the thing that I do everyday but I really can't say it is. Currently studying distributed architecture and doing what I want (not with VFP) but I still can't say what is MVC:)
Anyway if you don't mind about my limited understanding about it I'll try:)

View: Is display part (UI) - forms,reports.
Controller: As I understood it's event handler. Like handling a mouse click.
Model: Data (with behaviors of validation,retrieval,save etc)

Though VFP is an OOP data operations are procedural in nature (not just VFP). However maybe it is so because for a developer it is easier to manage data traditionally rather than OOP. Not only that of course, speed (VFP community puts speed in 1st place I think:) sounds to be another factor and we easily give away overheads needed for loading/saving through objects. Yet another factor almost any developer tends to code directly in UI (at least I don't deny I do, just I find it easy for a job when time is tight on design). Binding to data directly is yet another face of it. Come to think of it, I can bind a grid to a cursor/table but not something like an object,array etc that is an IList (ok this is VFP:).
Examples, unfortunately I don't have an example short enough to post here (not only being short enough but needs to be stripped from propriaty code first). COM classes would be a sample but I don't like COM classes and keep away from them.
Sorry couldn't help.
Cetin


>Yes.
>The children classes are running in the same app.
>I think that I'm needing to implement "model view controller" pattern design.
>
>Do you have some MVC's example in VFP?
>
>T.I.A.
>
>>Are those "children" running within the same app? If so:
>>Keep the value you read in a property of custom oApp object. In init of your class it checks oApp.savedvalue. If it exists use it else do the select and populate. Or your class init code could do the select in init if it's not something time consuming (ie: over network, after intensive calculations etc).
>>
>>If you want to make that available to other application (even run on other stations) then you would need some kind of messaging between them. With VFP not a trivial task and likely you'd end up with saving the value to a shared file so others can read.
>>Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform