VFPCompiler for .NET - Last updated March 2008.

A new update is out. You can read the March news letter to get all the exciting details about the new functionality available. This update expands the ASP.NET abilities introduced in the November Update. With the new functionality Visual FoxPro is now the best language for dealing with Data in ASP.NET

The .NET compiler for Visual FoxPro, is a next generation compiler targeting the .NET Framework. You can take your Visual Foxpro SCXs (forms), VCXx (class libraries) and PRGs source code and compile it to pure IL (intermediate language) Managed code, without any change provided you use only the current implemented functionality. We are working very hard to complete the remaining of the VFP runtime (classes, functions and commands), so once it is complete you'll be able to recompile your source code to .NET without any change.

No other solution for .NET lets you keep your investment in Visual FoxPro, retaining Visual FoxPro legendary power and still be able to use all the .NET Framework power. We have implemented several extensions to enable concepts like namespaces, structures, delegates, events, enums and other common .NET Functionality.

And the best part is that you retain all the powerful OOP Extensible Model and Data Manipulation Language features you have used for years in VFP, now in the .NET Framework.

Commands like USE, SCAN, LOCATE, SKIP, SEEK, REPLACE and lot more are already implemented enabling you to build new application or recompile existing to the .NET Framework.

UPDATE: Now you can compile your VFP Forms and Controls to .NET and use them side by side with .NET Winforms and Controls. Of course you better work with VFP forms and controls because they are more powerful than the .NET ones.

UPDATE: The new TableLayer64 is out, this improves several things over the previous VFP limits, and still remains compatible.

Features

The following section contains available features and planned features. See the Legal Disclaimer about the future plans.

The .NET Compiler for VFP will be a different, separated product from .NET Extender. You can test its functionality whether online (limited to 200 lines of code) or through the Alpha Technology Preview available only to registered users of .NET Extender.

The .NET Compiler goals is to achieve Full Compatibility with VFP and yet using all the power of the .NET Framework Version 2.0 (or 3.0)

On its current incarnation (there will be monthly updates to the Alpha Preview Compiler available to registered users of .NET Extender) it is capable of:

  • Create fully managed verifiable assemblies, with pure IL. This is, the created assemblies can be run through PEVERIFY and it passes all the tests it does.
  • Because it produces full managed assemblies, pure IL, you can run it in other platforms like Windows Mobile1. So your apps are not longer tied to the 32 bits desktop, and can run in PDAs, Smart phones and where ever the .NET framework functionality is available.
  • Creates debug info so you can step debug using any Managed Debugger like the one in Visual Studio 2005. The Preview ships with its own debugger so you can step through your code and debug it the .NET way.
  • Consume managed assemblies, thus it integrates very well with the .NET Framework.
  • Works with the .NET Framework 2.0.

  • Supports LOCAL, PRIVATE variables (PUBLIC also will be supported). You can create variables on the fly and reference them without previous declaration, of course like you can in VFP.
  • Supports the dynamic features of VFP like dynamic typing and polymorphism.
  • Gives you a performance improvement between 200% - 300% with only a recompile of your code 2.
  • Huge performance boost when you use the optional feature of strong typing. It can give you a 500%-1000% improvements.
  • The runtime library and Classes are being implemented in the Visual Foxpro Language.
  • Functions like FILETOSTR, STRTOFILE, SUBSTR, etc, are already implemented (see the current implemented functionality ). The goal is to achieve 100% compatibility with VFP9 functions.
  • Use SCAN, REPLACE, LOCATE, SELECT, etc commands. The goal is 100% coberture of VFP9 COMMANDS.
  • It supports language constructs necessary for the .NET Framework like:
    • DEFINE NAMESPACE ... ENDNAMESPACE (syntax, may change in a future revision)
    • DEFINE ENUM ... ENDDEFINE
    • DEFINE INTERFACE .... ENDEFINE
    • USING NameSpaceA::NameSpaceB so instead of writing
    • TLOCAL aVar as aNameSpaceA::NameSpaceB::ClassX

      you just write

      TLOCAL aVar as ClassX

    • You can Implement Multiple .NET Interfaces.
    • Supports Method Overload, this is achieved declaring several methods with the same name differing only by the parameters type.
    • Operator overloading, you can declare operators (+,-,* and more) and then use them in your classes to simplify programming. Example, you can create a matrix class and then given aMatrix and bMatrix, add them using aMatrix + bMatrix
  • You can create Function Closures (AKA CodeBlocks in Clipper) easily, this give you a unmatched flexibility:
  • Because it is the FOX Language it gives you the simplest Hello world! in the .NET world:

    ? "Hello world"

 

  • Supports two Tables LAYERS (one implemented using the VFP9 runtime, and, therefore fully compatible with VFP9) and other independant, targeted to be FULL VFP9 Compatible 3 available now with a lot of functionality.
    • Because we are implementing the Table and Database functionality in VFP it is full y Object Oriented. You can see how the implementation is and will be by compiling some program with table access and see the generated IL or examining VFP.Runtime.dll with the AssembyBrowser.
    • The above means you'll be able to create your own Table Representation by deriving from the shipped one, so the only limit of what a Table is will be in your imagination.
  • The Base VFP Classes are being implemented in the VFP Language so it has all the power possible using this powerful language.
  • The report functionality will be fully Object Oriented using the Form Designer. The .NET Extender Print shipped sample gives you a glimpse of how it will be.
  • Other features "borrowed" from JavaScript 1.7, which will be shown soon include Generators and Iterators and Array Comprehensions (this name will change before release).

  • Borrowed from the next version of CSharp (CSharp 3.0) are TypeInference and Extension Methods.
  • There is on-going work to support Generics we need your feedback about the most useful syntax for this, if using the VB syntax or the CSharp syntax or other one, figure yours.

So to summarize, this is an interesting time to be a FoxPro programmer!.

  • 1 To run in PDAs, Smartphones, you'll have to include only functionality available in the Compact Framework.
  • 2 The performance improvements estimates are based on internal measures done by eTecnologia.net, we'll publish the tests so you can do your own measures.
  • 3 The table will remain compatible as long you don't push it over the VFP limits. For example if you grow it to more of 2 Gigas, VFP won't be able to read it.

See the Legal Disclaimer about the future plans.