Wiki Home

Code Mine

Namespace: WIN_COM_API
CodeMine has a new unofficial ;) support forum at Open TechOffsite link to
. -- Chad Bourque

And there's been one on the UT for quite a while. -- Denis Chassé
Why Code Mine?
Code Mine is a complete, high performance application framework for Visual FoxPro. It takes full advantage of the latest OOP techniques to deliver professional features in a powerful, flexible, and easy to use system. Some of the key features and benefits that make Code Mine stand out are explained below, along with applicable quotes from some of our current users.

1) The Best Design
“CodeMine has blown my hair back -- so much so that I have decided to make it my corporate standard. I have looked at (3 well known frameworks), and found nothing that wasn't filled with unacceptable compromises as far as I was concerned. I see in Code Mine just what I wanted to implement myself, if I'd had the time."
- Bob Grommes, AppDev Instructor and former editor of "Fox Talk"

Code Mine makes it easy to add just the components you want to use for a particular application, and remove the ones you don’t need. From the smallest SDI apps (single form applications with no main VFP window) to the largest multi-module, multi-tier distributed apps, Code Mine provides the features you need without tacking on a lot of “dead weight”.

For example, Code Mine provides a complete, customizable application security system with users, groups, and unlimited privilege levels. If you want to use the security component, all you need to do is check an option in the Code Mine “Add/Remove Components” dialog. If your app doesn’t need security, simply uncheck the security component, and the component is removed.

Code Mine lets you code all the business rules for a data set in a reusable Data Manager class. This rule class can then be dropped on any form that uses the data set. The form itself is often simply a “dumb shell” for presenting the data.

For maintaining data environments, you have a number of options. You can use native VFP data environment editor for simple SCX based forms. For cases where multiple forms or other objects need to use the same data environment, Code Mine includes a utility to create a reusable data environment class from an SCX definition. This makes it easy to share data environment definitions, or even to dynamically select a data environment at runtime.

The Code Mine framework was designed to be highly flexible. There are built-in “hook” methods throughout the framework to allow you to insert custom code without overriding methods in the framework classes. Of course, you can also subclass or override default methods if necessary to implement large scale customizations.

There is an intermediate layer of classes between the framework your application. This allows you to make global customizations without directly modifying the framework.

Code Mine ’s Control Binding Manager gives you full programmatic control over the movement of data into and out of bound controls. This lets you display or edit data in a different format than it is stored in. It also allows for the possibility of binding to alternate data sources, such as XML or ADO record sets.

Code Mine is fully compatible with the major 3rd party VFP tools like Stonefield Database Toolkit, Stonefield Query, Stonefield Reports, INTLToolkit, Fox Audit, and Fox Fire.

2) The Best Runtime Performance
“I had a large 8 page form that took over 25 seconds to load using (another well known framework). I switched to Code Mine for better performance and this form now takes only about 4 seconds.”
- Paul N. Temple, Temple Systems, Inc

Visual FoxPro 6.0 Features
Code Mine lets you take full advantage of the VFP 6.0 improvements in ActiveX and COM support, while still maintaining code compatibility with VFP 5.0. Other frameworks that support only VFP 6.0 rely heavily on the use of Access and Assign methods for notification when data is changed. Unfortunately, using these methods in VFP 6.0 adds 40 to 50 percent to the object load time overhead . This in turn leads to slower loading forms, and an overall sluggish feel to your applications. This overhead is not acceptable to us, so we have developed alternative techniques that run much faster. The result is that Code Mine lets you do everything the “VFP 6.0 only” frameworks do – only with much less runtime overhead. And, as an added bonus, we maintain compatibility with VFP 5.0.

"using these methods in VFP 6.0 adds 40 to 50 percent to the object load time overhead" is a wild assertion without basis. Can you back this up with facts that the presence of the access and assign methods actually adds 40% to 50% to the object load time overhead? ( try the test forms at ) " The simple presence of access and assign methods cannot possibly add this much overhead. There are a lot of factors that impact object instantiation and the number of methods and the amount of code in them and without some actual factual basis that establishes access and assign methods have this impact this comment simply doesn't hold water.

"wild assertion without basis..." Not at all. Access/Assign methods are not just any-old-methods. Internally, VFP handles them quite differently than regular methods, and the overhead associated with them is not the same as regular methods. Any base VFP object that has a access/assign method defined (even if it is never called or used) will take over twice as long to instantiate in a form (about 125% longer). Now, since most objects in a real application have other fixed creation overhead associated with them, the actual percentage difference you see in a real app will be less than in a form based directly on the VFP base classes. In a typical Code Mine form, the savings in instantiation time is typically 40 to 50 percent.

Since object creation is pretty fast anyway, doubling it is not a big problem on fast computers, though it can have a noticeable impact on slower machines, especially 100mhz and under. I’m not saying you should never use access/assign methods in your own code – only that in order to achieve the best possible performance, we have decided not to use them in our framework. Of course, when writing Code Mine based applications, you are free to use access/assign in your own objects however you like - just be aware of the cost and use them judiciously.

I am a nobody, but this really surprised me so I tested it. I created an object with a property and an assign method and then one with the same property and a normal method with the same code in that method. The results I came up with were the same for both objects. I tried it in the same VCX and then in different VCXs and it didn't matter, the time to instantiate and then release 100, 1,000 and 10,000 objects was the same whether or not I used an access method. Maybe my test was bad I would be happy to show the code I used. – Bill Elvin

Bill, see Impact Of Access And Assign. Technically this point is correct however, its significance appears to be misrepresented.
I stand corrected when I used the custom class and simply added my methods it must have masked the results. Funny how the more I ran this test the more I found this difference to be insignificant.
It’s not misrepresented. The performance impact is more pronounced on objects in a form than on ones created programmatically. That is why some people were seeing different results. You can download test forms from

The real point of this whole discussion is that your marketing material misleads people about access and assign methods and data dictionaries. There would probably be a lot fewer objections to it if it just stated that the code is highly optimized and you've avoided using techniques that can negatively impact performance. It'd be a shame if an unwary developer decided to never use access and assign methods because they gathered from your material that they kill performance. For those that have seen this discussion or already know the impact, it brings the integrity of your material into question, which you certainly don't want. What a concept, use the wiki to make sure your marketing material is accurate and gets the right message out!
I certainly don’t mean to mislead anybody. All we are trying to do it point out the reasons behind some of the design decisions we have made along the way. After the initial skepticism, I think most people have now had a chance to run the test forms and see that the results are accurate, so there shouldn't be a problem. Since it’s difficult to summarize complex points in a short list of bullets, I will look into providing links to more detailed explanations from the short bullets on our web site. Hopefully that will help avoid future misunderstandings.

Background Processing
Code Mine provides advanced internal event management, including automatic background processing. Much of the routine interface updating (such as toolbar button enable/disable, multi-lingual ToolTip translation, etc) is done in the background, during idle time. This helps even the most elaborate interfaces appear “snappy” and responsive.

Data Dictionaries
With Code Mine there is no need for the high overhead of an active data dictionary. Proper use of rule and data classes, along with field level control class mapping, can make an active data dictionary unnecessary. This is a good thing, because although active data dictionaries were convenient in many respects, they added enormous amounts of runtime overhead to your applications.

The use of field level control class mapping implies that Codemine uses UI controls to enforce business rules, which doesn't fit well in a true n-tier architecture.
Business rules don't have anything to do with it. I am just saying that you have the ability to assign a particular class to be used as the presentation object for each particular field in a cursor. This is often more flexible, and always faster than configuring a generic presentation control at runtime from an active data dictionary.

"you have the ability to assign a particular class to be used as the presentation object for each particular field in a cursor" - VFP provides this ability natively and other frameworks with and without data dictionaries have extended it. What frameworks have active data dictionaries that you feel have a negative impact on instantiation time?

There isn't necessarily a high overhead to active data dictionaries and the lack of an active data dictionary means Codemine doesn't address the ability to change meta data and have the changes immediately reflected in the app; instead you must recompile and redeploy. The lack of a DD also means either a lot of instance coding or setting a lot of properties that have to be reset each time a field is used or that more custom classes need to be created. A blanket statement that there's no need for an active data dictionary doesn't cut it, particularly on large applications.

"you must recompile and redeploy" – Yes, in some cases, and this is one of the reasons you see the enormous performance increase with Code Mine. It will always be faster to resolve as much as possible at compile time rather than at runtime. Even when using an active DD, in order to gain the benefit of not needing to redeploy after changing the DD, the DD needs to be shared over a network, which slows everything down even more. All we are trying to point out is that there are a number of other techniques available that give many of the benefits of an active DD, with lower cost in overhead.

Of course, if you ever do have a need for an active DD, you can always integrate SDT or something similar with very little effort. The important point is that with Code Mine you are not burdened with the overhead of an active DD unless you really have a specific need for it. This is another reason why Code Mine scales so well. The hooks are there to add what you need when you need it, without carrying around needless overhead you don’t need.

3) The Best Value
“… Code Mine has solved the vast majority of my challenges with both OOP and VFP. I just wish I had known about Code Mine before investing literally thousands of dollars and hours with other frameworks.”
- Dick Heyder, Heyder Enterprises, West Frankfort IL

“Easy to Learn” Means “Cost Effective”
Our 3 tier design is remarkably easy to learn and master. This can save you thousands of dollars in time and training costs.

Many other frameworks not only cost hundreds of dollars more than Code Mine, but can also require extensive training to master. For example, some charge $2000 to attend training classes to learn to use their framework. When you also consider the related travel and time expenses, the real cost of using those other frameworks is extremely high – especially if you have more than one developer using the framework.

Other vendors "requiring" a course to master is a bit of a sweeping statement. Based on Mr. Garcia's comments below, it looks like he could benefit from a codemine course, assuming of course, a codemine actually existed..< bg >... John Petersen

Most of what I know of the other frameworks comes from customers who have tried them. Hardly a week goes by where we don't get a note from someone saying how much easier Code Mine was for them to learn than other frameworks they have tried. So that is all we were really trying to point out here. We do offer a 2 day on site training course, and also a mentoring program for those who want it, but most people find that they just don't need very much help. Of course, "easy" is a relative term, and there are a wide range of developer skill levels out there, so you never know. You _do_ need to have at least a basic understanding of VFP programming in order to use Code Mine effectively. - Dave Lehr
4) The Best Technical Support
“The documentation is some of the best I've seen with a framework. And support is beyond belief. How about reporting a "bug" in the morning and having a fix to it that same afternoon. Or how about submitting a support request on a weekend via email and receiving an answer a few hours later.”
- Jim Kearns, Software Solutions LLC

Free Support
Your Code Mine order includes 1 hour of free priority phone or email technical support. This can be used to help get you started designing your first application, or for any other reason. After your 1 hour expires, we also offer unlimited “basic” support via email. This can be used to help point you in the right direction if you get stuck in a particular area, or are having a problem getting a feature to work as documented. Email support response is usually next business day or sooner.

We are able to offer this free support for one simple reason: most Code Mine users do not need very much support. Since Code Mine is so reliable and easy to learn, our technical support burden is light.
Mentoring Program

For those of you who are new to VFP, or are on a tight schedule, we offer a paid “mentoring” program where we provide extended one-on-one assistance in designing, writing, or debugging your applications. This can usually be done remotely via telephone and/or email, on an as-needed basis.

5) The Best International Feature Set
“I tested some of the frameworks on the market, and Code Mine is the best I have seen! For example, multilingual forms with Code Mine and Intl Toolkit loaded nearly twice as fast as (another well known framework). Also, your documentation and e-mail support is very good, thank you!”
- Hans Mosberger, Switzerland

Multi Language Support
Code Mine includes full multi-lingual support for creating international applications. English, Spanish, German, and French translations of the system messages, help, and user interface elements are included with the framework. It is easy to add, remove, or customize translations as necessary. You have the option of both design time and runtime localization. For additional localization tools, Code Mine is also compatible with Steven Black’s popular ?INTLToolkit.

Euro & Multi Currency Support
Code Mine includes optional classes for supporting multiple currencies and automatic currency conversion. This is especially important for European developers who need to support both Euro and native currencies in every application. For single currency apps, the multi-currency component can be removed with the click of the mouse.

I've used it, you can do good small applications in Code Mine in a short time, but the problem is the same with all frameworks, when you want to do different things that don't go with the framework it takes a while!
Needs more information on how to use forms and controls, some flow diagrams of the wiring inside, and examples, examples and examples... anyway I'm still using it! :)
-- ?JGarcia
Is this an advertisement or a discussion of the benefits of Code Mine? It certainly reads like an ad to me. Jim BoothOffsite link to
Nothing wrong with that, really. Interesting to see interjections and point-counterpoint in an ad :-)-- Steven Black I agree, I was just trying to put a context on the body of the post. I have no problem with a vendor describing their product, but I like the idea that it is obvious that it is a vendor describing their product.
A review of Code Mine can be found in the Jan. 2001 issue of Fox Talk.
Category Frameworks VFP Commercial Frameworks Category Needs Refactoring
See Also: Framework Feature Chart Frame Works Codemine Users
( Topic last updated: 2003.03.15 12:47:58 AM )