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:30:26
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
10/02/2008 14:59:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01291156
Message ID:
01291251
Vues:
12
>Spring Framework I mentioned in another post is designed support the factory pattern. Typically XML files are used to describe what classes need to get loaded for "mytoken"

That's "or other table".

And that's actually a nice way of implementing factory pattern - that's probably what made portal code (like Joomla or DNN) possible. So let's see what we have so far: DotNetNuke, Joomla in .php, Java and of course VFP. That's probably the reverse chronological order ;).

Now I'd like to see how far can this dynamism go. For example, I've often had code which called other code conditionally - but the conditions were defined via data (not metadata!). May be as simple as "if the date of this is before x, the applicable laws require calculation A; B for the next 90 days, C afterwards". Another example was the decision on what code to run on imported data, depending on the incoming columns. And yet another was a complicated salary application where each calculable element had a script to it, editable by the end user, or a similarly done statistics package where any reportable category had a script which defined how it gets calculated from subcategories (and I'm not talking about "where between", this involved a real parsable language).

Nowadays all of these could be done via factory pattern, or other dynamic way where we basically only need to know the name of the thing to run, and we can run it. Compiler doesn't even need to know.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform