Tuesday, June 20, 2006

Visual Foxpro Vs Php

Just a site note, in this blog I am refering to "a company", but I will not post the name of this company .

In the past I have done a lot of database driven stuff concirning websites and the thing is, I never gotton around to actually learn php orsomething like that. Where most websites that I made were database driven etc, and the company where I worked at was only using VFP (abbreviation for Visual Foxpro) for the main database engines there was not another alternative just to use it, and swollow it.

The thing I never got was, why VFP? I knew there are a couple of different programming languages out there to serve webpages. Heck, php was even build for that single purpose in my opinion. There are just a few remarks why this company didn't want to use php in the first place... And after doing some testing etc.. I think most of the remarks are in my point of view utter "bull".

VFP is an executable and therefor faster?!
Yeah, right... Tell that to someone who has experience in assembly language (... and lucky me... I have that ;))

This basic remark was underbuild by the fact that php is a scripting language, and therefor (at least their logic) slower. And I have to disagree with this statement totally. Because first of all, VFP itself uses a on the fly compiler as does php. Only major difference is PHP is a text file, VFP is a scrambled "text file" where functions are simply replaced by single characters.

Another thing why VFP is, according to me, using a on the fly compiler is the 'macro substitution'.

Something like:

cstring = "select * from table into cursor"
&cstring


would be executed as a single command. Therefor, it must compile (or interpretate even worse.. QBasic? Anyone) this piece within cstring on the fly. Else it could not be used for further processing.

I still want to run a series of tests just to see which of the two, VFP or PHP, are faster. But then again... I think they would almost have the same processing speed.

VFP's database is more powerfull then mySQL?!
Ok, now there is a statement that I never got. The real fun part about VFP and its 'SQL' clone is that it allows you to use VFP functions inside of a database querry. That is one part that is 'most likely', because it would be just stupid to have a programming language with a whole different set of functions to use in database querries. But that doesn't make the database itself powerfull...

Infact, I believe the DBase based database system of VFP is pretty bad. It has its flaws from the start of Clipper and CA's Visual Objects. And the same things always happen over and over again. Corrupted indexes over networking application and corrupted 'memofields'...

In my experience with MySQL, I have not yet seen any kinds of miss behaviour if it comes to wrong indexes or memofields (text).

Ow, and here's just another thing I just thought of... In VFP it allows you to use 'trim' function in an Index?! Ehr, how stupid is that. It just screws up the index. Also it doesnt add up to use trim functions in an index because that is just simply against the fundements of an index in the first place.

Last but not least, the performance. And I laughed about this. According to "them", VFP is faster then MySQL because MySQL is a Database Management System. And VFP uses a 'powerfull' thing as "Rushmore".

First off all, in my experience Rushmore technology is simply based on 'cashing' the indexes and data when a querry is being used. Therefor the first time a querry has been send, the responds of the database will be slower then the second time using the same querry. MySQL has a similar engine like that.

Second of all, I have made huge databases using MySQL and VFP. And VFP can't compete with the performance of a MySQL database. Heck, I can querry a 1.6GB large database and get the results in 5 seconds while this cannot be done with VFP...

Lets make an end to this story
As you might know, it makes me even frustrated while I am typing this. Because in the last 4 years I have tied myself to VFP and I am feeling very depressed about it. Since I have left that single company, I have started my quest to learn more about php and mysql. And the thing is, the more I learn about it. The more I am loving it.

There, I just wanted to get that of my chest... and it feels good!

Signing of, Hydlide

2 Comments:

Blogger Manuel Peña said...

:O

12:33 AM  
Blogger Sergey said...

Looking to hire vuforia developer? Check out this list.

12:58 PM  

Post a Comment

<< Home