VFPCompiler for .NET - Last updated December 2008.
The VFPCompiler for .NET has been incorporated into the VFP Developer Studio an amazing IDE for doing VFP + .NET programming.
A new update is out this marks the first debut of the VFP Developer Studio a powerful IDE this update brings the following enhancements over what was shown in DevCon Germany in November 2008.
- Speed the compiler now runs between 2x to 3x times faster than the previous versions. As we approach the version 1.0 we are starting to optimize the compiler. And when we will introduce the new parallel compiling features the performance will get a boost in multi core machines, for example 3x-4x times faster in a 4 cores machine.
- Better error reporting. The compiler now displays more friendly error messages to let you know when you are doing mistakes as THIS.MethodNonExistant() or THIS.Method(wrong number of parameters)
- Type Inference. Now when using the optional strong typing capabilities you can let the compiler to automatically infer the type of a variable as this:
TLOCAL eVar = THIS.MyMethod() && eVar will have the same type as the return type of MyMethod
And the type inference is automatically available in the IDE so eVar will have all the Intellisense available.
- Now you can declare and intialize a variable in the same line as this
LOCAL myVar = SomeExpression()
TLOCAL myVar = SomeExpression()
- Debugging enhancements. Now when debugging are available tooltips for LOCAL (or PRIVATE) vars, fields and aliased expressions (MyWorkArea.MyField), just move your mouse over the field or variable name to see the current value. Check the sample TestDatabase to see this feature in action. And of course you can add to the debugger watches LOCAL vars, fields and aliased expressions and see them as normal. This is a major feature that makes debugging database or table handling code really simple and powerful.
- Stay tuned for even more features as conditional breakpoint in LOCAL, fields and aliased references. That is something to debut in January.
- Runtime completion. Now we are over 70% and quickly approaching completion. Here is a partial list of the functions implemented this month:
AClass, AGetFileVersion, ASessions, APrinters, GetEnv, ANetResources, AStackInfo, ASQLHandles, ATCC, ATagInfo, AUsed, BinToc, CHRTRANC, SETRESULTSET, CLEARRESULTSET, CURVAL, COL, ROW, CTOBIN, DIRECTORY, DRIVETYPE, FLCOUNT, FLDLIST, FONTMETRIC, GETCOLOR, GETDIR and more.
- Several Samples are available including one doing Visual Design of a WPF Form and binding with VFP Data in the VFP Way.
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:
- 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.