These seems to be  common questions.
      What are Table Defined Data Structures?
      What are Table Wrappers?

Answers:

CFSQLTool at its heart is a namespace tool where the CF variable's
namespace is defined by database names and datatypes for tables, views,
columns and procedures, In effect, the tool  reverse engineers SQL data
definitions (meta-data names and data types) into CF data structures and
generates query functions using these data structures.  By using the same
namespace definitions for both SQL and CF, the programming tasks are
simplified because the names are the same.

Table Defined Data Structures. The table defined data structure wizard
generates a list of different CF data structures that can be cut and pasted
into CF code. The source for the CF structure names is defined by the
database's SQL meta-data names.  ( My use of the word data structures is
borrowed from the traditional meaning that considers all program variables
to be data structures.)  The 3 most useful structures are:
  -- a named CF structure variable that matches the tables column's
definition and named using the table's name
   -- Request.IN* - is a CF structure whose key names are the same as the
table's column names. There are 3 reasons for this structure. First,
looking backward from the database, the tool does not know which CF input
structures would be used, the name is easy to search and replace, use of
FORM, URL and FLASH input structures directly is not best practice.
   -- Request.OUT - like Request.IN. it's key names are the same as the
table's columns. Its use is for sending replies back to the browser.
       * See http://www.cflib.org/udf.cfm?ID=976 for more information about
Request.IN and Request.OUT.

Table Wrappers. The term CRUD refers to create (insert), read (select),
update and delete. A table wrapper is a library of functions that has
procedures for CRUD. The tool has 2 ways to build table wrappers.
     -- Stored Procedures. The stored procedure suite wizard helps build
CRUD stored procedures for a table that can be added to the database. Then,
using the User Stored Procedure Wizard, you can select the table's stored
procedures and build a CFC.
   -- Ad hoc queries. CFQuery tags primarily are for doing ad hoc
SQL  queries. The table wrapper wizard selector makes it easy to design
CRUD functions into a CFC. In addition it builds functions for list,
actor  in and actor out.

Both the stored procedure suite and the ad hoc table wrapper wizards allow
changing cffunction names for any selector choices. By running the wizard
multiple times, it is possible to quickly create a CFC wrapper that has
many query functions. For example, consider a contacts table. The number of
queries can be extensive. select by last name, select by state, update
status, insert name, update name. The tool's wizards makes it easy to
design and generate cffunctions for a table's wrapper CFC. The
CFC's  cffunctions can be any mix of stored procedures queries and ad hoc
queries.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to