main logo
Subject: Re: Opinions on the CodeMine Framework, please.
Author: "Michael J. Babcock"
Posted: 2004/03/31 13:45:13
 
View Entire Thread
New Search


Jim Kearns wrote:
>>>Must you use the CM methods for handling data (i.e., the data environment)?
> No, but you might want to. With CodeMine, you can use the DE for drag/drop of table fields and quick prototyping using .SCX forms.
> See the following from the CodeMine docs:
>
> Export Form Data Environment:
>
> The "Export Form Data Environment." option runs a CodeMine utility to extract the DataEnvironment object from an SCX based form, and
> generate a PRG based class definition from it. The PRG based data environment class can then be used by a VCX based form by setting
> the cDataEnvironment property of the form.
>
> And the following:
>
> The Codemine Data Environment class (cmDataEnvironment of cmData.vcx) can be thought of as the "Business Object" of your
> applications. It is a container that defines the cursors, rules, and relationships of a particular dataset. The native data
> environment of an SCX form is not used by CodeMine at runtime. You can still use the native data environment at design time if you
> like, but it will be converted to a CodeMine Data Environment (CDE) at runtime.
>
> Using the native Data Environment is sometimes adaquate for simple SCX forms based on native VFP tables. However, defining the CDE
> as a class at design time gives you many extra features that are not available in the native VFP data environment. These include
> things like alternate cursor types (like SQL passthrough or ADO), and setting relations between views.
>
> A CDE class may be used stand-alone, or attached to a form.

Thanks for that doc quote, Jim. Interesting.

Let me briefly explain how I do my forms (SCX or VCX): My forms never
do a USE MyCursor in the form.load events and as I said, I don't use the
DataEnvironment at all. Instead, my form.load event invokes the BizObj,
which in turn invokes it's related DataObj event. And that DataObj is
the one that actually does the opening of tables and retrieving/saving
of information. I like that format. It works well for me and gives me
great flexibility in terms of not having to worry about the backend much
at all. I can change it at will the only code that changes is the
DataObj code. The GUI assumes cursor names for sure that the form
controls will use, but the DataObj is the one responsible for creating
those cursors, be it from opening tables directly (never for me), using
parm'd views (mostly), or even if SPT was used to create the cursor.

So I'm just trying to confirm that I can indeed still use that technique
and not be forced into using CM's method of data handling.

Comments? Flames? ;-)

--

Michael J. Babcock, MCP
President/CSA, MB Software Solutions, LLC
http://mbsoftwaresolutions.com
"Bettering your bottom line by helping you work smarter, not harder,
with custom software solutions."


 
©2004 Michael J. Babcock
<-- Prior Message New Search Next Message -->