September News Letter

A new Technology preview for the compiler is out. This improves our previous work in lot of areas, a special feature is the possibility to turn your VFP forms and Controls to .NET.

NOTE: To use any of the new functionality you'll have to install the VCRedist_x86.exe, this is a requirement to the new .NET Extender version.

TABLE LAYER

If you did not install it in the previous Technology Preview you may need to install the supporting runtime for the layer available here.

  1. The TableLayer is now near to VFP9 feature compatible. Only Varchars and VarBinary are missing.
  2. The lock behavior is improved to unlock the record if it was automatically locked by an updating command as REPLACE, this is similar to the way VFP works but it does not unlock inmediately, as we do.
  3. DateTime as field type is now supported. Empty dates are displayed as {1 / 1/ 1 00:00:00}. This is different behaviour from VFP where an empty date is {0/0/0}. This means we will have to implement a Date type compatible with VFP in that minimal but still important detail. So expect some improvements in the current Date and DateTime support.
  4. The memo support is working as expected.
  5. The performance for reading operations in EXCLUSIVE open tables has improved in orders of magnitude. it is near to VFP performance if not RUSHMORE optimization is used.
  6. Also in general the peformance is lot faster than the previous preview.

NEW COMMANDS


The following commands were implemented:
CREATE TABLE (fields definitions) all the syntax for free tables is working.
INSERT INTO "alias" (field list) VALUES ( value list)
INSERT INTO "alias" FROM ARRAY aInfo
INSERT INTO from MEMVAR
APPEND FROM TYPE DELIMITED is implemented for character fields. It is very fast.
READ EVENTS implemented
CLEAR EVENTS implemented

NEW FUNCTIONS


19 new functions are implemented and that means we have more than 50% of the functions of VFP9. Check the current list at http://etecnologia.net/Products/VFPCompiler/ImplementedFunctionality.

And now the meat of this new update:

VFP FORMS AND CONTROLS NOW IN .NET


Now you can take your VFP forms (SCX), your VCXs and PRGS and compile them to .NET. The VFP OOP Model and extensibility is there, you can create a class, derive from that and then Create a form based in the derived class. Event and Method overriding at the object level is there as VFP does!.

With the enabled functionality we are the faster (develoment time and runtime) way to build Data Enabled solutions for .NET. When we complete the remaining bits as SQL Passthrough and DBC based tables. We'll be the better solution for Data Based solutions, even for .NET, as VFP has been from the beginning.

A sample named ControlsDemo in the project ControlsDemo.pjx show precisely that functionality also the following:

  1. Loading list boxes from a table containing 31280 records, it loads quickly because it does not load all the items instead a Virtual Mode loads the items only when needed, on demand. Of course to do that you set RowSourceType = 2 or RowSourceType = 6 and then RowSource to your "alias" or "alias.field".
  2. It loads a lot faster and with much fewer code than a .NET solution. We included a .NET Solution in the Directory ProjectSamples\Data_NetAlternative. To be fair we used the OLE DB provider for VFP to get the faster engine available . Using our TableLayer the VFP forms compiled to .NE,T open and show in no time. Check the .NET Solution taking a lot of time for loading and there are only 31280 records. Imagine what would happen if we had 500,000 records.
  3. We also showcase two forms derived from frmDataSample and fill those forms with several controls from Table2a.dbf the table with 31280 records. We modify the layout of those forms and override some events. Check the results both load quickly using the same table opened twice and Visual Inheritance is there as expected.
  4. Also a form with PageFrames and pages is built using PRG code, check MyPageFrame3 in test_vfp_forms02.prg. This is needed actually because our CodeGenerator.app based in the ClassBrowser.app generates wrong code for deeply nested controls. So if you want some page frames you can build them this way:

    ADD OBJECT MyPageFrame as PageFrame
    ADD OBJECT MyPageFrame.pagFirst as Page
    ADD OBJECT MyPageFrame.pagSecond as Two
    ADD OBJECT MyPageFrame.pagSecond.txtInfo as TextBox

This is only a temporary measure while we fix the CodeGenerator to build code as outlined above.

5. Data binding works like VFP. The binding functionality is already tested for textBoxes the other controls while supports DataBinding have some issues. Wait for the next update this month to have the remaining controls fully bindable.

The following controls are already implemented:

  • ListBox
  • ComboBox
  • CommandButton
  • Container
  • EditBox
  • Form
  • Label
  • OptionButton
  • OptionGroup
  • Page
  • PageFrame

The remaining following controls, will be implemented this month and debut in a second update planned for this month. We'll ship that update only as the vfp.runtime.classes.dll assembly, so you just copy that file into your installation and the compiler automatically will solve the references for those classes.

Next controls in the list to appear this month:

  • CommandGroup
  • Control (already implemented, a mistake make us not to ship it, check VFPControl class in vfp.runtime.classes.dll assembly)
  • Hyperlink
  • Image
  • Line
  • Shape
  • Spinner
  • Timer

Between the non visual are:

  • Custom
  • DataEnvironment
  • Cursor
  • Collection

DataEnvironment functionality is not enabled for the forms. This should be enabled in the next update.

GUI FOR THE COMPILER


In previous versions you have to use the Command Line to compile your code. Now a new GUI enables you to compile your PJX, including SCX, VCX and PRGS to .NET. If it finds an error it shows the line containing the problem and its best guess about what is causing the error. The error diagnostic is not the best we can get but we are getting there.

Check our new section in the Wiki about Using the Compiler with step by step instructions to compile your projects to .NET

Also be sure to put your comments and feedback in the Wiki or directly to ours to keep improving the Compiler / Runtime. The issues we find will appear there with solutions so be sure to keep an eye on the wiki.

We expect sincerely you enjoy this preview as much we enjoyed building it.