Skip to main content

Refactoring in Visual FoxPro

(this article was written prior to the Code Analyst but identifies the origins of where this tool came from)
With the sheer number of functions, commands and tools available within Visual FoxPro, it's easy to find more than one way to do the job.

So multiply the number of ways by the number of developers on your team, and it's pretty easy to see why code maintenance is pretty important.

Refactoring is about making code more useable (not changing the functionality but making it easy to understand and maintain).

This article presents 3 core concepts:
1 - Never Use Keywords for variable or field names
2 - Use the most recent functions where appropriate
3 - Encapsulate, encapsulate, encapsulate

Comments

Popular posts from this blog

Prototyping Applications with Sketchflow

How many times have you needed to present visual concepts behind your application to a client?

Over the years, I've had several times where I had to build a quick mock-up in Visual FoxPro to show how an application or function might run. Designing the screens themselves weren't the challenge - the challenge was showing the user how the application would flow between different areas. Short of putting fake code into buttons or saying "and now we go here", there really hasn't been an easy way to do this.

Now, sometimes, a client has gone so far as to hire someone to build "wireframes" to depict this. I found this process an entire waste of time. People building wireframes tend to be "business analysts", in short; people who have stopped learning how to develop code but still want to show their value by being the translator between the client and the developer. As far as I'm concerned, if you want to be a senior developer, you need to be able to…