Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Ripple Effect in Web Applications Figure 10. new connection to a database cn is a global vari- able, so any change in that definition will affect all the methods in the class. The same thing goes for the query command cmd. While dr is defined globally then its execution in page_load will affect the values read in submit_click method. Because the values returned in dr.Read() in line 16 depends directly on the execution of cmd in line 12 "dr = cmd.ExecuteReader". We can represent the propagation of these variable through the class using a 0-1 matrix X load as shown in Figure 11. Intra-class change propagation involves the flow of program/variable change across classes, that is why the column P_load is all zeros. By finding the Boolean product of S load and X laod we can find the Intra-class change propagation of all variables in page_load (see Figure 12). Therefore the S load X load will be as pictured in Figure 12. Now in order to indicate the amount of prop- agation from variables in the load method, we Table 2. 2 Public Class indexpage 3 Inherits System.Web.UI.Page 4 Public Shared user_ID As Long 5 Dim cn As OleDbConnection 6 Dim cmd As OleDbCommand .. .. .. 12 dr = cmd.ExecuteReader should find the standard matrix product of V 1oad and S load X load as seen in Figure 13. A complexity measure should also be taken into account in any.aspx.vb. A matrix C can be presented, representing complexity measurement. We use our WCCM measure. Hence, for our run- ning example, the matrix C is picture in Figure 14. The product of V 1oad S load X laod and C is picture in Figure 15. We normalize this number by dividing it by i= 1 i i to give the mean complexity-weighted control-change propagation per variable in Figure 11. 107