Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP project conversion

Status
Not open for further replies.

pennyman

IS-IT--Management
Nov 7, 2001
19
GB
Hi all,

Would anyone like to share their experiences in using 3rd parties to convert a VFP project to C# / SQL?

Any recommendations or horror stories appreciated!!

Mike Penny.
 
I have rewritten an app from what was (and actually still is) xBase++ (converted from Clipper 5.2) into C# against SQL.

Frankly, one of the least pleasant experiences I have had professionally, I could whine ALL DAY about the process - but no one
wants to hear that.

Pick a different code base, anything is better than C#, do it in ASM, Ruby, Python, BBC Basic (I'm just making a point).

Nothing wrong with a SQL-like back-end, any SQL back end will do.

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.

There is no place like G28 X0 Y0 Z0
 
Thanks Griff,

Your point on codebase is noted. Yes, I'm not expecting a fun time.
I'm hoping that some of the still advertised conversion specialists have tools that may help take the grunt work away.

Does anyone have any experience in using third parties for this sort of work?

Cheers,

Mike.
 
None.

Sorry.




Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.

There is no place like G28 X0 Y0 Z0
 
The best two guides from VFP to .NET I know of were
1. Les Pinter: Visual FoxPro to Visual Basic .NET
2. Kevin McNeish: .NET for VFP developers.

These books are very outdated now, though. Not from the VFP perspective, but from the .NET perspective, of course.

You could assume it can't be bad, since .NET surely offers anything you need to make a 1:1 conversion of the VFP forms and their controls and so what could go wrong if anything is downward compatible? I'd say you're better off learning todays .NET from scratch with current courses available for that. Because going through these books compares to learning VFP9 by first converting an Access 95 application to FP2.6 for Windows. Both books have the same opinion about the process to apply: Concentrate on learning the essential basics of .NET and apply them to rewrite your VFP project, then advance from there.

I don't overlook that you'd be fine with just a visual conversion of VFP forms to Winforms, for example. What you call grunt work. I've seen so many announcements, that I don't even remember any names. None of them have become a standard like FoxyPReviewer now is for reports or Thor for VFP IDE extensions.

I remembered Matt Slay had done something for forms, but I remembered wrong, he made a tool to create VFP forms from a simple markup language aka markdown. Nothing that would convert an SCX to a .NET winform, for example. It could become a gateway, if he also has a tool that converts the same markdown to one of the user interface technologies of .NET like .NET WinForms, WPF, or WinUI2/3 (the latter two based on MS markup XAML). Then a conversion idea would be describing SCXes in that markdown. I'd question whether that's simpler, though.

Chriss
 
I don't have any experience of VFP to C# conversion, but I do have experience of converting projects between other platforms. In general, I would advise keeping away from any tools that claim to do a conversion automatically, or even semi-automatically. In almost every case, it will turn out to be more satisfactory to start again from scratch.

And doing so also presents a good opportunity to review the design of the entire project, including its user interface and especially its database schema. If the application has been in use for any length of time, you will almost certainly identify improvements and updates to the original design. At least, that's been my experience.

Whatever you decide, good luck with the project.

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
I look forward to being proven wrong, but I don't think there is a native product out there that can compete with
the VFP Grid, the c# one does not come close that's for sure.

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.

There is no place like G28 X0 Y0 Z0
 
@pennyman

I happened to have just completed such a conversion (VFP to SQL) a little over one year ago with the help of an outside VFP/SQL guru.
So far no major issues. Users get to work with the same interface and IT gets to keep all the customizations that had been made on top of a very soundly designed software package developed in the 80's (dBase III/Foxbase compatible version, character based with @say..get) that has been ported to run under VFP 9.0 now.
We stayed with the existing VFP coding verbatim, so to speak; only replacing data commands with SPT functions so we get to enjoy the benefits of having the SQL backend. Kind of best of both worlds.
Not an easy job to say the least; but we are very happy with the result.
Chris Miller, Mike Lewis, and others have helped me by providing critiques, comments, and suggestions along the way.
I'll be happy to share our experience any time.

A couple of threads from my previous conversion discussions:

thread184-1812636
thread184-1812569

Steve Yu
 
I myself have done a few vfp -> c# conversions and at the same time upscaling the database to SQL-Server or MySql

I must say I agree with mike Lewis, steer clear of so called automatic tools - you will end up rewriting the output from that !
and yes doing it manually you will have the opportunity to review schema, form layouts - indeed everything. and no matter how well it has worked, you are certain to find improvements - not least because users will say - " because we've always done it that way ! !"

I must disagree with the reply that says to use anything but c# - you need to consider the size of the base of talented programmers with real business experience - not just guys straight out of university who have done an internet course on Python !

I am a 66 year old - I have used fox in all its flavours since it landed in the UK in about 1985 if I recall? I have a job coding VFP and C# and T-SQL - so i have no axe to grind and i'm not looking for work


My pennyworth for what it is worth

Colin


 
C# seems to be set, but you could also choose VB.NET. I don't say so because they are essentially interchangable, because both end up being compiled into the same bytecode (MSIL), but there are more than just syntax differences and C# is having an edge over VB.NET. But it's not only the curly brackets that offset some people from programming C,C++, C# or also JAVA and JavaScript, one thing you will surely stumble over is c# being case sensitive. Les Pinter pointed out he chose VB.NET for just these syntactical similarity to VFP. If you're interested Kevin NcNeish's book has a chapter about C# and VB.NET to point out the differences.

Since you'll mainly use .NET framework classes, they are classes with methods and their parmeterization, which means very similar usage, if you'd program the same usage of .NET framework in C# and VB.NET they will be very similar aside from curly brackets vs keywords, so that's a personal taste decision in that regard.

The major mindset change you have to go through is that both langauges are forcing you into the object oriented approach and don't be tempted to go F# as it's functional programming, that's a world apart from what procedural programming is.

I think many went to C# as it was the major language developed for .NET, it's C++ syntax but compares more to JAVA than being a C/C++ successor. The C++ successsor really is C++ in it's own roadmap, and in some aspects going there would be sticking to the same old Win32 with Windows API involved instead of .NET framework, but that also makes it not .NET, just a language also supported within the VS and it's clearly marked as leaving the core aspect of .NET by the term unmanaged code. It's not that it's bad to be unmanaged, it just means it actually compiles into assembly and not just some MSIL bytecode that is run by a CLR runtime. The idea of "managed" is about separating you from the dangers of pointers and such pitfalls of C programming, whereas C++ also has developes means to keep you from these pitfalls before .NET was invented.

Chriss
 
Chriss/Olaf said:
C# seems to be set

Personally - I would regard this as about the worst choice - and the reason is on your last line. The pseudo compiling to M$ bytecode leaves the JIT
error handling in place... which is about as ghastly a debugging tool as any I've ever come across... but that's just me.

Pick a modern language, broadly supported across numerous platforms that doesn't require .NET and you will end up with a product that will
be supportable for a while to come.

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.

There is no place like G28 X0 Y0 Z0
 
Griff,

I know nothing about your bad debugging experience, but you are aware VFP compiling also produces byte code and the VFP runtime compares to the .NET CLR?
Sparing the details about JIT, but is it about that, specifically, that makes C# debugging hard?



Chriss
 
Many thanks for all of your kind contributions.

I really appreciate the time taken and quality of advice.
Great to see you're not completely out to pasture yet Mike Lewis[bigsmile]. My Painswick VFP course has been pretty handy over the last 25 years, and I'm still at it!!

Whatever we end up doing I'll be sure to keep the paracetamol close to hand.

Mike.
 
My Painswick VFP course has been pretty handy over the last 25 years

Mike, I thought your name sounded familiar. Your mention of Painswick brought it all back to me. Good to hear from you after all these years.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top