Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Migrating an application from VFP ( sob! )
Message
De
12/02/2015 08:41:19
 
 
À
12/02/2015 05:25:33
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:
01614670
Message ID:
01615247
Vues:
63
>>Can you point me in the direction to find out more about this please?
>>
>>>It may make sense to develop a rules engine. I worked once for a company that made medical coding systems. They relegated all the decision stuff to a rules engine. It had to be updated every three months, but because all the rules were encapsulated in a single DLL, it made the updates easier.
>>>
....

>>>>We know the business problem well, better that our competitors, and the smallness of the market makes it unattractive to foreign software companies. We believe we have a few years to complete the rewrite. During that time we will cover our flanks by developing a few add on options with West Wind Connection, mostly report oriented with some data capture. Right now our app is 100% LAN.
>>>>
>>>>We need to make good choices, so I'll be asking many questions:
>>>>
>>>>We'd like to make the rewrite fairly data driven, so the first question is: Does .NET allow the equivalent of VFP's EVALUATE(lcCommand) ?
>
>The short answer is No.
>The long answer is Yes. There are several approaches ranging from dynamically compiling code (fairly complex) to using dynamic Linq queries (fairly simple). It depends on what you need to 'Eval'.....
>

Going out on a limb (without knowing the current code base) one pattern often working great for this kind of problem is to dynamically instantiate a rules/calculation object with a fixed "Docaculate" external calling interface. A great side benefit is that this can be made to work in statically compiled languages like C# and Java as well as in dynamic (typing) languages like vfp, Javascript and Python with nearly identical code.

This removes the need to interpret method names dynamically (which often still is possible even in languages like C#) and is a pattern regularly seen in Java with the strings for the dynamic part either in XML or other text files.

In vfp a table based rule engine (esp. down to dynamic code in memo fields) is much easier than in other languages. While such code is possible in Java and C# via conditional compilation as well, if your heart is set on such an implementation I'd stay in a dynamic language, perhaps even a more table oriented one like Lianja or Windev. But in tech discussion I would probably argue against following that specific path.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform