Jim Booth - PowerPoint PPT Presentation

About This Presentation
Title:

Jim Booth

Description:

The Visual FoxPro Class Designer. Save As Class menu option ... Using collections to address the contents of a container. Visual FoxPro Seminar ... – PowerPoint PPT presentation

Number of Views:78
Avg rating:3.0/5.0
Slides: 69
Provided by: jamesw92
Category:
Tags: booth | jim

less

Transcript and Presenter's Notes

Title: Jim Booth


1
Visual FoxPro 6.0Seminar
  • Presented by
  • Jim Booth
  • Email jbooth_at_jamesbooth.com
  • In cooperation with Rainer Becker and the German
    FoxPro Users Group (dFPUG)

2
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

3
Database Design
  • Characteristics of a Relational Database
    Management System
  • Normalization of Data Design

4
Normalization
5
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

6
First Normal Form
  • Reduce entities to first normal form (1NF) by
    removing repeating or multi-valued attributes to
    another, child, entity.

7
First Customer Pass
Customers
Customer
Company Name Address Contact 1 Contact 2 Phone
1 Phone 2
8
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
9
2nd Normal Form
Reduce 1NF entities to second normal form (2NF)
by removing attributes that are not dependent on
the whole primary key.
10
Invoice Line Item File
Invoice Number Line Number Customer ID Product ID
11
Remove the Non-Dependent Fields
Line Item
Customer ID
Invoice
12
3rd Normal Form
Reduce 2NF entities to third normal form (3NF) by
removing attributes that depend on other, non-key
attributes (other than alternate keys).
13
Purchase Order
Order Number Vendor ID Vendor City
14
Remove Fields Depending on Non-key attributes
Purchase Order
Vendor City
Vendor
15
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.
16
An Employee Table
17
An Employee Table
18
An Employee Table
19
Fourth Normal Form
Reduce BCNF entities to Fourth normal form (4NF)
by removing any independently multi-valued
components of the primary key to two new parent
entities.
20
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
21
Fourth Normal Form
Employee - Skill
Name
Skill - Name
Employee - Objective
Name
Objective - Text
22
Fifth Normal Form
Reduce 4NF entities to fifth normal 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.
23
Retail Store Buyers
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
24
Fifth Normal Form
Buy-Vend
Vend-Prod
Buy-Prod
Vendor
Buyer
Buyer
Product
Vendor
Product
25
Denormalization
Normalized
Name
Postal Code
Postal Code
City
Address
Country
Postal Code
Denormalized
Name
Address
City
Country
Postal Code
26
Want to read more?
27
Visual FoxPro Database Container
  • Data dictionary
  • Relationships
  • Field level domains (Field Rule)
  • Table level domains (Table Rule)
  • Referential Integrity
  • Stored Procedures
  • DbGetProp() and DbSetProp()

28
View Designer
  • Updateable
  • The Update Tab in the view designer
  • Joins
  • Inner
  • Outer
  • Left, Right, and Full
  • Top N

29
Using SQL in the Visual FoxPro Language
  • Why use SQL at all?
  • The SQL Commands in Visual FoxPro
  • SELECT
  • UPDATE
  • DELETE
  • CREATE
  • INSERT INTO

30
Designing User Interfaces
31
The User Is In Control
Principle 1
32
Follow The Object-Action Paradigm
Principle 2
33
Be Consistent
Principle 3
34
Make ThingsSelf Evident
Principle 4
35
Pay Attention To Aesthetics
Principle 5
36
Give The User Feedback
Principle 6
37
Be Forgiving
Principle 7
38
Object Oriented Development
39
OO Terminology
  • Class
  • Object
  • Abstraction
  • Polymorphism
  • Inheritance
  • Messaging
  • Containership

40
Analysis and Design in an OO world
  • The Iterative Approach
  • Inception
  • Elaboration
  • Construction
  • Analysis, Design, Coding, Testing,
    Implementation, Training, Maintenance/Evolution
  • Transition

41
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

42
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 designers toolbar
    from your Classes

43
The Application Framework
  • What is a framework?
  • The overview of the architecture of the framework
  • Strategies for maximizing maintainability

44
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

45
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

46
Simple Base Classes
  • Label, Textbox, EditBox, CheckBox,
  • Option Button, Option Group
  • Command Button, Command Group
  • Spinner, Image, Line, Shape, Timer
  • Container, and Separator

47
Complex Base Classes
  • ComboBox, ListBox, and Grids
  • PageFrames
  • Custom, Container, and Control
  • Form, Formset, and Toolbar

48
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

49
OLE Base Classes
  • OLEBoundControl
  • Bound to a General Field in a DBF file
  • OLEControl
  • Predefined contents at design time.

50
ActiveX Automation
  • Structure of ActiveX
  • Direct Manipulation of an ActiveX server
  • Automation of an Object Inside of an OLEControl

51
Multi-user Issues
  • What is the multi-user problem?
  • Two strategies (Philosophies)
  • Optimistic
  • It is unlikely that there will be a problem when
    I try to save.
  • Pessimistic
  • It is very likely there will be a problem when I
    try to save.

52
Data Buffering
  • How did we do this before?
  • Whats new and different now?
  • Row versus Table buffering
  • Pessimistic versus Optimistic buffering
  • Choosing the correct buffering mode

53
Setting the Buffering Mode
  • CursorSetProp() (CursorGetProp())
  • Using a Cursors BufferModeOverride property

54
Saving Buffered Edits
  • TableUpdate()
  • TableRevert()
  • GetFldState()
  • GetNextModified()

55
Transaction Processing
  • The all or none approach
  • BEGIN TRANSACTION, END TRANSACTION, and ROLLBACK
  • Resolving conflicts using CURVAL() and OLDVAL()

56
Client/Server - Is It For You?
  • When does Client/Server make sense?
  • Security
  • Scalability
  • Central Control of Data

57
Remote Data Sources
  • Setting up data sources under Windows (95, NT,98)
  • Connections in Visual FoxPro
  • Using Remote Views
  • Using SQL Passthrough functions

58
Designing Client/Server Applications
  • User Interface Design
  • No more BROWSE of the customer table
  • Awareness that your code does not have absolute
    control over the data updates.

59
Using Visual FoxPro to Create an ActiveX Server
  • OLEPublic classes
  • Designing the Server

60
Creating Your Own ActiveX Automation Servers
  • In-Process versus Out of process servers
  • DLL versus EXE
  • Compiling the server
  • Registering the server
  • Using the server

61
The Visual FoxPro Debugger
  • The debugger as a developers tool
  • Choosing a FoxPro frame or the debugger frame
  • Saving and restoring debugger settings
  • Hot Keys in the debugger

62
The Debugger Windows
  • Trace
  • Watch
  • Locals
  • Call Stack
  • Output
  • SET DEBUGOUT TO
  • Event Tracking
  • Setting Breakpoints

63
Coverage Analysis/ Application profiling
  • SET COVERAGE TO ltFileNamegt
  • Turning coverage on and off
  • Using the Coverage Profiler

64
Using Assertions
  • The ASSERT command
  • SET ASSERTS ON/OFF

65
Using The DebugOut Command
  • Does not mess up your application screen
  • Does not introduce extra window focus events to
    your application

66
Visual FoxPro and the Internet
  • What is HTML?
  • How does the Internet work?
  • The Internet Search Wizard
  • Accessing the search wizard page
  • The Web Publishing Wizard

67
Advanced Class Design Concepts
  • Inheritance Hierarchy
  • The is-a relationship
  • Containership Hierarchy
  • The has-a relationship
  • Design Patterns

68
Accessing the Windows API from Visual FoxPro
  • What is the API?
  • DECLARE command
  • Calling an API function
Write a Comment
User Comments (0)
About PowerShow.com