View Full Version : First Experiences with VFP Migration to Lianja 1.1.2

2014-05-08, 11:04
Today I want to tell you my first experiences in converting a FoxPro form into Lianja. I know that the Lianja guys did a fantastic job and I was surprised about the high compatibility, but my decision after this experience is to wait, until most issues are fixed. Our intention is to convert a huge VFP application (440 tables, 1200 forms, 1300 reports, 120 context menus) with minimum effort to exceed the 2 GB database limit. Cross-Platform, Web and Mobile is less important for us. Here are my first experiences:

Database Conversion:

- The conversion itself ran without Errors.
- Problem #1.1: Triggers were removed
- Problem #1.2: Index files are much bigger than in VFP, often they are bigger than the DBF file. Maybe this is because VFP compresses index files and Lianja does not
- Databases with > 2GB are supported, that’s what was promised and I can confirm: it works!
- Problem #1.3: Performance is worse than in VFP. Example: Database with 3.500.000 records, 1.2 GB DBF size, Indexes on all important fields, SET DELETED ON or OFF, No Index on DELETED():
BROWSE FOR itemno=”NotInDatabase” takes about 40 seconds on a SSD drive to show an empty grid. It seems that Rushmore is not implemented as good as in VFP.

Program and Class Conversion:

- Problem #2.1: Lianja cannot work with && comments after a semicolon at the end of a code line
IF itemno=”4711” OR itemno=”4712”; && Comment
OR itemno=”4713”
? “Test”

- Problem #2.2: Macro substitution does not work in all cases
RETURN &lcProc. && macro substitution does not work in combination with RETURN

RETURN "ReturnValue"

- Problem #2.3: Function called with empty parameters causes a compilation error
loXMLPart = loXML.getPartByTag("Cube",.T.,,2) && compile error “Syntax error”
loXMLPart = loXML.getPartByTag("Cube",.T.,.T.,2) && compiles w/o error

- Problem #2.4: Syntax error during compilation if line is too long (here it was a CASE statement where there were many OR statements in one CASE split with semicolon over about 50 lines of code, like
CASE m.repname="AAAAA" OR;
m.repname="BBBBB" OR;
m.repname="CCCCC" OR; …….

- Problem #2.4: TYPE("_SCREEN.ActiveForm") returns "L" instead of "U", when it’s not an object. It also seems that _SCREEN.ActiveForm is not fully implemented in Lianja.

- Problem #2.5: VERSION(4) is currently not implemented ("invalid parameter")

- Problem #2.6: SET ENGINEBEAVIOR 70 not implemented. Console Window says that the command should be SET ENGINEBEHAVIOR TO 70, but this is not supported yet.

- Problem #2.7: SET TABLEVALIDATE is currently not implemented (not a problem for us)

- Problem #2.8: SET SYSFORMATS ON is currently not implemented (big problem for us!)

- Problem #2.9: SET COLLATE TO is currently not implemented (not a problem for us)

- Problem #2.10: Classes olecontrol and oleboundcontrol not implemented

- Problem #2.11: Umlauts (e.g. ö,ä,ü,Ö,Ä,Ü,ß) are causing problems if used e.g. in label-names (this is a big issue for us, because we use a lot of umlauts in label names)

- Problem #2.12: MESSAGEBOX command executed in a Activate event of a converted VFP form cause to fire the Activate of the form again, after the messagebox is closed. Same problems appear when working in the debugger. SET STEP ON causes the forms deactivate Event to fire. It’s hard to debug the Activate Event of a scp file. I think that VFP had the same problem.

- Problem #2.13: The following statement in the Activate Event of a converted form caused Lianja to hang:
Could it be, that THISFORM cannot be used in the Activate Event?

- Problem #2.14: Events (my biggest problem and the reason for me, to stop the evaluation):
My problem in my converted sample form was, that Refresh fired first, then Activate fired but Init and Load never fired. I was able to close the form and Deactivate fired, but I got no chance to let Init and Load fire. After hours of spending time, I gave up.
I have a PRG file with this lines:
set classlib to controls
set procedure to appproc
open database testdatabase
use testable order testindex
do form testform

In my converted testform, I create procedures for all events to see if they fire or not.
=STRTOFILE("Testform Load Begin"+CHR(13)+CHR(10),"c:\log\log.txt",1)
=STRTOFILE("Testform Load End"+CHR(13)+CHR(10),"c:\log\log.txt",1)
The only code that is executed is Refresh, Activate and Deactivate – Load and Init never fires.
In my converted scp file, the last lines are like this:

=STRTOFILE("Testform before CreateObject"+CHR(13)+CHR(10),"c:\log\log.txt",1)
frmtestform_rni0rpnh1 = createobject("frmtestform")
=STRTOFILE("Testform before Show"+CHR(13)+CHR(10),"c:\log\log.txt",1)

The show command is never been executed!! The CreateObject causes Refresh and Acitivate to fire and the form is shown on the screen, but it seems, that the CreateObject stops at some point and this causes Linja to not execute Init and Load and after that the frmtestform_rni0rpnh1.show(1) line.

Problem #2.14: Load fires after Init. I tested this in a Linja page. This is a big problem for us, because in VFP, Load fires before Init and all of our forms are based on this knowledge.

Importer problems:

- Problem #3.1: In generated Interface Methods, ENDPROC is not inserted. This will cause the beautify-feature to indent code more and more.
** Interface-Methods
Procedure SampleProcedure
endproc && this line is not inserted by the import routine

- Problem #3.2: Importer has problems when a line ends with “;” or ‘;’
IF 1=1
After conversion, it looks like this:
IF 1=1
result=STR(teststring,3,0)+” ” ENDIF
The “;” changed to “ “ and CR/LF is missed before ENDIF

- Problem #3.3: I had some problems with Arrays written with [] instead of () – but I’m currently not able to reproduce this and can give you no example

- Problem #3.4: My converted classlib-File (controls.vcp) had to be re-arranged first, because it’s not possible to subclass before the parent class was defined. This is a minor issue, it took some hours to fix it but it must done only once. It did it step-by-step by invoking the SET CLASSLIB TO controls in the command window, seeing which line caused the error and then moved the class code before the first subclass statement.

- Problem #3.4: Double Quotation Marks after conversion (instead of using " and ')
Original statements:
builderx = HOME()+"Wizards\BuilderD,BuilderDForm"
Converted statement:
builderx = "HOME()+"Wizards\BuilderD,BuilderDForm""
THISFORM.txtField1.Inputmask="REPLICATE("X",22) "

General Lianja Problems:
- The Editor is slow in loading big files (in my example a class-library with >20.000 lines)
- The Editor is extremely slow in modifying big files (even moving the cursor up and down without changing anything is very slow, if you are in the mid or at the end of the file)
- IntelliSense is hardly missed (Editor AND Console Window). I know it’s scheduled for release 2.0, but the earlier we have this feature, the better. We can no more live with IntelliSense!
- I’m hardly missing the “compile” feature after closing an editor window
- Small Bug: Enter SET COMPATIBLE plus hit ENTER in the console window will cause Lianja to hang

Best Regards,
Uwe Bader - Spaichingen/Germany

2014-05-08, 11:22
Hi Uwe,

Thanks for your constructive feedback, if you have any issues or questions about Lianja please submit tickets so that we know about them.

We are continually improving the VFP compatibility and value this feedback immensly. There are such a wide range of ways in which VFP has been used by developers (some of which are poorly documented) that some things get missed.

There are several ways in which development is scheduled; We listen to the developer community and schedule based on overall importance. Saying that, what is important to one developer is of less importance to another.

We work closely with some ISVs to speed up the availability of features and compatibility through sponsored features.

Rather than answer each of these individually, I would prefer if these were submitted as tickets then we can look into any issues that you have encountered.

2014-05-08, 13:28
Hi Barry,

thank you for your fast response. Because this are many tickets, I will wait some days, maybe someone else knows the answer.
Thanks again!

2014-05-08, 20:38
Hi Uwe,

Well, if there are issues that need fo be fixed they need submitted as tickets at some point then each one will be in our system and you will get a response on each ticket individually and be informed of progress or workarounds.

The event dispatching of load, init, activate should all be working in the correct order. This was all changed for another German developer a long time ago. I will ask someone in support to retest. The event dispatching order for Lianja pages is different from custom VFP code which is what your interest is in.

i have not seen any issues using German characters in desktop Lianja apps and in fact I was just looking at an issue yesterday for a customer whereby German characters were not being displayed in the web client captions properly. This was an HTML encoding issue that has already been fixed in v1.1.3. I will investigate the displaying of German characters in custom VFP labels. This is the first time I've had this issue reported.

The importers are open source and the source code is included in the distro. I will need to look into these issues related to them.

The indexes are fully balanced B+ trees. They have a different format to VFP and are specifically designed for better concurrent network performance. (Keys in the nodes to reduce seek times and intelligent client caching based on a transaction serial# in the index header).

Unlike SQL commands, BROWSE FOR does not optimize using indexes. It's not a terribly difficult thing to implement but not a priority at the moment. There is already an enhancement request that has been submitted by another developer as a ticket for KEY RANGE to be implemented.

Lianja (unlike VFP) is under continual development. It's important to receive feedback and have tickets submitted for incompatibilities or bugs. The product will only get better if we are notified of any issues as tickets. Clearly, If we don't know something is an issue we can't fix it.

When enhancement requests are submitted as tickets we prioritize based on importance. Some things are implemented quickly and others scheduled in future releases. Obvious bugs that result in crashes always take the highest priority.

Hope that answers some if your questions.

2014-05-09, 04:16
Hi Uwe,

Thanks for taking the time to submit tickets for these issues. These are now in our system so they will be properly investigated. You will get automatic notifications as we work through the tickets.

2014-05-09, 04:46

Lianja (unlike VFP) is under continual development. It's important to receive feedback and have tickets submitted for incompatibilities or bugs. The product will only get better if we are notified of any issues as tickets. Clearly, If we don't know something is an issue we can't fix it.

When enhancement requests are submitted as tickets we prioritize based on importance. Some things are implemented quickly and others scheduled in future releases. Obvious bugs that result in crashes always take the highest priority.

Hope that answers some if your questions.

Thank you Barry, I submitted all tickets.

2014-05-12, 13:52
Nice feedback, Uwe!
Very helpfull.
I'm doning some tests myself too.
I'll share my results soon.

2014-05-13, 07:14
Hi FedeB,

Can I repeat Barry's welcome for constructive feedback and his request for tickets to be submitted for incompatibilities or bugs? Many thanks to Uwe for taking the time and trouble to submit tickets and for working with us and providing examples and further information as they are investigated. This is essential in determining the exact cause of an error or difference in behaviour, which may not be as general or as difficult as it first appears and allows us to make fixes, prioritise enhancement requests, offer advice in Lianja best practices or suggest minor code changes.



2014-06-05, 09:32
Hi Uwe,

There has been many editor enhancements and performance improvements in v1.1.3 including:

Script editor performance improvements on large files.
Improved color syntax highlighting in the script editor.
Added popup "IntelliTips" (intellisense-like functionality) as you type in the script editor.

2014-06-05, 22:45
Uwe, Many of these reported issues were submitted as tickets and you will have been notified as they were corrected.

2014-06-06, 10:52
I find the My Tickets option very helpful for checking where things are, FWIW.


2014-06-08, 10:12
Thanks Barry, almost all reported problems were fixed!
I'll make some tests during the next days!