 |
VFP 愛用者社區 本討論區為 Visual Foxpro 愛用者經驗交流的地方, 請多多利用"搜尋"的功能, 先查看看有無前例可循, 如果還有不懂的再發問. 部份主題有附加檔案, 須先註冊成為社區居民才可以下載.
|
上一篇主題 :: 下一篇主題 |
發表人 |
內容 |
朱育興
註冊時間: 2003-08-25 文章: 661 來自: 台中市大里區
第 76 樓
|
發表於: 星期日 九月 19, 2004 11:47 pm 文章主題: |
|
|
透過根據資料集合物件的資料存取使效能提高
要使得主從架構應用程式快速成和有效率,應考慮的一個最重要的因素就是儘量減少從伺服器上下載的資料。由於主從架構應用程式可能要存取遠端伺服器上的大量資料,使用傳統的 Xbase 搜尋技術可能會非常慢。為了提高執行速度,可以使用根據資料集合物件的資料存取技術來過濾將要下載的資料量。
高效率地存取根據集合物件的資料
遠端資料是根據集合物件的資料:要存取遠端資料,必須使用 SELECT - SQL 敘述從一個大量的資料中選出一個資料集合。建立一個傳統的本地電腦應用程式和建立一個主從架構應用程式的最重要區別在於傳統的 Visual FoxPro 搜尋技術和資料集合物件的伺服器資料存取技術之間的區別。
使用傳統的搜尋技術
在傳統的 Xbase 程式設計中,你可以對你所查詢的離散而且是大量的資料使用 GO BOTTOM 命令。透過執行一個 SET RELATION 命令在兩個資料表格之間建立一個暫存關聯,可以在資料中搜尋,然後可以透過 SKIP 命令在相關的記錄中移動。
當這種搜尋記錄的方法應用於遠端資料時,如果遠端資料量巨大,將會導致存取效率降低。例如,假設您為了存取遠端資料來源中的一個大量資料的資料表格,首先建立了一個遠端資料集,然後執行 GOTO BOTTOM 命令。這時,資料集開始從資料來源抓取所有資料,然後透過網路傳輸資料,最後才載入到本地電腦系統的資料集暫存資料表格中,這段檢索動作需要經歷漫長的等待。
使用參數化的查詢
存取遠端資料的一種更有效方法是每次僅下載所需要的資料,需要得到其他額外的記錄或新記錄時,再重新查詢。可以使用有條件的 SELECT 敘述下載特定範圍的資料集合,需要存取新記錄或新的資料集合時,再使用 REQUERY( ) 函數。
無法對遠端伺服器資料執行 GO BOTTOM 命令,因為這樣做具有以下缺點:
•下載的資料量巨大將對網路資源造成不必要的負擔。
•處理不需要的資料會使應用程式的效率降低。
•潛在地降低了本地暫存資料表格中資料的正確性,因為遠端資料的改變只有在重新查詢的時候才能反應到本地電腦暫存資料表格中。
例如,若要建立一個主從架構應用程式用來搜尋客戶的訂單,可建立一個遠端資料集來存取 Customer 資料表格。然後建立另一個遠端資料集來存取 Orders 資料表格,並根據 cust_id 欄位將其設為條件。這樣,就可以把目前的顧客記錄做為 Orders 資料表格的資料集的參數。
可以使用參數給下載的資料集合規定一個範圍,使其下載的資料量比較適中。如果一次請求的資料量過少,將會降低程式的效率,因為這會導致對遠端伺服器的頻繁查詢工作。而如果請求過多的資料,則會把時間浪費在下載不需要的資料上。
選定最佳的主從架構設計方案
下面將舉例介紹利用主從架構技術得到好處的方法,以及如何避免因程式撰寫方法不當而造成系統效率降低。第一種方法使用傳統的程式撰寫方法,從一個遠端資料來源中取出所有資料,下載到本地暫存資料表格中,然後用 SET RELATION 命令將這些暫存資料表格聯繫起來。而第二、三、四種方法逐步應用更有效的抓取資料的技術,使用[just-in-time]方法有效地限制下載的資料量,從而提高網路的回應時間並獲取最新的資料。
使用一種未經最佳化的主從架構策略
對遠端資料使用本地電腦資料的搜尋技術是一種直接的未經最佳化的主從架構解決模式。例如,假定某一遠端資料來源中存有一千萬筆客戶記錄和一億筆訂貨記錄,您可以建立一個不考慮效率的應用程式,把所有客戶和訂貨記錄下載到本地電腦暫存資料表格中。然後對一億筆訂貨建立索引,在本地電腦暫存資料表格中對客戶和訂單資料表格建立一個暫存關聯,使用 SKIP 命令來搜尋記錄。
這種方法未考慮對效率進行最佳化,不過,如果“一”方在本地電腦而“多”方在遠端,這種方法可能還是可用的。
過濾多方
對上面這種方法稍加改進,可以得到另一種主從架構解決方案。這種方案就是減少關聯中“多”方資料的下載,但仍然下載“一”方的所有記錄,所以可以超過一些記錄。在這種方案下,需要建立一個遠端資料集來顯示關聯中的“多”方,也就是 Orders 資料表格,該資料集可用客戶的 ID 值作為變數。但這時,仍然需要下載整個 Customer 資料表格。
雖然對 Orders 資料表格建立一個有條件的資料集相對於下載所有的訂單訊息來說是一個改進,但是,在下載整個 Customer 資料表格的同時,仍然帶來了一些不必要的訊息。Customer 資料表格也同樣存在過時的危險,因為在系統上的其他使用者會對其進行修改。這種方案在關聯的“一”方僅包含少量資料集合的時候還是可行的。
過濾一方
更好的主從架構解決方案是為所有的遠端資料建立遠端資料集。在 Customer 資料表格的遠端資料集中,使用 SELECT 敘述選定某個地區的客戶,這樣就可以限制下載到遠端資料集中的客戶記錄的筆數。然後再對關聯中“多”方 Orders 資料表格建立一個遠端資料集,並以客戶 ID 值為參數。
這種方案可以取得更少量的記錄。使用 SKIP 命令可以在關聯的“一”方 (即 Customer 資料集) 中移動。使用 REQUERY( ) 函數可以存取“多”方 (即 Orders) 中的新資料。
在這種方案中,既限制 (或過濾) 了關聯中的“一”方又過濾了關聯中的“多”方,但仍能使用 SKIP 命令在過濾過的資料之中搜尋。 如果關聯中的“一”方經過過濾以後,仍然能夠提供足夠的訊息滿足下一筆的一些查詢,而不需要再次向遠端伺服器執行請求,那麼我們建議使用這種方案。
使用主鍵值存取一對多關聯
效率最高的主從架構解決方案是放棄使用效率較差的 SKIP 命令,而建立一個表單,讓使用者輸入或選定一個客戶 ID,然後把它既做為 Customer 資料表格的遠端資料集的參數,又做為 Orders 資料表格的遠端資料集的參數。
例如,可以建立一個一對多表單,其中“一”方顯示客戶訊息,而屬於“多”方的訂貨訊息則在多筆編輯控制項中顯示。該多筆編輯控制項可以與表單“一”方中已選取的客戶 ID 相聯繫。然後可以把 CURSORSETPROP( ) 的 MaxRow 屬性設定為 1,將下列程式碼寫在“一”方的表單:
SELECT * FROM customer WHERE customer.cust_id = ?cCust_id
當使用者想檢視另一個客戶的記錄時,必須輸入或選定一個新客戶 ID。表單用新客戶的 ID 值重新查詢資料中的訂單記錄,然後用新的記錄資料更新多筆編輯控制項。
使用這種技術,應用程式僅僅下載需要的資料。由於減少了下載的資料量,因而提高了網路的回應速度,而且,在顯示所請求的訊息之前重新查詢資料,這樣總能提供最新訊息。
這種方法在想要用任意主鍵值隨機存取一對多關聯時可以使用。在開啟一個表單時,還可以把一些主鍵值下載到控制項中,比如一個使用者不可輸入資料的下拉式列示方塊,並且提供一個控制項,讓使用者在需要的時候可以選定用來重新整理主鍵值的清單。
在主從架構應用程式中使用資料環境
在表單或表單集中使用遠端資料時,請將資料集加入到表單或表單集的資料環境中。可以把資料環境的 AutoOpenTables 屬性設定為“假”(.F.),這樣便可以指定應用程式什麼時候用遠端資料對資料集進行資料更新。在呼叫資料環境的 OpenTables 方法程序之後,可為文字輸入方塊或其他資料連結型控制項設定 ControlSource 屬性,一般是在與表單的 Init 事件相關連的程式碼之中進行。相關詳細資訊請參考「建立表單」。
相關資訊
主從架構高效率的設計
在最佳平台上放置資料
規劃主從架構應用程式
選定正確的方法
最佳化主從架構效能
使用 SQL pass-through 技術加強應用程式
----------------------------------------------------------------------------------------------
原文:
Performance Enhancement through Set-Based Data Access
One of the most important factors in building a fast, efficient client/server application is minimizing the amount of data you pull down from the server. Because client/server applications can access potentially huge amounts of data on a remote server, using traditional local navigation techniques could result in a slow client/server application. To speed performance, you use set-based data access techniques to filter the amount of data you download.
Accessing Set-Based Data Efficiently
Remote data is set-based; you access remote data by selecting a set of data from a large data store using SELECT - SQL statements. The most important difference between building a traditional local application and building a client/server application is the contrast between traditional Visual FoxPro navigational techniques and set-based server data access techniques.
Using Traditional Navigational Techniques
In traditional local database programming, you can access discrete and often large amounts of data by using the GOTO BOTTOM command, which you then query against. You can navigate through data by issuing a SET RELATION command to create a temporary relationship between two tables and then issuing a SKIP command to move through the related records.
While this method of navigating records could be used against remote data, it can be inefficient against large remote data stores. For example, if you create a remote view that accesses a large table on a remote data source and then issue the GOTO BOTTOM command, you must wait while all the data in the view is retrieved from the data source, sent across the network, and loaded into your local system's view cursor.
Using Parameterized Queries
A more efficient approach for accessing remote data is to download just the data you need and then requery to obtain specific additional or new records. Use a SELECT statement based on parameters to download a specific small set of data and then access new records by using the REQUERY( ) function to request a new set of data.
You don't issue the GOTO BOTTOM command against remote server data because this would:
•Unnecessarily burden network resources by downloading huge amounts of data.
•Slow performance of your application by handling unneeded data.
•Potentially reduce accuracy of the data in the local cursor because changes to remote data aren't reflected in the local cursor until you requery.
For example, if you want to create a client/server application that accesses the orders for a particular customer, create a remote view that accesses the Customer table. Create another remote view that accesses the Orders table, but parameterize the view based on the cust_id field. Then use the current customer record as the parameter for the view of the Orders table.
You can use the parameter to scope the downloaded data set to just the right amount of data. If you request too little data, you can lose performance because you'll have to requery the remote server more frequently. If you request too much data, you can waste time downloading data you won't use.
Choosing the Best Client/Server Design
The following examples describe how to gain the benefits of client/server technology and avoid the pitfalls of poor programming techniques. The first method uses traditional programming practices to retrieve all the data from a remote data source into local cursors that are then related with the SET RELATION command. The second, third, and fourth methods adopt progressively smarter data-fetching techniques, effectively limiting the amount of data downloaded with a just-in-time methodology that provides the freshest data and fastest response time over a network.
Using an Unoptimized Client/Server Strategy
A straightforward, unoptimized client/server application uses local data navigation techniques with remote data. For example, if you have 10-million customer records and 100-million order records on a remote data source, you can create an inefficient application that downloads all the Customer and Order records into local cursors. You could then index on 100-million order records, create a temporary relationship between the Customer and Orders tables in your local cursors, and use the SKIP command to navigate through the records.
This method is not optimized for performance, but might, however, be useful if the one side is local and the many side is remote.
Filtering the Many Side
A slightly improved client/server application limits the many side of the relationship, but retrieves all of the one side so you can skip through the records. In this scenario, you create a remote view of the many side of the relationship, the Orders table, parameterized on the customer ID. You then download the entire Customer table.
While creating a parameterized view on the Orders table is an improvement over downloading all of the orders, you still retrieve unnecessary information by continuing to download the entire Customer table. The Customer table is also increasingly out-of-date as changes are made by other users on your system. This method might be beneficial if the one side of the relationship contains a small data set.
Filtering the One Side
A better client/server programming technique creates remote views for all remote data. You limit the number of Customer records downloaded into the remote view of the Customer table by using the SELECT statement in the view to select just the customers for one region. You then create a remote view of the many side of the relationship, the Orders table, parameterized on the customer ID.
This scenario retrieves a smaller set of records. You use the SKIP command to skip on the one side of the relation (the Customer view). You use the REQUERY( ) function to access new data on the many (Orders) side.
In this example, you limit, or filter, both the one side and the many side of the relationship, and can still use the SKIP command to navigate through the filtered data. This method is recommended if the one side of the relationship, even after being filtered, is still sufficient to provide information for a successive set of queries before you requery the remote server.
Using the Primary Key to Access the One-to-Many Relationship
The most efficient client/server programming paradigm gives up the luxury of using the SKIP command, and creates a form that requests input or selection of the customer ID, which is then used as a parameter for a remote view of the Customer table. This parameter is also used as a parameter for a remote view of the Orders table.
For example, you could create a one-to-many form in which the customer information forms the one side, and a Grid control displays the many side of the relationship. The Grid control can be bound to the customer ID chosen in the one side of the form. You can then set the MaxRecords property of CURSORSETPROP( ) to 1, and use the following code to populate the one side of the form:
SELECT * FROM customer WHERE customer.cust_id = ?cCust_id
When users want to view a different customer's record, they input or select a new customer ID. The form requeries the data source for the orders for the new customer ID and refreshes the Grid control with the new order data.
Using these techniques, your application downloads just the data you need, at the time it's needed. You speed response over the network by limiting the amount of data downloaded, and you provide fresher information to the user by requerying the data source just before you display requested information.
This method is recommended when you want to access the one-to-many relationship randomly using any primary key value. You might want to download the primary keys into a control, such as a drop-down list, when you open the form and then provide a control that the user can choose to refresh the list of primary key values on demand.
Using the Data Environment in Client/Server Applications
When you use remote data in a form, include the views in the form's data environment. You can set the AutoOpenTables property for the data environment to false (.F.) so that you can specify when the application refreshes the views with the remote data. Set the ControlSource property for text boxes or other data-bound controls after you call the data environment's OpenTables method, typically in the code associated with the Init event of the form. For more information, see Creating Forms.
See Also
Client/Server Design for High Performance
Data Location on the Optimal Platform
Planning Client/Server Applications
Selecting the Right Methods
Optimizing Client/Server Performance
Enhancing Applications Using SQL Pass-Through Technology _________________ 希望有更多人來參與
VFP wiki - 需要大家一起完成的VFP電子書與FAQ |
|
回頂端 |
|
 |
朱育興
註冊時間: 2003-08-25 文章: 661 來自: 台中市大里區
第 77 樓
|
發表於: 星期日 九月 19, 2004 11:48 pm 文章主題: |
|
|
在最佳平台上放置資料
把資料庫的資料和其他屬性儲存在最佳平台上,可以獲得最佳的效率。某一特定元素的最佳平台取決於存取和更新該元素的方法。 例如,您可以將郵遞區號一類的伺服器資料表格保留一個本地備份,當成一個尋找資料表格,只有當後端的資料表格變更時,才對本地的備份進行資料更新。
下表列出一些常用的應用程式元素,以及在哪兒放置這些元素可以獲得最佳效率。
根據平台放置元素
-------------------------------------------------------------------------------------------
元素 位置 類型 附註
---------- ---------- ------------------------------ --------------------------------------
資料表格 本地電腦 伺服器尋找資料表格的本地備份; 如果遠端伺服器支援,可以使用時間戳記欄
資料少的不經常變更的資料表格 位來比較並且選定性地重新整理本地資料表
格,以使得對本地資料表格的變更與後端源
資料表格的變更同步。
遠端 大的或經常變更的資料表格
規則 本地電腦 在遠端資料集中的規則 可以使用 DBSETPROP( ) 把欄位和資料記錄
層級之驗證規則儲存在遠端資料集中。在應
用程式中可以使用這些本地驗證規則來驗證
資料,然後再把這些資料輸出到後端做為對
遠端資料表格的更新。
遠端 遠端基本資料表格的列記錄和行記
錄驗證規則
儲存式程序 本地電腦 Visual FoxPro 儲存式程序
遠端 在遠端伺服器上的儲存式程序 使用 SQL pass-through 函數 SQLEXEC( )
可呼叫在遠端伺服器上的儲存式程序。
異動交易 本地電腦 Visual foxPro 異動交易
遠端 伺服器異動交易
觸發式程序 本地資料集 在資料集上無觸發式程序
遠端 伺服器觸發式程序
-------------------------------------------------------------------------------------------
為了減少尋找時的網路傳輸,不僅可以把不常變更的資料表格儲存在本地電腦,而且可以把經常變更的尋找資料表格也儲存在本地電腦。例如,可以下載公司的客戶清單,只有當客戶訊息變更時才對其進行重新整理。
為了做到這一點,可以撰寫應用程式來比較資料表格的本地備份時間戳記欄位和後端資料時間戳記欄位 (如果遠端伺服器支援時間戳記欄位)。只有當伺服器的資料表格變更時,才更新本地備份。也可以在表單中增加一個指令按鈕,用於強制對資料表格的立刻下載,這樣就允許使用者在需要時,便可重新整理他們的本地資料表格的備份。
相關資訊
透過根據資料集合物件的資料存取使效能提高
選定正確的方法
規劃主從架構應用程式
應用程式的快速開發
主從架構高效率的設計
最佳化主從架構效能
使用 SQL pass-through 技術加強應用程式
----------------------------------------------------------------------------------------------
原文:
Data Location on the Optimal Platform
You get maximum performance when you store data and other attributes of your database on the optimal platform. The best platform for a particular element depends on how the element is accessed and updated. For example, you might want to store a local copy of a server table, such as a postal code directory that is used as a lookup table, and refresh the local copy only when the back-end table changes.
The following table lists some common application elements and examples of where to locate them for optimal performance.
Locating Elements by Platform
------------------------------------------------------------------------------------------------------
Element Location Type Notes
----------------- ----------- ----------------------------- ------------------------------------------
Tables Local Local copies of server lookup Use a time stamp, if supported by your
tables; small, infrequently remote server, to compare and optionally
changed tables refresh the local table to match any
changes to the back-end source table.
Remote Large or frequently changing
tables
Rules Local Rules on remote views You can use DBSETPROP( ) to store field-
and record-level rules on a remote view.
Your application can use these local rules
to check the validity of data before
sending the data to the back-end as an
update to remote tables.
Remote Row-level and column-level
rules on remote base tables
Stored procedures Local Visual FoxPro stored
procedures
Remote Stored procedures on a remote Use the SQL pass-through SQLEXEC( )
server function to call stored procedures on a
remote server.
Transactions Local Visual FoxPro transactions
Remote Server transactions
Triggers Local views No triggers on views
Remote Server triggers
------------------------------------------------------------------------------------------------------
To reduce network traffic during lookups, you can choose to store not only infrequently changing but also frequently changing lookup tables locally. For example, you can download your company's customer list and refresh it only when customer information changes.
To accomplish this, you can program your application to compare the time stamp on the local copy of the table with the time stamp on back-end data (if your remote server supports time stamps) and update the local copy only if the server table has changed. You can also add a command button to your form that forces an immediate download of the table, allowing users to refresh their copy of the local table on demand.
See Also
Performance Enhancement through Set-Based Data Access
Selecting the Right Methods
Planning Client/Server Applications
Rapid Application Development
Client/Server Design for High Performance
Optimizing Client/Server Performance
Enhancing Applications Using SQL Pass-Through Technology _________________ 希望有更多人來參與
VFP wiki - 需要大家一起完成的VFP電子書與FAQ |
|
回頂端 |
|
 |
朱育興
註冊時間: 2003-08-25 文章: 661 來自: 台中市大里區
第 78 樓
|
發表於: 星期一 九月 20, 2004 9:57 pm 文章主題: |
|
|
應用程式的快速開發
無論採用何種程式撰寫方法,總是需要一種策略使得開發主從架構應用程式快速而有效。由於 Visual FoxPro 可以快速地原型化和建立應用程式,因此可以首先為應用程式建立一個本地電腦原型,然後再上移到遠端資料來源上,分階段予以製作。如果想在發展程序中就可以存取遠端資料來源,那麼可以考慮使用遠端資料集存取遠端資料來為應用程式建立原型。
使用資料集產生原型
開發 Visual FoxPro 主從架構應用程式的第一步就是建立一個原型。透過以模組模式原型化應用程式,可以在發展程序中儘早發現應用程式應該修改和增強的方面。使用這種方法,可以只用少量的資料仔細調整程式,從而避免了處理遠端資料集時與其複雜規則互動的麻煩。相關詳細資訊請參考「上移 Visual FoxPro 資料庫」。
使用本地資料集建立一個本地電腦資料原型
主從架構應用程式的本地電腦原型也就是一個有效的使用本地資料集存取本地電腦資料表格的 Visual FoxPro 應用程式。由於最終的主從架構應用程式將使用遠端資料集存取遠端資料,因此可在應用程式原型中也使用資料集。使用本地資料集對應用程式原型化,便朝最終的應用程式前進了一步。
在開發階段無法總是存取遠端資料的時候,或者不想使用遠端資料來為應用程式設計原型的時候,產生一個本地電腦原型是一種更實際的辦法。本地資料集存取本地電腦 Visual FoxPro 資料表格,而不是遠端資料來源資料表格。不過,您可以比照伺服器上的資料結構來建立本地電腦資料。使用本地電腦資料替代遠端資料是一種速成開發和測試應用程式基本設計方案的理想方法。 可以限制選入資料集的資料量來加快發展程序。相關詳細資訊請參考「處理資料集」。
準備上移
所謂上移就是使用與原來的 Visual FoxPro 資料庫相同的資料表格的資料結構、資料和內在的許多其他屬性,在遠端伺服器上建立一個新的資料庫。利用上移可以把現有的 Visual FoxPro 應用程式轉變為一個主從架構應用程式。相關詳細資訊請參考「上移 Visual FoxPro 資料庫」。
如果設計的應用程式準備在以後上移,那麼在設計應用程式的結構和程式撰寫模型時就需要仔細籌畫,為如何發揮遠端資料來源的最佳效率做考慮。相關詳細資訊請參考「主從架構高效率的設計」。
使用遠端資料集進行原型化
在開發主從架構應用程式的時候,如果能夠存取一個遠端資料來源並且希望直接使用遠端資料,可以使用遠端資料集進行原型化。當使用遠端資料集來產生原型時,便可略過上移這個步驟,因為資料已經存放在遠端伺服器上,並且已經可以使用遠端資料集存取這些資料。
製作主從架構應用程式
透過分階段地製作原型化的應用程式,可以簡化對應用程式的測試和除錯工作。在實作一個原型化的應用程式程序當中,可以分階段、有系統地加入多人使用功能,並把資料轉移到遠端資料來源,然後逐個模組地測試和除錯應用程式。
在製作應用程式時,可以借助 SQL pass-through 使用當地伺服器語法,存取伺服器的特有功能,比如,遠端伺服器上的儲存式程序等。相關詳細資訊請參考「使用 SQL pass-through 技術加強應用程式」。
最佳化應用程式
如果針對遠端資料動作的程式實作完成,並且已經經過了測試和除錯階段,那麼就可以開始考慮如何對整個應用程式的速度和效率進行最佳化。相關詳細資訊請參考「最佳化主從架構效能」。
相關資訊
應用程式架構
選定正確的方法
確保應用程式建立的準確性和資料的完整性
規劃主從架構應用程式
上移 Visual FoxPro 資料庫
在最佳平台上放置資料
----------------------------------------------------------------------------------------------
原文:
Rapid Application Development
Regardless of the programming method you choose, you need a good strategy to make developing client/server applications quick and efficient. Because Visual FoxPro makes it easy to quickly prototype and build applications, you can choose to design and build a local prototype of your application and then upsize and implement it in stages against a remote data source. If you have access to a remote data source during the development process, you might choose to prototype your application against the remote data source, using remote views.
Building a Prototype with Views
The first step in developing a Visual FoxPro client/server application can be to build a prototype. By prototyping your application, perhaps module by module, you discover changes and enhancements to your application's design early in the development process. You can then fine-tune your design efficiently against small sample data stores before adding the additional layer of complexity inherent in working with large sets of remote, heterogeneous data. For more information, see Upsizing Visual FoxPro Databases.
Creating a Local Prototype with Local Views
A local prototype for a client/server application is a functioning Visual FoxPro application that uses local views to access local tables. You use views in your client/server prototype because the final client/server application will use remote views to access remote data. By prototyping your application with local views, you're one step closer to the final application.
Building a local prototype is especially practical if you don't have constant access to a remote data source during development, or if you don't want to use remote data to prototype your application. Local views access local Visual FoxPro tables, rather than remote data source tables. You create the local data, however, to mimic the structure of the data on the server. Using local data to represent remote data is one method of quickly developing and testing your application's basic design. You can also speed development by limiting the amount of data selected into the views. For more information, see Working with Views.
Planning for Upsizing
Upsizing is the process that creates a database on the remote server with the same table structure, data, and potentially many other attributes of the original Visual FoxPro database. With upsizing, you take an existing Visual FoxPro application and migrate it to a client/server application. For more information, see Upsizing Visual FoxPro Databases.
When you build an application that you'll eventually upsize, you make choices about the design of your application's architecture and the programming model based on eliciting maximum performance against a remote data source. For more information, see Client/Server Design for High Performance.
Prototyping with Remote Views
If you have access to a remote data source and you want to use remote data directly as you develop your client/server application, you can build your prototype using remote views. When you prototype using remote views, you skip the upsizing step because your data is already located on a remote server and you already have remote views to access that data.
Implementing your Client/Server Application
You can simplify testing and debugging your application by implementing your prototyped application in stages. When you implement a prototyped application in stages, you add multiuser enhancements, move the data to the remote data source, and test and debug the application, module by module, in a systematic manner.
As you implement your application, you can use native server syntax and access server-specific functionality, such as stored procedures on a remote server, with SQL pass-through technology. For more information, see Enhancing Applications Using SQL Pass-Through Technology.
Optimizing your Application
Once your application is fully implemented against remote data and you've completed the testing and debugging phase, you can fine-tune the speed and performance of the entire application. For more information, see Optimizing Client/Server Performance.
See Also
Application Architecture
Selecting the Right Methods
Application Creation with Accuracy and Data Integrity
Planning Client/Server Applications
Upsizing Visual FoxPro Databases
Data Location on the Optimal Platform _________________ 希望有更多人來參與
VFP wiki - 需要大家一起完成的VFP電子書與FAQ |
|
回頂端 |
|
 |
朱育興
註冊時間: 2003-08-25 文章: 661 來自: 台中市大里區
第 79 樓
|
發表於: 星期二 九月 21, 2004 11:23 pm 文章主題: |
|
|
確保應用程式建立的準確性和資料的完整性
可以把 Visual FoxPro 的資料驗證規則和儲存式程序,以及資料來源的資料驗證規則和儲存式程序結合起來,使產生的主從架構應用程式能夠有效地保護資料完整性。
維護資料完整性
可以建立遠端伺服器驗證規則的本地電腦驗證規則,並為使用者提供一些訊息。例如,由於輸入的資料破壞了某類伺服器參考完整性,或者資料驗證規則,將不允許執行更新資料到後端。
在遠端或離線資料集中使用 Visual FoxPro 驗證規則
可以在遠端或離線資料集中建立欄位層級和資料記錄層級之驗證規則,在資料執行給遠端資料來源之前,就在本地電腦驗證輸入的資料。由於這些資料集驗證規則的目的在於防止送出的資料違反伺服器的資料完整性規則,由此您可能會更願意將資料來源的規則直接複製到遠端資料集的規則當中。使用 DBSETPROP( ) 函數可以為資料集建立驗證規則。
提示:
可以在遠端資料集中建立一個本地電腦驗證規則,該規則呼叫遠端伺服器儲存式程序,並且把希望驗證的值做為參數送到伺服器。但是,使用一個遠端儲存式程序會增加資料登錄時的處理時間。
使用伺服器驗證規則
可以選定伺服器上的規則來驗證資料。出現錯誤時,錯誤處理程式可以呼叫 AERROR( ) 函數來獲取訊息,包括錯誤訊息代碼、遠端錯誤訊息的文字以及該錯誤的連結控制碼等。
使用伺服器觸發式程序
雖然可以在本地電腦資料表格中建立 Visual FoxPro 觸發式程序,但在資料集中卻無法。不過可以在遠端資料來源中使用觸發式程序。伺服器觸發式程序可以用來處理第二次資料更新,比如,連鎖更新或移除。使用伺服器觸發式程序處理第二次更新比從 Visual FoxPro 應用程式向遠端伺服器執行多個命令更有效。
防止資料遺失
Visual FoxPro 和大部份遠端資料來源提供了異動交易日誌功能,用來防止資料遺失。相關詳細資訊請參考「共同存取之程式設計」。
可以為本地電腦原型和本地電腦資料處理使用 Visual FoxPro 異動交易。而伺服器異動交易可用於遠端資料的更新、插入和移除。相關詳細資訊請參考「最佳化主從架構效能」。
相關資訊
應用程式架構
應用程式的快速開發
規劃主從架構應用程式
選定正確的方法
在最佳平台上放置資料
使用 SQL pass-through 技術加強應用程式
----------------------------------------------------------------------------------------------
原文:
Application Creation with Accuracy and Data Integrity
You can combine the power of Visual FoxPro data validation rules and stored procedures with the data source's data validation rules and stored procedures to build client/server applications that protect data integrity.
Maintaining Data Integrity
You can create local versions of remote server validation rules to provide friendly messages to the user; for example, provide messages about updates that would not be allowed when sent to the remote server because the data entered had violated some server relational integrity or data validation rule.
Using Visual FoxPro Rules on a Remote or Offline View
You can create field- and record-level rules on remote and offline views to validate data entered locally before the data is sent to the remote data source. Because the purpose of these view rules is to prevent sending data to the data source that will be rejected by the server's data integrity rules, you want to replicate the data source's rules in the rules you create for your remote view. You use the DBSETPROP( ) function to create rules for views.
Tip:
You can create a local validation rule on a remote view that calls a stored procedure on a remote server and sends the value you want to validate to the server as a parameter. However, using a stored procedure on a remote adds to processing time during data entry.
Using Server Rules
You can choose to rely on the rules established on the server for data validation. If an error occurs, your error handling routine can call the AERROR( ) function to obtain information, including the error message number, the text of the remote error message, and the connection handle associated with the error.
Using Server Triggers
Though you can create Visual FoxPro triggers on local tables, you can't create them on views. You can, however, use triggers on the remote data source. Server triggers can be used to process secondary data updates, such as cascading updates or deletes. Using server triggers to process secondary updates is more efficient than sending multiple commands to the remote server from your Visual FoxPro application.
Protecting Against Data Loss
Both Visual FoxPro and most remote data sources provide transaction-logging capabilities to protect against data loss. For more information, see Programming for Shared Access.
You can use Visual FoxPro transactions for local prototypes and for processing local data. Use server transactions for remote data updates, inserts, and deletes. For more information, see Optimizing Client/Server Performance.
See Also
Application Architecture
Rapid Application Development
Planning Client/Server Applications
Selecting the Right Methods
Data Location on the Optimal Platform
Enhancing Applications Using SQL Pass-Through Technology _________________ 希望有更多人來參與
VFP wiki - 需要大家一起完成的VFP電子書與FAQ |
|
回頂端 |
|
 |
朱育興
註冊時間: 2003-08-25 文章: 661 來自: 台中市大里區
第 80 樓
|
發表於: 星期四 九月 23, 2004 5:49 am 文章主題: |
|
|
規劃企業應用程式
用 Visual FoxPro 建立的許多應用程式都能滿足某一特定的商業需求。例如,可以建立一個 Visual FoxPro 應用程式來對自己的顧客進行追蹤,您不僅能在程式中可以包含顧客的資料庫訊息,而且能包括管理定單、發票等的實用工具。使用 Visual FoxPro 內既存的特性,包括資料庫引擎、視覺化設計工具和報表功能,您很容易滿足自己應用程式的需要。
在使用兩個以上開發工具所建立的大型應用程式中,Visual FoxPro 仍可以發揮作用。在我們稱之為“企業開發”的程序中,Visual FoxPro 允許您發揮每個產品特有功能的最大限度。企業開發可能很簡單,簡單的如同在 Visual FoxPro 中維護一個顧客資料庫、在 Microsoft Word 中建立一個郵遞信件一樣;也可能很複雜,如使用主從架構資料庫、自動化伺服應用程式、電子郵件等等。
由於具有以下的特性,在企業範圍內解決商業問題時,Visual FoxPro 確實是一個理想的工具:
•強大易用的應用程式開發工具,包括表單設計工具和眾多精靈。
•一個快速的資料庫引擎。
•和其他產品之間 (包括像 Microsoft Excel 和 Word 這樣的 Windows 程式以及 Microsoft SQL Server 這樣的主從架構系統) 優異的連結效能。
•彙整來源控制項系統和其他開發工具。
在整個企業範圍內開發應用程式時,Visual FoxPro 利用這些特性發揮不同的作用。 您可以使用 Visual FoxPro 來:
•Visual FoxPro 作為其他應用程式的前端。在這種情況下,您主要在 Visual FoxPro 環境下工作。例如,可以先在 Visual FoxPro 下建立應用程式的使用者界面,而所需資料和某些對資料的動作 (這些動作通常增強了 Visual FoxPro 的功能) 由其他應用程式管理。當然,對 Visual FoxPro 中的資料可以上移,也可以將資料轉移到其他平臺下。
•作為其他應用程式的資料來源。要作到這點,需要使用其他程式建立自己的使用者界面,然後在需要時存取 Visual FoxPro 的資料。
使用 Visual FoxPro 的選取方案主要依賴於建立應用程式的目的以及想要使用什麼樣的程式。
相關資訊
應用程式架構
Visual FoxPro 作為應用程式的前端
Visual FoxPro 作為應用程式的後端
物件導向程式設計
存取 Visual FoxPro API
如何:建立自動化伺服應用程式
----------------------------------------------------------------------------------------------
原文:
Planning Enterprise Applications
Many applications that you create with Visual FoxPro are self-contained solutions to a specific business requirement. For example, you might create a Visual FoxPro application to track your customers, which can include not only database information about the customers, but tools for taking orders, invoicing, and so on. You can create all the features your application needs using the facilities already available in Visual FoxPro, including its database engine, visual design tools, and reporting capabilities.
You can also use Visual FoxPro as part of a larger-scale application that involves two or more development tools. Using Visual FoxPro this way — referred to as "enterprise development" — allows you to take advantage of the unique capabilities of each product. Enterprise development can be as simple as maintaining a customer database in Visual FoxPro and creating a mail merge letter in Microsoft Word, or it can involve creating a complex application using client/server databases, Automation servers, electronic mail, and more.
Visual FoxPro is an ideal tool for creating enterprise-wide business solutions because it features:
•Powerful, easy-to-use application development tools, including a Form Designer and wizards.
•A fast database engine.
•Excellent connectivity with other products, including both other Windows programs such as Microsoft Excel and Word, and client/server systems such as Microsoft SQL Server.
•Integrated source control and other team development tools.
These features allow you to develop with Visual FoxPro in several roles in an enterprise-wide application. You can use Visual FoxPro:
•As a front end for other applications. In this scenario, you work primarily with Visual FoxPro; for example, you create the user interface for the application in Visual FoxPro. You then access other applications that contain data needed for the application or that can provide services that enhance those already available in Visual FoxPro. You can also upsize your Visual FoxPro data or move it to another platform.
•As a data source for other applications. To do so, you would create the user interface for the application using another program, and then access Visual FoxPro data as needed.
The strategy you choose depends on what your application goals are and what programs you want to use.
See Also
Application Architecture
Visual FoxPro as an Application Front End
Visual FoxPro as an Application Back End
Object-Oriented Programming
Accessing the Visual FoxPro API
How to: Create Automation Servers _________________ 希望有更多人來參與
VFP wiki - 需要大家一起完成的VFP電子書與FAQ |
|
回頂端 |
|
 |
朱育興
註冊時間: 2003-08-25 文章: 661 來自: 台中市大里區
第 81 樓
|
發表於: 星期五 九月 24, 2004 12:14 am 文章主題: |
|
|
安全性規劃
安全性是應用程式設計者和程式開發人員所最關心的。儲存敏感資料的應用程式需要防止惡意攻擊和正在嘗試偷取資料或智慧財產的競爭對手。當為您的應用程式設計一個安全模型時,您必須知道來自一種商業觀點和一個被選擇的安全模型能在效能、可測量性和部署上有的含意的安全需求。
有關軟體開發的安全性規劃的一般內容,請瀏覽在 http://www.microsoft.com/security/ 有關安全性的 Microsoft 網站。
在本章節中
安全性考量 (Visual FoxPro)
描述當設計一個伺服器應用程式時,您應該知道的一般安全性問題。
Visual FoxPro 程式開發人員的安全性風險
描述在 Visual FoxPro 中的特定安全性問題以及如何避免。
相關章節
應用程式規劃
討論認真細緻的應用程式規劃的好處和提供連結給應用程式設計、團隊專案和國際化考量上的資訊。
在 Visual FoxPro 中的程式設計
提供連結給物件導向程式設計技術和事件導向模型使您的程式設計生產力放到最大上的資訊。
----------------------------------------------------------------------------------------------
原文:
Security Planning
Security is a major concern for both application architects and developers. Applications that store sensitive information need to be protected from malicious attacks and from competitors attempting to steal information or intellectual property. When designing a security model for your application, you must be aware of security requirements from a business perspective and the implications that a chosen security model can have on performance, scalability, and deployment.
For general information about security planning for software development, visit the Microsoft Web site about security at http://www.microsoft.com/security/.
In This Section
Security Considerations (Visual FoxPro)
Describes general security issues you should be aware of when designing a server application.
Security Risks for Visual FoxPro Developers
Describes specific security issues in Visual FoxPro and how you can avoid them.
Related Sections
Application Planning
Discusses the benefits of careful application planning and provides links to information on application design, team projects, and international considerations.
Programming in Visual FoxPro
Provides links to information on object-oriented programming techniques and the event-driven model to maximize your programming productivity. _________________ 希望有更多人來參與
VFP wiki - 需要大家一起完成的VFP電子書與FAQ |
|
回頂端 |
|
 |
朱育興
註冊時間: 2003-08-25 文章: 661 來自: 台中市大里區
第 82 樓
|
發表於: 星期六 九月 25, 2004 12:17 am 文章主題: |
|
|
安全性考量 (Visual FoxPro)
當設計伺服器應用程式時,您的設計規格應該要處理安全性問題。在應用程式的功能規格中應該考慮和可以處理下列各項項目:
•安全性目標
定義所需要保護的。
•安全性風險
了解應用程式的弱點。也必須了解當它們的重要性與您的生意有關時的潛在威脅。
•驗證
描述從使用者接受認證和確認那些被指定授權的認證之步驟。使用者識別或者是可能的應用程式或電腦被視為安全性主體。客戶端必須提供認證來允許伺服器驗證主體識別。在識別已知後,應用程式可以授權主體來存取系統上的資源。
•授權
描述決定是否已證明的識別被允許存取特定資源的步驟。
•設定資料傳輸的安全性
確定當資料在傳送當中,當它透過使用加密越過網路時不會被檢視或竄改。您必須考慮資料在傳送中所需要的安全性等級。
•模擬
使伺服器可以處理執行使用客戶端的安全性憑證。當伺服器模擬客戶端時,透過伺服器使用客戶端的認證執行任何的操作。模擬不允許伺服器代表客戶端存取遠端資源而且需要委派。
•委派
使伺服器可以處理執行使用客戶端的安全性憑證,類似於模擬。然而,當作客戶端用時,委派功能更強大並且使伺服器可以處理對其他電腦的呼叫。
•作業系統安全性
指向適當的存取控制清單 (ACLs) 和網路安全性的建立以防止侵入者存取安全的資源。您必須在適當的資源上設定合適的 ACLs,允許只有透過相關主體來存取。
•設定實體存取的安全性
在一個安全室中指向儲存的伺服器電腦。您應該要注意這基本問題。
•程式碼存取安全性
准許程式碼依其出處和程式碼識別的其他方面所信任的各種程度。您應該知道如何建立您自己的存取權限。
相關資訊
安全性規劃
Visual FoxPro 程式開發人員的安全性風險
----------------------------------------------------------------------------------------------
原文:
Security Considerations (Visual FoxPro)
When designing a server application, your design specification should address security issues. You should consider and can address the following items in the application's functional specification:
•Security goals
Define what you need to protect.
•Security risks
Understand the vulnerabilities of your application. You must also understand the significance of potential threats as they relate to your business.
•Authentication
Describes the process of accepting credentials from a user and validating those credentials against a designated authority. The identity of the user, or possibly an application or computer, is referred to as a security principal. The client must provide credentials to allow the server to verify the identity of the principal. After the identity is known, the application can authorize the principal to access resources on the system.
•Authorization
Describes the process of determining whether the proven identity is allowed to access a specific resource.
•Securing data transmission
Ensure that data cannot be viewed or tampered with while in transit by using encrypting when it crosses the network. You must consider the level of security that you data needs while in transit.
•Impersonation
Enables a server process to run using the security credentials of the client. When the server is impersonates the client, any operations performed by the server use the client's credentials. Impersonation does not allow the server to access remote resources on behalf of the client and requires delegation.
•Delegation
Enables a server process to run using the security credentials of the client, similar to impersonation. However, delegation is more powerful and enables the server process to make calls to other computers while acting as the client.
•Operating system security
Refers to the establishment of appropriate Access Control Lists (ACLs) and network security to prevent intruders from accessing secured resources. You must set the appropriate ACLs on the appropriate resources to allow access by only the relevant principals.
•Securing physical access
Refers to storing the server computer in a secure room. You should not overlook this fundamental issue.
•Code access security
Enables code to be trusted to varying degrees depending on where it originates and other aspects of the code's identity. You should be aware of how to create your own access permissions.
See Also
Security Planning
Security Risks for Visual FoxPro Developers _________________ 希望有更多人來參與
VFP wiki - 需要大家一起完成的VFP電子書與FAQ |
|
回頂端 |
|
 |
朱育興
註冊時間: 2003-08-25 文章: 661 來自: 台中市大里區
第 83 樓
|
發表於: 星期六 九月 25, 2004 9:43 pm 文章主題: |
|
|
Visual FoxPro 程式開發人員的安全性風險
當開發和部署應用程式時,了解安全性問題是很重要的。有關開發安全的應用程式的一般內容,請參閱在 http://msdn.microsoft.com/security 的 Microsoft 網站。
當開發 Visual FoxPro 應用程式時,程式開發人員需要知道下列的特定安全性問題和最佳作法:
•在評估它們之前使參數輸入值有效。 當傳遞使用者所輸入的值作為 SQL 陳述的指令參數時,您應該包括檢查那些值未包含有害的運算式的程式碼,例如那些會導致存取違規的運算式。 儘可能避免使用簡單的文字方塊作為參數輸入,而是選擇像列示方塊、如列示方塊的多筆編輯控制項或選項按鈕組控制項這樣可易於控制的使用者界面元素。如果您必須依賴像參數輸入之鍵入的使用者輸入,例如執行指令,您必須剖析括號 (()) 字元的輸入。這確定使用者不會輸入被 Visual FoxPro 當作運算式解譯的輸入。您也應該為被當作一個巨集替換字元使用的連字號字元 (&) 檢查輸入。
警告:
當接受的時候,審慎使用像參數之鍵入的使用者輸入並傳遞給下列各項語言元素:RUN 或 ! 命令、EVALUATE( ) 函數、EXECSCRIPT( ) 函數、_VFP.DoCmd 方法程序、_VFP.Eval 方法程序和連字號字元 (&)。此作法僅建議給進階的程式開發人員使用強式參數驗證常式剖析可能導致損壞到應用程式、使用者電腦或網路的值。
•當提供的值給 SQL SELECT 陳述時,提供比較少的彈性給使用者。 當使用接受由 SQL SELECT 陳述的使用者輸入值的 COM 伺服器或 SQ Server 方法程序時,撰寫程式碼應避免給予使用者存取應該受到保護的資料,例如電腦名稱;或執行非預期的動作,例如允許使用者覆蓋資料表格和資料庫。
•設定資料庫 (DBC) 檔案系統屬性為唯讀存取。 如果 DBC 被設定為讀寫存取,使用者可以修改 DBC 事件的程式碼,例如 DBC_BeforeOpenTables 事件,可包括損壞性的程式碼,舉例來說,當開啟 DBC 中的資料表格時格式化使用者的硬碟。 如果 DBC 需要作為維護的一部分來修改時,網路管理員可以暫時設定 DBC 為讀寫存取,等維護完成時再重設它為唯讀存取。
•防止使用者透過加密應用程式和移除除錯資訊在應用程式中檢視原始程式碼。 若要保護原始程式碼和移除除錯資訊,請在[專案管理員]中開啟應用程式專案。若要加密未含有除錯資訊的應用程式專案,請在[專案資訊]對話方塊中,選定[加密]檢核方塊並清除[除錯資訊]檢核方塊。然後應該在[編譯連結選項]對話方塊中,選取[重新編譯所有檔案]檢核方塊以及在[專案管理員]視窗中按一下[建立]按鈕來重新建立一個專案。在應用程式的起始化部份包含 SET DEBUG 命令。 在 ...\Ffc\_Crypt.vcx 基本類別定義函數庫的 _cryptapi 類別提供對 Windows Crypto API 常式的存取,可以在 Visual FoxPro 應用程式中加密字串、資料或檔案。 相關詳細資訊請參考「[專案資訊]對話方塊」、「[專案管理員]視窗」、「[編譯連結選項]對話方塊」和「SET DEBUG 命令」。
•一般建議以使用最低權限的使用者設定來開發應用程式,使用者並不需要以進階使用者或管理員身份登入。
•避免寫入到 HKEY_LOCAL_MACHINE 和 HKEY_CLASSES_ROOT 登錄機碼,改為只寫到 HKEY_CURRENT_USER。
•不要在 C:\Program Files (%PROGRAMFILES%) 或 C:\Windows (%SYSDIR%) 目錄中建立或更新檔案,應該將使用者資料改寫到使用者應用程式資料夾。可以使用在 ...\Ffc\_System.vcx 基本類別定義函數庫的 _commonfolder 類別取得使用者應用程式資料夾的位置。
•於 Visual FoxPro 中建立 COM 伺服器時,一般建議以建立 COM+ 應用程式來部署它們,可以強制 COM+ 以角色為基礎的安全性。
相關資訊
安全性規劃
安全性考量 (Visual FoxPro)
開發 Visual FoxPro 應用程式
----------------------------------------------------------------------------------------------
原文:
Security Risks for Visual FoxPro Developers
It is important to understand security issues when developing and deploying applications. For general information about developing secure applications, see the Microsoft Web site at http://msdn.microsoft.com/security.
Developers need to be aware of the following specific security issues and best practices when developing Visual FoxPro applications:
•Validate parameter input values before evaluating them. When passing user input values for parameters to commands such as SQL statements, you should include code to check that those values do not contain harmful expressions, such as those that can cause access violations. Avoid using simple text boxes for parameter input when possible and choose user interface elements you can more easily control, such as a list boxes, grids as list boxes, or OptionGroup controls. If you must rely on typed user input as parameter input, for example, to execute commands, you should always parse the input for parentheses (()) characters. This ensures that users do not enter input that might be interpreted by Visual FoxPro as an expression. You should also check input for the ampersand (&), which is used as a macro substitution character.
Caution:
Use extreme caution when accepting typed user input as parameters and passing it to the following language elements: RUN or ! command, EVALUATE( ) function, EXECSCRIPT( ) function, _VFP.DoCmd method, _VFP.Eval method, and the ampersand (&) character. This practice is recommended only for advanced developers who use strong parameter validation routines for parsing values that might cause harm to the application, the user's computer, or network.
•Provide less flexibility to users when providing values for SQL SELECT statements. When using COM server or SQL Server methods that accept user input values from a SQL SELECT statement, write code that avoids giving the user access to information that should be secured, such as the computer name, or to perform undesirable actions, such as allowing the user to copy over tables and databases.
•Set database container (DBC) file system attributes to read-only access. If a DBC is set to read/write access, users can modify code for DBC Events, such as the DBC_BeforeOpenTables event, to include damaging code, for example, to format a user's hard drive when opening a table in the DBC. If the DBC needs to be modified as part of maintenance, a network administrator can temporarily set the DBC with read/write access and then reset it to read-only access when maintenance is finished.
•Prevent users from viewing source code in your application by encrypting your application and remove debugging information. To protect source code and remove debugging information, open your application project in the Project Manager. To encrypt your application project and not include debugging information, select the Encrypted check box and clear the Debug info check box in the Project Information dialog box. You should then select the Recompile All Files check box in the Build Options dialog box and rebuild your project by clicking Build in the Project Manager window. In the setup section of your application, include the SET DEBUG command. The _cryptapi class located in the ...\Ffc\_Crypt.vcx foundation class library provides access to the Windows Crypto API routines so you can encrypt strings, data, or files in your Visual FoxPro Applications. For more information, see Project Information Dialog Box, Project Manager Window, Build Options Dialog Box, and SET DEBUG Command.
•It is recommended that you develop applications that use least privilege user settings. It is not necessary for the user to log in as a power user or administrator.
•Avoid writing to the registry keys, HKEY_LOCAL_MACHINE and HKEY_CLASSES_ROOT. Instead, write only to the HKEY_CURRENT_USER hive.
•Do not create or update files in the C:\Program Files (%PROGRAMFILES%) or C:\Windows (%SYSDIR%) directories. Instead, you should write user data to the user application folder. You can use the _commonfolder class located in the ...\Ffc\_System.vcx foundation class library to obtain the location of the user application folder.
•When creating COM Servers in Visual FoxPro, it is recommended that you create COM+ applications to deploy them so you can enforce COM+ role-based security.
See Also
Security Planning
Security Considerations (Visual FoxPro)
Developing Visual FoxPro Applications _________________ 希望有更多人來參與
VFP wiki - 需要大家一起完成的VFP電子書與FAQ |
|
回頂端 |
|
 |
朱育興
註冊時間: 2003-08-25 文章: 661 來自: 台中市大里區
第 84 樓
|
發表於: 星期日 九月 26, 2004 10:05 pm 文章主題: |
|
|
團隊開發專案計畫
把一組具有技術能力的開發者結合在一起,可以快速建立出複雜的應用程式。但是,要想保證團隊開發工作的順利進行,還需要一些特殊的協調。其中有一種策略就是使用版本管理軟體來管理專案中的檔案,例如 Microsoft Visual SourceSafe。
下面各節將提供一些策略,根據這些策略您可以成功地進行團隊開發。在此之前假設您已經熟悉其他章節所介紹的建立 Visual FoxPro 應用程式的程序。
在本章節中
團隊開發的基本概念 (Visual FoxPro)
描述該如何透過團隊開發,您可以更快地建立應用程式,並且開發更複雜的應用程式。
版本管理功能
說明 Visual FoxPro 提供許多支援團隊開發的功能,團隊開發的一個重要的特性是使用版本管理系統來協調那些可以存取專案中檔案的開發者。
在版本管理系統下管理 Visual FoxPro 專案
說明在 Visual FoxPro 中使用版本管理軟體的過程,包括將專案置於版本管理之下、向您的版本管理專案中新增檔案以及更新每個專案的專案清單。
在版本管理專案中管理檔案
說明當您將一個 Visual FoxPro 專案置於版本管理之中以後,您既可以處理單一的檔案,也可以處理整個專案。
團隊開發和修改資料庫
建議除了團隊處理專案和專案檔,您的小組必須還能共用資料庫中的資訊。
團隊開發類別定義函數庫
因為類別定義函數庫 (.vcx 檔案) 是 Visual FoxPro 應用程式的關鍵部份,描述如何當建立它們時,小組必須能協調開發。
相關章節
開發 Visual FoxPro 應用程式
包括關於該如何發展 Visual FoxPro 應用程式的概念性資訊、建立資料庫和使用者界面的指令以及其他任務需要產生 Visual FoxPro 應用程式。
應用程式規劃
說明該如何認真細緻的規劃可以節省時間、精力和資金以及在規劃階段期間所做的決定往往會影響您如何建立應用程式。
設計考量
討論如何在開發之前所做的設計方案往往會影響你如何建立應用程式。
應用程式架構
描述 Visual FoxPro 應用程式架構如何因您決定建立的應用程式的類型而改變。
安全性考量 (Visual FoxPro)
說明您必須如何知道來自一種商業觀點和一個被選擇的安全模型能在效能、可測量性和部署上有的含意的安全需求。
安全性考量 (Visual FoxPro)
顯示你應該如何知道來自一種商業觀點和一個被選擇的安全模型能在效能、可測量性和部署上有的含意的安全需求。
開發國際化應用程式
顯示該如何設計 Visual FoxPro 應用程式使其國際性地如同合乎國內式地有效的使用 Visual FoxPro 的國際化功能。
----------------------------------------------------------------------------------------------
原文:
Planning for Team Development Projects
You can create complex applications quickly by combining the skills of a team of developers. However, team development requires some extra coordination to keep the development effort working smoothly. One strategy is to use source control software, such as Microsoft Visual SourceSafe, to manage the files in a project.
The following topics provide strategies that you can follow to make team development successful. They assume that you're already familiar with creating a Visual FoxPro application, as discussed in other sections.
In This Section
Team Development Concepts (Visual FoxPro)
Describes how you can create applications faster and develop more complex applications by working with a team of developers.
Source Control Features
Explains that Visual FoxPro provides a number of features that support team development, a significant feature of which is the use of a source code control system to coordinate access to files in a project.
Managing Visual FoxPro Projects Under Source Control
Explains the process for using source control software in Visual FoxPro, including that you put projects under source control, add files to your source-controlled projects, and update the project list for each project.
Managing Files in a Source-Controlled Project
Says that after you have put a Visual FoxPro project under source control, you can work with individual files or manage the project as a whole.
Developing and Modifying Databases in Teams
Suggests that in addition to working together with projects and project files, your team must be able to share information in databases.
Developing Class Libraries in Teams
Describes how, because class libraries (.vcx files) are a crucial part of most Visual FoxPro applications, teams must be able to coordinate development efforts when creating them.
Related Sections
Developing Visual FoxPro Applications
Includes conceptual information about how to develop Visual FoxPro applications, instructions for creating databases and the user interface, and other tasks needed to create Visual FoxPro applications.
Application Planning
Explains how careful planning saves time, effort, and money and many of the decisions you make during the planning phase will impact how you create elements of the application.
Design Considerations
Discusses how the design decisions you make will impact how you create your application.
Application Architecture
Describes how Visual FoxPro application architecture varies with the type of application you decide to create.
Security Considerations (Visual FoxPro)
Explains how you need to be aware of security requirements from a business perspective and the implications that a chosen security model can have on performance, scalability, and deployment.
Security Considerations (Visual FoxPro)
Shows how you should be aware of security requirements from a business perspective and the implications that a chosen security model can have on performance, scalability, and deployment.
Developing International Applications
Shows how to design Visual FoxPro applications so they are as effective internationally as domestically using the international features of Visual FoxPro. _________________ 希望有更多人來參與
VFP wiki - 需要大家一起完成的VFP電子書與FAQ |
|
回頂端 |
|
 |
朱育興
註冊時間: 2003-08-25 文章: 661 來自: 台中市大里區
第 85 樓
|
發表於: 星期二 九月 28, 2004 1:20 am 文章主題: |
|
|
團隊開發的基本概念 (Visual FoxPro)
透過團隊開發,您可以更快地建立應用程式,並且可以開發更複雜的應用程式。對於很難或不可能由單一開發者建立的應用程式,您可以融合不同開發者的技術。
但是,在團隊開發過程中需要特別的注意。成功的團隊開發依賴予以下幾點︰
•允許幾個開發者同時處理相同的專案和資料庫。
•對於相同的程式、表單或其他應用程式元件,要協調對它們的變更,這樣一個開發者所作的變更不會覆蓋另一個開發者所作的變更。
•允許開發者加強既存的應用程式元件的功能 (例如,程式或類別定義函數庫),同時還不影響目前正在使用這些元件的其他開發者。
例如,您的小組正在開發一個複雜的應用程式。因為應用程式很大,Visual FoxPro 必須保證幾個開發者能同時處理應用程式的不同部份。但是您還想保證一次只有一個開發者處理某個單獨的元件,例如表單,這樣一個開發者就不會覆蓋另一個開發者所作的變更。
另外,您想讓開發者能為一個表單撰寫程式碼,測試和除錯,同時不影響其他繼續使用該表單舊版本的開發者 (和使用者)。 當第一個開發者完成了新的表單時,增強的功能才可以彙整到應用程式中。
在協調多個開發者時您可以採用本章節建議的方法。例如,本章節將介紹在多開發者環境中如何處理專案和類別定義函數庫。
相關資訊
團隊開發專案計畫
版本管理功能
在版本管理系統下管理 Visual FoxPro 專案
在版本管理專案中管理檔案
團隊開發和修改資料庫
----------------------------------------------------------------------------------------------
原文:
Team Development Concepts (Visual FoxPro)
By working with a team of developers, you can create applications faster, and can develop more complex applications. You can blend the skills of different developers to create applications that would be difficult or impossible for a single developer to create.
However, team development requires extra effort in the development process. Successful team development depends on:
•Allowing several developers to work with the same projects and databases at the same time.
•Coordinating the changes that are made to the same programs, forms, or other application elements, so that one developer's changes don't overwrite those of another developer.
•Allowing developers to enhance existing application elements (for example, programs or class libraries) without affecting the work of other developers who are currently using these elements.
For example, imagine that your team is developing a complex application. Because the application is large, Visual FoxPro must allow several developers to be working at once on different components of the application. However, you want to be sure that only one developer at a time works on an individual element, such as a form, so that one developer doesn't overwrite the changes made by another developer.
Furthermore, you want that developer to be able to code, test, and debug a form without affecting the other developers (and users) who continue working with an earlier version of the form. When the first developer is finished with the new form, the enhancements can then be integrated into the application.
You can follow the methods recommended in this section for coordinating the work of multiple developers. For example, this section provides information on how you can work with projects and class libraries in a multi-developer environment.
See Also
Planning for Team Development Projects
Source Control Features
Managing Visual FoxPro Projects Under Source Control
Managing Files in a Source-Controlled Project
Developing and Modifying Databases in Teams _________________ 希望有更多人來參與
VFP wiki - 需要大家一起完成的VFP電子書與FAQ |
|
回頂端 |
|
 |
朱育興
註冊時間: 2003-08-25 文章: 661 來自: 台中市大里區
第 86 樓
|
發表於: 星期二 九月 28, 2004 10:32 pm 文章主題: |
|
|
版本管理功能
Visual FoxPro 提供了很多支援團隊開發的功能。團隊開發的一個重要的特性是使用版本管理系統來協調那些可以存取和修改專案中檔案的開發者。
“版本管理”是所有管理多人開發環境的工具統稱。大多數版本管理工具類似於傳統的公用函數庫,它維護檔案的中心倉庫 (文件、程式或其他任何檔案) 所有開發者都可以存取它。另外,版本管理工具還具有追蹤開發者對檔案所作變更的能力,在必要時還可以將檔案回復到以前的版本。
一般地講,版本管理工具具有下面部份或全部的特性︰
•簽出、簽入
開發者在修改一個檔案之前,將其備份從中心倉庫下載到本地電腦上,這稱為簽出。當一個檔案被簽出時,其他開發者無法再簽出或修改它,但是通常他們可以同時檢視它,或者得到該檔案的唯讀備份 (如果是文字檔,例如程式的原始程式碼,多個開發者就可以簽出同一個檔案,然後合併他們對本地電腦備份所作的變更)。當開發者處理完一個檔案時,他們可以簽入他們的變更,這需要將他們的本地電腦備份上載到中心倉庫。 作為檔案簽入程序的一部份,大多數版本管理工具會提醒開發者輸入對檔案所作修改的說明。
•合併
為了允許多個開發者同時處理同一個檔案,版本管理軟體允許多個使用者同時簽出這個檔案 (通常,只有對文字檔才可以這樣做,例如,程式原始程式碼)。如果另一個開發者已經變更了這個檔案,版本管理系統可以將這些變更反應到您的版本中。
•專案控制
開發者可以在專案或其他儲存特定工作的目錄中組織檔案。如果有必要,檔案可以經常在專案之間共用。
•變更追蹤
在簽入檔案時,大多數版本管理系統都追蹤對檔案所作的變更。這樣開發者就可以更新檔案以前的版本,這有利於回復以前的工作。
•版本比較
版本管理軟體允許開發者比較一個檔案的不同版本,並且檢視它們之間的區別。
•歷程記錄
開發者可以驗證每個檔案的簽入歷程記錄,包括每個開發者在簽入檔案時所作的說明。
提示:
如果您的版本管理軟體提供輔助說明功能,就需要充分利用它。輔助說明對於追蹤變更有極大地幫助,並提供應用程式開發的歷程記錄。
要想使用版本管理系統,使用者必須加入一個版本管理的專案 (有時稱為在專案中登記註冊)。當使用者已經加入一個專案之後,他們就可以簽出和簽入屬於這個專案的檔案。
注意:
必須設定版本管理系統的相對應選項,才能使同一檔案被多次簽出,以便同一專案的多個開發者同步工作。有關的詳細內容,請參閱相關的版本管理軟體的文件。
相關資訊
團隊開發的基本概念 (Visual FoxPro)
在 Visual FoxPro 中的版本管理軟體
如何:啟用版本管理系統
在版本管理系統下管理 Visual FoxPro 專案
團隊開發專案計畫
----------------------------------------------------------------------------------------------
原文:
Source Control Features
Visual FoxPro provides a number of features that support team development. A significant feature of team development is the use of a source code control system to coordinate who can access and modify files in a project.
Source control is the generic term for tools that manage files in a multi-developer environment. Most source control tools work something like a traditional public library, maintaining a central repository of files — documents, programs, or any other files — in a location accessible to all developers. In addition, source control tools include the ability to track the changes that developers make to files and revert to earlier versions if necessary.
Generally speaking, source control tools provide some or all of these features:
•Check out, check in
Developers check out a file by downloading a copy from the central repository to their local computer before modifying it. As a rule, while a file is checked out, other developers cannot check it out or modify it, but they can usually view it by synchronizing, or getting a read-only copy of it. (If the file is a text file, such as program source code, it's possible for several developers to check out the same file, and then merge others' changes with their local copy.) When developers are done with a file, they can check in their changes by checking in, or uploading, their local copy to the central repository. As part of the file check-in process, most source control tools prompt the developer to enter any comments about changes made to the file.
•Merging
To allow several developers to work concurrently on the same file, source control software allows multiple developers to check out the file at the same time. (This can usually be done only with text files such as program source code.) If another developer has changed the file, the source control system can integrate those changes into your version of the file.
•Project control
Developers can organize files into projects or other work-specific categories. Files can often be shared between projects if necessary.
•Change tracking
Most source control systems keep track of the changes made in a file when it's checked in. This allows developers to reconstruct earlier versions of the file, which is useful for recovering earlier work.
•Difference checking
Source control software allows developers to compare versions of a file and review the differences between them.
•History
Developers can examine the check-in history for each file, including the comments made by each developer when checking in the file.
Tip:
If your source control software supports comments, take advantage of it. Comments can greatly aid in the process of tracking changes and provide a useful history of application development.
To use source code control, users must join a source-controlled project (sometimes referred to as "enlisting" in a project). When users have joined a project, they can check out and check in the files that belong to that project.
Note:
You must enable your source control system's option to check out the same file multiple times in order for several developers to work in a project concurrently. For details, refer to the documentation for your source code control software.
See Also
Team Development Concepts (Visual FoxPro)
Source Control Software in Visual FoxPro
How to: Enable Source Control
Managing Visual FoxPro Projects Under Source Control
Planning for Team Development Projects _________________ 希望有更多人來參與
VFP wiki - 需要大家一起完成的VFP電子書與FAQ |
|
回頂端 |
|
 |
朱育興
註冊時間: 2003-08-25 文章: 661 來自: 台中市大里區
第 87 樓
|
發表於: 星期三 九月 29, 2004 9:57 pm 文章主題: |
|
|
在 Visual FoxPro 中的版本管理軟體
團隊開發的一個關鍵問題是控制誰可以變更檔案。例如,檔案不受控制,並且多個開發者同時變更一個程式,則很有可能有些變更會被覆蓋或被丟棄,這樣就浪費了時間和精力。
Visual FoxPro 允許您將版本管理系統彙整到 Visual FoxPro 專案管理員中,幫助您的小組在專案中管理檔案。透過這種模式,您可以在團隊開發環境中管理專案檔,並且能確保開發工作的順利進行。
彙整版本管理系統和 Visual FoxPro 專案
Visual FoxPro 支援多種版本管理工具,允許您將商用的版本管理軟體直接彙整到您的專案中。Visual FoxPro 支援多種版本的管理系統。(請與各軟體經銷商聯繫,檢視他的軟體能否彙整到 Microsoft 開發工具中。)如果您的開發小組已經使用了 Microsoft Visual SourceSafe,您可以使用它作為 Visual FoxPro 中的版本管理軟體。
注意:
如果把一個專案加入到 Visual SourceSafe,為了正確對應到專案,包含在專案中的所有檔案必須是在專案目錄或路徑中。
Visual FoxPro 中所有的版本管理都透過專案管理員來管理。當您在 Visual FoxPro 中建立一個專案時,您可以選取建立一個相對的版本管理專案,也就是指“將該專案置於版本管理之下”。在您將一個專案置於版本管理下之後,Visual FoxPro 幫助您管理版本管理專案中的檔案。當您想修改一個檔案時,例如編輯一個程式或修改一個表單時,Visual FoxPro 將提醒您簽出這個檔案。
在 Visual FoxPro 中,版本管理系統用來管理各種型態的檔案,不僅僅是 .prg 檔案,也可以是 .scx、.frx、.lbx、.mnx 和 .vcx 檔案,以及其他檔案。雖然某個檔案有可能出現在多個 Visual FoxPro 專案中,但是所有的版本管理的動作都是在一個特定專案中的檔案上進行的。
注意:
當您建立資料表格時,例如 .dbf 和 .dbc 檔案,Visual FoxPro 並不會主動提醒您將它們放在版本管理之下,但是您可以手動將它們新增到您的版本管理的專案中。
當您在專案管理員中處理一個版本管理的專案時,Visual FoxPro 在版本管理檔案的旁邊顯示圖示,來指明檔案的狀態。
下表列出[專案管理員]中與版本管理有關的各圖示。
該檔案已經由您簽出了。
該檔案已經由您以及另一個或多個開發者簽出了。
該檔案由另一個開發者簽出了。
該檔案沒有被簽出,只有在您簽出它之後才能變更它。
該檔案已經合併了。當驗證完變更之後,您就可以將該檔案簽入。
檔案已經合併了,並且存在需要解決的衝突。
Visual FoxPro 無法確定該檔案的版本管理狀態。
如果一個檔案未處於版本管理之下,則它的旁邊就不出現圖示。
相關資訊
版本管理功能
如何:啟用版本管理系統
團隊開發專案計畫
在版本管理系統下管理 Visual FoxPro 專案
團隊開發的基本概念 (Visual FoxPro)
----------------------------------------------------------------------------------------------
原文:
Source Control Software in Visual FoxPro
One of the most critical aspects of developing in teams is the ability to control who is allowed to change files. For example, if there are no controls on files, and if more than one developer is changing a program at the same time, there is a strong likelihood that one set of changes will end up being overwritten or discarded, wasting time and effort.
Visual FoxPro helps your team manage files in your projects by allowing you to integrate a source code control system into the Visual FoxPro Project Manager. By doing so, you can manage project files in a team development environment and ensure that development efforts proceed smoothly.
Integrating Source Control with Visual FoxPro Projects
Visual FoxPro supports source code control tools by allowing you to integrate commercially-available source control software directly into your projects. You can use many of the version control systems currently available. (Contact the software vendor to find out if the software can be integrated with Microsoft development tools.) For example, if your development team already uses Microsoft Visual SourceSafe, you can specify that as the source control software to use with Visual FoxPro.
Note:
If you add a project to Visual SourceSafe, for proper mapping to the project, all files contained in the project must be in the project directory or path.
All source control in Visual FoxPro is managed through the Project Manager. When you set up a project in Visual FoxPro, you have the option of creating a corresponding source code control project, which is referred to as "putting the project under source control." After you've put a project under source control, Visual FoxPro helps you manage the files in the source-controlled project. When you want to modify a file — for example, if you edit a program or modify a form — Visual FoxPro prompts you to check out that file.
In Visual FoxPro, source control is used to manage files of all types, not just .prg files, but .scx, .frx, .lbx, .mnx, and .vcx files, and others as well. Although individual files can be shared between different Visual FoxPro projects, all source control operations are conducted on files within the context of a particular project.
Note:
Visual FoxPro doesn't prompt you to put data tables such as .dbf and .dbc files under source control when you create them, but you can add them manually to your source-controlled project.
When you work in the Project Manager with a project that's under source control, Visual FoxPro displays icons next to files that are under source control to indicate their status.
The following table summarizes the icons used in the Project Manager to indicate source control status.
The file is checked out to you.
The file is checked out to you and to one or more other developers.
The file is checked out to another developer.
The file is not checked out; you cannot change the file until you check it out.
The file has been merged. After examining the changes, you can check the file in.
The file has been merged and there are conflicts that need to be resolved.
Visual FoxPro cannot determine the source control status of the file.
If a file isn't under source control, no icon appears next to it.
See Also
Source Control Features
How to: Enable Source Control
Planning for Team Development Projects
Managing Visual FoxPro Projects Under Source Control
Team Development Concepts (Visual FoxPro) _________________ 希望有更多人來參與
VFP wiki - 需要大家一起完成的VFP電子書與FAQ |
|
回頂端 |
|
 |
朱育興
註冊時間: 2003-08-25 文章: 661 來自: 台中市大里區
第 88 樓
|
發表於: 星期四 九月 30, 2004 10:38 pm 文章主題: |
|
|
如何:啟用版本管理系統
要想啟用版本管理系統,首先請按照您的版本管理軟體內附的文件來安裝它。通常,您需要在原始程式碼所在的伺服器上安裝一個管理員版本,然後在本地電腦上安裝該產品的用戶端版本。
注意:
專案的所有開發者必須使用相同的版本管理軟體。
在安裝了版本管理軟體之後,您就可以設定選項,這樣 Visual FoxPro 就可以識別它,並且為您的專案指定預設值。
如何啟用 Visual FoxPro版本管理系統
1.從[工具] 功能表選取[選項]。
2.在[選項]對話方塊中,選取[專案]標籤。
3.在[版本管理選項]區,從[可使用的版本管理軟體]清單中選取您的版本管理程式的名稱。
4.想要讓 Visual FoxPro 提醒您將新的專案新增到版本管理系統中,可以選取[自動加入新的專案到版本管理]。
您每次啟動 Visual FoxPro 時,它都會驗證是否存在一個版本管理系統。如果有,您就可以在版本管理下新增或管理專案。
相關資訊
在 Visual FoxPro 中的版本管理軟體
在版本管理系統下管理 Visual FoxPro 專案
團隊開發專案計畫
版本管理功能
----------------------------------------------------------------------------------------------
原文:
How to: Enable Source Control
To enable source control, first install your source control program according to the documentation provided with it. Typically, you install an administrator version on a server where the source code will be maintained, and then install the client version of the product on local machines.
Note:
All developers on a project must use the same source code control software.
After installing the source control software, you can set options so that Visual FoxPro will recognize it, and to specify defaults for your projects.
To enable source control in Visual FoxPro
1.From the Tools menu, choose Options.
2.In the Options dialog box, choose the Projects tab.
3.In the Source control options area, select the name of your source control program in the Active source control provider list.
4.To have Visual FoxPro prompt you to add new projects to source control, select Automatically add new projects to source control.
Each time you start Visual FoxPro, it checks for a source control provider. If one is found, you can put or manage projects under source control.
See Also
Source Control Software in Visual FoxPro
Managing Visual FoxPro Projects Under Source Control
Planning for Team Development Projects
Source Control Features _________________ 希望有更多人來參與
VFP wiki - 需要大家一起完成的VFP電子書與FAQ |
|
回頂端 |
|
 |
朱育興
註冊時間: 2003-08-25 文章: 661 來自: 台中市大里區
第 89 樓
|
發表於: 星期五 十月 01, 2004 10:56 pm 文章主題: |
|
|
在版本管理系統下管理 Visual FoxPro 專案
要想在 Visual FoxPro 中使用版本管理軟體,請將專案置於版本管理之下,向您的版本管理專案中新增檔案,更新每個專案的專案清單。
在本章節中
處理專案檔和專案清單檔案
討論 Visual FoxPro 如何儲存一個專案清單來協調對版本管理專案所作的變更。
如何:將專案置於版本管理之下
描述該如何於版本管理之中建立一個新專案或者將一個已存在專案置於版本管理之中。
如何:向版本管理專案新增檔案
說明該如何將檔案新增於版本管理之下的專案中。
如何:連結已經存在的版本管理專案
描述該如何將一個已存在專案連結於版本管理之中。
如何:更新專案清單
說明該如何更新專案清單使得新增的檔案可供在專案清單中其他開發者使用。
如何:將一個專案從版本管理中解除
描述該如何將一個專案從版本管理中解除。
如何:從版本管理專案中移除檔案
描述該如何從版本管理下移除某些檔案,使它們不再是專案的一部份。
如何:在多個版本管理專案之間共用檔案
說明該如何建立一個檔案,使其同時是兩個或多個版本管理專案的成員。
相關章節
如何:啟用版本管理系統
描述該如何啟用 Visual FoxPro 版本管理系統。
團隊開發專案計畫
描述如何使用版本管理軟體來管理專案中的檔案,例如 Microsoft Visual SourceSafe,把一組具有技術能力的開發者結合在一起,可以快速建立出複雜的應用程式。
----------------------------------------------------------------------------------------------
原文:
Managing Visual FoxPro Projects Under Source Control
To use source control software in Visual FoxPro, you put projects under source control, add files to your source-controlled projects, and update the project list for each project.
In This Section
Working with the Project File and Project List File
Discusses how Visual FoxPro maintains a project file list to coordinate changes to a project under source control.
How to: Put Projects Under Source Control
Describes how to create a new project under source control or to put an existing project under source control.
How to: Add Files to a Source-Controlled Project
Explains how to add files to a project under source control.
How to: Join an Existing Source-Controlled Project
Describes how to join an existing project that is under source control.
How to: Update the Project List
Explains how to update the project list so that newly added files are available to other developers in the project list.
How to: Detach a Project from Source Control
Describes how to detach a project from source control.
How to: Remove Files from a Source-Controlled Project
Describes how to remove individual files from source control, so they will no longer be part of the project.
How to: Share Files Between Source-Controlled Projects
Explains how to set a file to be a member of two or more source controlled projects at the same time.
Related Sections
How to: Enable Source Control
Describes how to enable source control in Visual FoxPro.
Planning for Team Development Projects
Discusses how using source control software, such as Microsoft Visual SourceSafe, to manage the files in a project makes it possible to create complex applications quickly by combining the skills of a team of developers. _________________ 希望有更多人來參與
VFP wiki - 需要大家一起完成的VFP電子書與FAQ |
|
回頂端 |
|
 |
朱育興
註冊時間: 2003-08-25 文章: 661 來自: 台中市大里區
第 90 樓
|
發表於: 星期六 十月 02, 2004 11:35 pm 文章主題: |
|
|
處理專案檔和專案清單檔案
在 Visual FoxPro 中,專案訊息是由一組資料表格和附註檔儲存的,它們的副檔名分別是 .pjx 和 .pjt。例如,如果您建立了一個名為“Myproj”的專案,它的有關訊息,包括檔案清單、它們的位置,以及它們是否被編譯連結進應用程式檔案 (.app 或 .exe 檔案),就儲存在名為 Myproj.pjx 和 Myproj.pjt 的檔案中。
當在團隊開發環境中工作時,開發者並不共用同一個專案檔 (.pjx 和 .pjt 檔案)。而是在他們自己本地電腦維護各自的 .pjx 和 .pjt 檔案備份。
為了協調單一開發者對版本管理專案所作的變更,Visual FoxPro 儲存了一個專案清單 (或者 .pjm 檔案,是“project metafile”的簡寫)。這個檔案是一個文字檔,儲存了專案檔的清單。它儲存的訊息與 .pjx 和 .pjt 檔案相同,例如專案中目前包含了哪些檔案。
版本管理軟體儲存了一個中心專案檔的清單檔案,它與其它檔案一起儲存在目前的中心倉庫中。另外,每個開發者在本地電腦上面還擁有簽出的專案清單備份,這備份保有了每個開發者的最新版本。
假設您正在處理一個專案,並且正要新增一個程式 (.prg 檔案),當您新增檔案時 (還要假設您將該檔案置於版本管理之下),Visual FoxPro 就會更新您該專案的本地電腦備份,並且當您在您的電腦上使用專案管理員時顯示該檔案。其他開發者開始時並不知道您所作的變更,而且他們在其本地電腦上面的專案備份並不會顯示您新增的檔案。即使您沒有更新專案檔清單,您仍可以為了安全將這個新檔案簽入,並且在需要的時候再將它簽出。
當您處理完新檔案之後,例如,當您測試完您的新程式,您可以更新專案清單。隨後,Visual FoxPro 會將您本地電腦專案清單的訊息與中心專案清單合併。
接著,Visual FoxPro 以中心專案檔清單中的變更來更新您本地電腦的專案檔清單。如果其他開發者已經向專案中新增了檔案,您本地電腦的專案檔清單就會更新了,本地電腦所備份的新檔案就會被放到您的電腦上,Visual FoxPro 重新構建您的專案 (.pjx 和 .pjt 檔案),並且專案管理員會顯示已經新增了的檔案,您就可以對它們進行處理。
注意:
專案清單只追蹤明確置於版本管理之下的專案檔。 如果您的專案中包含了不在版本管理下的檔案,它們就不會出現在專案清單中,並且當其他開發者更新自己的專案清單時,Visual FoxPro 不將這些檔案新增到他們的專案中。
相關資訊
如何:向版本管理專案新增檔案
在版本管理系統下管理 Visual FoxPro 專案
如何:更新專案清單
如何:連結已經存在的版本管理專案
團隊開發專案計畫
----------------------------------------------------------------------------------------------
原文:
Working with the Project File and Project List File
In Visual FoxPro, project information is maintained in a set of table and memo files with the extensions .pjx and .pjt. For example, if you've created a project called "MyProj," the information about the project, including the list of files, their location, and whether they're compiled into the application file (.app or .exe file), is stored in the files called Myproj.pjx and Myproj.pjt.
When working in a team development environment, developers don't share the same project files (.pjx and .pjt files). Instead, developers maintain their own local copies of the .pjx and .pjt files.
To coordinate changes that individual developers make to a project under source control, Visual FoxPro maintains a project file list (or .pjm file, short for "project metafile"). The file containing the project file list is a text file that stores the same information as the .pjx and .pjt files, such as which files are currently included in the project.
The source code control software maintains a central project file list file stored with the other files in the central repository. In addition, each developer has a local copy of the project file list checked out that reflects his or her current version of the project.
Imagine you're working with a project, and that you're adding a new program (.prg file). When you add the new file (and assuming that you put this file under source control), Visual FoxPro updates your local copy of the project and shows the file when you use the Project Manager on your computer. Other developers aren't initially aware of your change, and their local copies of the project don't show the file you have added. Even though you haven't updated the project file list, you can still check in the new file for safekeeping and check it back out again as needed.
When you're finished with the new file — for example, when you've finished testing your new program — you can update the project file list. When you do, Visual FoxPro merges the information in your local project file list with that in the central project file list.
Visual FoxPro in turn updates your local project file list with changes it finds in the central project file list. If other developers have added files to the project, your local project file list is updated, local copies of the new files are placed on your computer, Visual FoxPro rebuilds your project (.pjx and .pjt files), and the Project Manager displays the added files for you to work with.
Note:
The project file list tracks only the project files that are explicitly under source control. If your project includes files that aren't under source control, they will not appear in the project file list, and Visual FoxPro will not add these files to other developers' projects when they update their own project lists.
See Also
How to: Add Files to a Source-Controlled Project
Managing Visual FoxPro Projects Under Source Control
How to: Update the Project List
How to: Join an Existing Source-Controlled Project
Planning for Team Development Projects _________________ 希望有更多人來參與
VFP wiki - 需要大家一起完成的VFP電子書與FAQ |
|
回頂端 |
|
 |
|
|
您 無法 在這個版面發表文章 您 無法 在這個版面回覆文章 您 無法 在這個版面編輯文章 您 無法 在這個版面刪除文章 您 無法 在這個版面進行投票 您 無法 在這個版面附加檔案 您 無法 在這個版面下載檔案
|
|