System namespace and future projects

Topics: General, Bug Information
Apr 28, 2008 at 10:32 AM
Hey all.

I was playing with GDIPlus but was also looking for a useful RSS generation class and started to think about the various implementations of new functionality in VFP/X with Sedna, etc.

We have My which replicates the My functionality. This makes good sense since you can use My pretty much on its own within VS and VFP.

But with GDIPlus, it creates a pseudo System namespace for drawing. (similar to System.Drawing).

Is this a model that should be followed for future projects as well that work in a similar fashion to other DotNet namespaces.

Kind of like having a System.XML.XMLWriter class that also looks for _SCREEN.System and attaches itself?

Apr 29, 2008 at 4:27 PM
Edited Apr 29, 2008 at 4:30 PM
Developers being able to continue creating additional pure VFP implementations of .NET namespaces was one of the many reasons that Bo Durban and I decided to mimic the .NET namespaces for the GDIPlusX library. It is also one of the driving factors that lead to the creation of the .prg files that are named according to the namespaces they implement. All a developer has to do is follow the roadmap provided within the GDIPlusX library when implementing portions of .NET namespaces. While it can seem somewhat daunting at first (how the heck did they do that?), the actual workings are fairly simple and straight-forward. We had eventually wanted Doug Hennig to work some of his intellisense magic to give us a little more robustness at design time, but the ability to instantiate the _SCREEN.system object and the power of THIS_ACCESS works for most of the stuff that a developer needs during development to be productive.

So, my answer to your question is yes. I would say that your thought is a good one and inline with the original intent. Besides being able to leverage the millions that Microsoft has spent in designing the namespaces and the objects they expose, it also allows VFP developers the ability to make use of tons of documentation and .NET code samples that are available on the MSDN and elsewhere out on the internet. Comparing a snippet of .NET code that is working with GDI+ through the System.Drawing and related namespaces and then looking at the equivalent in VFP code that is using the GDIPlusX library one cannot help but note the striking similarity between the two.