Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why design patterns are easier in dynamic languages
Message
De
10/02/2008 15:29:26
 
 
À
10/02/2008 15:00:06
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01291156
Message ID:
01291250
Vues:
14
>><s> One of the things I've come to love in VFE is having remote views with dynamic params on the foxpro side. I can have 12 params on a view in VFP, give them all to the user and only include the ones the user chooses to set as part of the SQL statement that goes to the backend. And of course since I also have metadata and classes with hooks on those params I can massage how each is used before it even becomes part of the statement created by the parser. This is very different even than what SQL considers 'dynamic views' on the back end.
>
>Last time I got involved into this sort of religion, "dynamic views" was anything you put together and threw at the server, ie. any SQL statement that wasn't stored there.
>

Yeah, we use a parser class that builds the whole sql statement from objects created from metadata. ( I can't take credit for any of it, Mike and Toni wrote it all ) but it has the advantage of being very flexible and incorporating metadata props and any code you want to use in subclassed instances of the cursor, field or parameter objects. I would certainly have never thought of the whole thing or known how to implement it, but now that I have it as part of the framework I can really make it sing.

And this is my point - that too many VFP developers are not getting out of VFP what they could - especially in coupling it with the power of SQL Server back ends. I just think if frameworks as an extension of VFP. Everyone cries about no VFP 10 but there are VFP developer environments in the here and now that do things they never dreamed of. If I try to create something in vanilla VFP now I feel like I'm programming in assembler <g>

>And yes, I've done my SPT objects as well, with a .ParamSet(tcParam, tuValue) which would add or find the item in .params collection and set its value, and then in the .requery() it would set each of them as a private variable. Didn't go so far as to create a textmerged SQL statement there - but did elsewhere. For some reason, I concluded that it works fine as it does, and didn't take that extra step at the class level, but rather sporadically.
>
>>Strataframe uses business objects which persist dataretrieval SELECT statements, of course, so that is theoretically possible there as well, but there is a ways to go before it has anything near this capability. But the first step is an awareness that it *can* be done and that it *should* be done.
>
>And most of the people who'd benefit from it are exactly those who don't think about it, because they don't see it as a possibility, don't expect a solution in that direction, and so don't even try - they go for ways which give them hope here and now ;).
>
>>Most VFP developers don't actually seem to expect the kind of power and flexibility VFP is capable of. I think a lot of folks don't even know what a sophisticated framework does ( I know I certainly wouldn't have if I hadn't had the good sense to seek out people who knew how to build one )
>
>I've seen my share of somewhat seasoned Foxers who were still amazed seeing what Fox can do, that they didn't know of.


Charles Hankey

Though a good deal is too strange to be believed, nothing is too strange to have happened.
- Thomas Hardy

Half the harm that is done in this world is due to people who want to feel important. They don't mean to do harm-- but the harm does not interest them. Or they do not see it, or they justify it because they are absorbed in the endless struggle to think well of themselves.

-- T. S. Eliot
Democracy is two wolves and a sheep voting on what to have for lunch.
Liberty is a well-armed sheep contesting the vote.
- Ben Franklin

Pardon him, Theodotus. He is a barbarian, and thinks that the customs of his tribe and island are the laws of nature.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform