Chapter XI Essentials VFP application development
In the development of applications, the first system should be carried out environmental planning, planning factors to be considered are: application-oriented users and may require a variety of operations, the database size, system platform (single-user or network) and procedures to deal with the type of data (local data or remote data) and so on. Planning is complete, the project manager can use to carry out each step of development, it can help manage the development process of all documents, and eventually even into applications. application development steps more or less as follows:
vfp application development" />
1. database structure design
2. System features modular design
3. Menu design
4. User interface Design
5. Query Design
6. Report Design
7. System maintenance design
8. Debug module
9. Even with the project manager into the application
11.2 Application of techniques to optimize
1. Optimize the table and index
(1) If there is no record or table buffering is enabled, it should be using INSERT-SQL command (because the index is updated once only), and do not use the APPEND BLANK command and then use the REPLACE;
(2) When a large number of records need to be added to the index over the table should, first of all to cancel or close the index finished in the additional data, and then rebuild the index, so the speed will be faster;
(3) in the SQL statement to try to avoid function call;
(4) If you need some kind of indexing frequently used order, use this index should be a cyclical sort of table to improve the performance table;
(5) in the multi-user environment, the use of CDX index file IDX Index file faster than that.
2. Use Rushmore technology to speed up data access
Use Rushmore technology can dramatically improve the speed. Rushmore is a fast from the table select the recordset technology, it can query response time from hours down to seconds or minutes. Visit to a single table, use the FOR clause, and visit a number of forms, the use of SELECT-SQL queries can be automatically implied use of the technology.
(1) access the data in a single table, use a FOR clause;
(2) access to multiple forms of data, use the SELECT-SQL, DELETE-SQL, UPDATE-SQL command.
3. Optimization Forms and Controls
(1) the use of the data environment;
(2) in the form set in the number of restrictions on the form;
(3) in the box on page load dynamic page controls;
(4) the dynamic and data-bound controls;
(5) When necessary to carry out a number of screen changes the screen refresh delay;
(6) the method frequently used in the process to reduce the code.
4. VFP program to improve the performance of the general skills
(1) data to choose the correct data type
(2) open the file to avoid duplication, the need to open multiple documents, they are assigned to different work areas, the need for the use of SELECT command to choose the work area;
(3) The use of the FOR ... ENDFOR cycle, rather than using the DO WHILE ... ENDDO cycle, because the FOR cycle faster;
(4) copy the data from multiple fields, the use SCATTER TO ARRAY faster than SCATTER MEMVER;
(5) effective use of memory in order to avoid the need to create the object before them, when not the object should be to remove it promptly;
(6) as far as possible, the output is sent to the top of the window, speed faster;
(7) the use of SET TALK OFF command shows that the abolition of the state can save the top of the screen update time;
(8) SET DOHISTORY set to OFF, to avoid running the program when the time is updated each time the command window;
(9) macro instead of using the name of the replacement of the expression because the name of expression more quickly;
(10) apply effectively target attributes:
Optimization of the attributes cited, attribute values can be saved to a variable, and then make changes to the completion of a one-time set up when the property;
Apply effectively a number of attributes can be used WITH ... ENDWITH order to avoid duplication and to find an object, or object references stored in variables.
11.3 Programming Examples
- A simple management system for higher education
Database consists of: the registration form students, teachers, registration form, registration form faculties, professional registration forms, class registration forms, teaching schedules, course registration form, registration form results
Data structure: the structure of the data table below.
|Table Name||Field names and field types|
|Student Registration Form||No. Studies||Name||Gender||Date of Birth||Classes||Year||Professional||Departments||Features||Political landscape|
|Teachers Registration Form||No. teachers||Name||Gender||Date of Birth||Title||Promotion time||Positions||Professional||Departments||Time to work|
|Results Registration Form||No. Studies||Name||Course code||Usually results||Final exams||Overall results||Examination type||Teachers||Examination dates|
|Teaching schedule||Department Name||Class Name||Course name||Academic year / semester||Few hours||Examination type||Classroom||Teacher|
|Course Registration Form||Course code||Category||Course name||Credit||Whether the examination||Whether the compulsory|
|Class Registration Form||Class code||Class Name||Class size||Professional code|
|Professional Registration Form||Professional code||Professional Name||Sector code|
|Colleges Registration Form||Department code||Department Name|
2. The design of the basic form
The total form: the design of the interface forms and password to check the form (in the form set) and run the test.
Data Sheet form: first the wizard to create the data table form, and then modified into a form designer style required.
Data test: use of the data tables for each form part of the data input and a simple test.
3. Design menu
Main menu consists of: according to the needs of the system settings menu item 6: System Maintenance (password required before entering), browse, query, information output, help, exit.
Menu Design: According to the function needs to be done, the menu designer to design the menu sub-menu and menu item.
4. Design View form
Designed to form Set form, the form is set to be able to navigate to detailed information on the table, but also able to browse to the relevant statistical information table. In this form of information for any browser.
5. The design of a query form
First in the form designer to design a query in the general form, and then form in the wizard to guide the design of one-to-many form of several sub-forms, and in the form designer to carry out the necessary changes in the final total form of the command button to add the necessary code to enable the realization of the inquiry.
6. The design of the output statements
According to the school is usually required for teaching management information, design a set of statements can be printed when necessary.
Output statements include: a list of students, teachers list, a list of departments, professional list, class list, course list, results list, a list of teaching programs.
7. Perfect menu design
The preparation process of the menu item so that the menu functions of the code can be achieved.
8. Preparation help
Information will help form a separate document saved on your computer through the form of calls to display help information. Information mainly to help the function of the system and how to use.
9. Even for applications
The design of a main program and project manager in connection with the system for all documents button even in a single application.
Do not meet the requirements of some changes made to re-connected, then debug, until fully meet the requirement.
FoxPro Tutorial Articles
- INTERNET use VFP to create a database in Dynamic Query
- VFP songs with the preparation of the on-demand multi-media devices
- VFP edit box method for automatic correction
- VFP to use the system variables _SCREEN
- VFP table to track the realization of the log method
- Modified to achieve by the standard class library VisualFoxPro
- Grid control the use of VFP General entry interface design
- VFP Chapter Essentials to create and use tables
- Essentials VFP Chapter IV to create and use databases
- VFP Chapter VI Essentials object-oriented programming
- VFP Chapter V Essentials to create queries and view
- VFP form the basis of Chapter VII of the Design Guide
- VFP Chapter Essentials class to create and use
- VFP Chapter IX Essentials menu and toolbar design
- VFP Chapter VIII of the basis of statements of curriculum design and labeling
- Chapter XI Essentials VFP application development
- VFP Chapter Essentials basic knowledge of database systems
- VFP chapter Essentials language based on VFP
- Batch print envelopes with VFP
- Animation of simulation in the VFP
Can't Find What You're Looking For?
Rating: Not yet rated