710 likes | 918 Vues
Visual FoxPro 6.0 Seminar. Presented by Jim Booth Email: jbooth@jamesbooth.com In cooperation with Rainer Becker and the German FoxPro User’s Group (dFPUG). General Issues Related to Development. Understanding the costs Lowering the costs The Value of Conventions and Standards
E N D
Visual FoxPro 6.0Seminar Presented by Jim Booth Email: jbooth@jamesbooth.com In cooperation with Rainer Becker and the German FoxPro User’s Group (dFPUG)
General Issues Related to Development • Understanding the costs • Lowering the costs • The Value of Conventions and Standards • The Value of Object Oriented Design • The Development Cycle • Managing Risks
Database Design • Characteristics of a “Relational Database Management System” • Normalization of Data Design
Why bother with Normalization • Reduce the possibility of data inconsistencies • Reduce the space required for storing data • Reduce possible update and delete anomalies • Increase the stability of the data design
First Normal Form Reduce entities to firstnormal form (1NF) by removing repeating or multi-valued attributes to another, child, entity.
First Customer Pass Customers Customer # Company Name Address Contact 1 Contact 2 Phone 1 Phone 2
Removing the Repeating Groups Contacts Customers Customer # Contact # Customer # Name Address Phone Code Company Name Address Contact 1 Contact 2 Phone 1 Phone 2 Phones Customer # Phone Code Area Code Phone Number
2nd Normal Form Reduce 1NF entities to secondnormal form (2NF) by removing attributes that are not dependent on thewholeprimary key.
Invoice Line Item File Invoice Number Line Number Customer ID Product ID
Remove the Non-Dependent Fields Line Item Customer ID Invoice
3rd Normal Form Reduce 2NF entities to thirdnormal form (3NF) by removing attributes that depend on other, non-key attributes (other than alternate keys).
Purchase Order Order Number Vendor ID Vendor City
Remove Fields Depending on Non-key attributes Purchase Order Vendor City Vendor
Boyce/Codd Normal Form Reduce 3NF entities to Boyce/Codd normal form (BCNF) by ensuring that they are in 3NF for any feasible choice of candidate key as primary key.
EmpId Employee Number Clock Number An Employee Table
EmpId Employee Number Clock Number An Employee Table
EmpId Employee Number Clock Number An Employee Table
Fourth Normal Form Reduce BCNF entities toFourthnormal form (4NF) by removing any independently multi-valued components of the primary key to two new parent entities.
Employee - Skill - Objective Table Name Skill - Name Objective - Text Jones accounting more money Jones accounting prestige Jones public speaking more money Jones public speaking prestige
Fourth Normal Form Employee - Skill Name Skill - Name Employee - Objective Name Objective - Text
Fifth Normal Form Reduce 4NF entities to fifthnormal form (5NF) by removing pair-wise cyclic dependencies (appearing within composite primary keys with three or more component attributes) to three or more new parent entities.
Retail Store Buyers Mary Jordache Jeans Mary Jordache Sneakers Sally Jordache Jeans Mary Liz Claiborne Blouses Sally Liz Claiborne Blouses Buying Suppose Liz Claiborne adds jeans to their list of products. We need to add two updates to our table because both Mary and Sally buy jeans and buy from Liz Claiborne. Buyer Vendor Product
Fifth Normal Form Buy-Vend Vend-Prod Buy-Prod Vendor Buyer Buyer Product Vendor Product
Denormalization Normalized Name Postal Code Postal Code City Address Country Postal Code Denormalized Name Address City Country Postal Code
Relational Database Selected Writings C. J. Date Addison-Wesley Publishing Company ISBN: 0-201-14196-5 Handbook of Relational Database Design Candace C. Fleming and Barbara von Halle Addison-WesleyPublishing Company ISBN: 0-201-11434-8 Want to read more?
Visual FoxPro Database Container • Data dictionary • Relationships • Field level domains (Field Rule) • Table level domains (Table Rule) • Referential Integrity • Stored Procedures • DbGetProp() and DbSetProp()
View Designer • Updateable • The Update Tab in the view designer • Joins • Inner • Outer • Left, Right, and Full • Top N
Using SQL in the Visual FoxPro Language • Why use SQL at all? • The SQL Commands in Visual FoxPro • SELECT • UPDATE • DELETE • CREATE • INSERT INTO
The User Is In Control Principle 1
Follow The Object-Action Paradigm Principle 2
Be Consistent Principle 3
Make ThingsSelf Evident Principle 4
Pay Attention To Aesthetics Principle 5
Give The User Feedback Principle 6
Be Forgiving Principle 7
OO Terminology • Class • Object • Abstraction • Polymorphism • Inheritance • Messaging • Containership
Analysis and Design in an OO world • The Iterative Approach • Inception • Elaboration • Construction • Analysis, Design, Coding, Testing, Implementation, Training, Maintenance/Evolution • Transition
Analysis and Design in an OO world There is a constant looping back in this OO development cycle. New requirements discovered during coding or implementation feed back into the design phase. New functional requirements discovered alter future iterations
The Visual FoxPro Class Designer • Save As Class menu option • Adding properties and methods to a class • Specifying an Include file for a class • Creating subclasses • Adding controls to the form designer’s toolbar from your Classes
The Application Framework • What is a framework? • The overview of the architecture of the framework • Strategies for maximizing maintainability
The Framework In Detail • The Application Manager • The form class • The startup program • Building an application using the framework • The form • The Menu • Enhancing your framework
Form and Class Design • Coding methods in a reusable way • Using THISFORM, THIS, and the Parent property • Using WITH/ENDWITH • Using collections to address the contents of a container
Simple Base Classes Label, Textbox, EditBox, CheckBox, Option Button, Option Group Command Button, Command Group Spinner, Image, Line, Shape, Timer Container, and Separator
Complex Base Classes ComboBox, ListBox, and Grids PageFrames Custom, Container, and Control Form, Formset, and Toolbar
Using Builders • The Visual Foxpro Builders • Make it easier to setup the complex controls • Building your own builders • Builder.dbf and Builder.app • ASELOBJ() • Using the special Builder property of a class
OLE Base Classes • OLEBoundControl • Bound to a General Field in a DBF file • OLEControl • Predefined contents at design time.
ActiveX Automation • Structure of ActiveX • Direct Manipulation of an ActiveX server • Automation of an Object Inside of an OLEControl