Duwamish 7 Preliminary - Data Process

xiaoxiao2021-03-06  144

DUWAMISH 7 is a Microsoft's distributed application example based on ASP.NET. Duwamish several core file: SystemFramework / ApplicationAssert.cs // verify the data SystemFramework / ApplicationConfiguration.cs // Common frame configuration defined read / DuwamishConfiguration.cs // read configuration (by ApplicationConfiguration) above an entire application The frame core, there is an ApplicationLog.cs, the role and configure is similar. Web / Web.config // Application Profile Web / PageBase.cs // Web Forms page Base class for ASPX derived, which define data shared between the page (such as user, order information, definition with attribute) Web /ModuleBase.cs // Web control base class for module / *. ASCX derived, defined all of the application paths and other shared information required for all modules (definition with attributes) DUWAMISH 7 is a commercial application application episode, where Structure, framework, level definition is very complex, peek in the tube, can be seen. User interface --Web business appearance - BusinessFacade Business Rules - BusinessRules Data Access - DataAccess For a rigorous, clear, easy-to-maintain web application Most. We use a user login process as an example to explore its data flow.

Web / Secure / Logon.aspx accepts user login form submission, triggers the logon.logonbutton_click event (204 lines in web / secure / logon.aspx.cs) Web / Secure / Logon.aspx.cs 243 lines: CustData = (New Customersystem . ()) GetCustomerByEmail (LogonEmailTextBox.Text, LogonPasswordTextBox.Text); BusinessFacade CustomerSystem in class (Business / Facade / CustomerSystem.cs) to achieve "user account access interface" logical wherein BusinessFacade.GetCustomerByEmail () (Business / Facade / CustomerSystem. cs line 45) defines "user information is read by in Email" Interface Business / Facade / CustomerSystem.cs in line 58: using (DataAccess.Customers customersDataAccess = new DataAccess.Customers ()) {dataSet = customersDataAccess.LoadCustomerByEmail (emailAddress); } DataAccess / Customers.cs Implement "User Account Data Access" logo where Customers.LoadCustomerbyemail () (217 lines in DataAccess / Customers.cs) defines "Read User Information" interface through Email - through access SQL Server stored procedure "GetCustomerByEmail" DataAccess / Customers.cs line 227: dsCommand.SelectCommand = GetLoadCommand (); DataAccess.Customers.GetLoadCommand () initialization procedure and stored parameter and returns its interface (DataAccess / Customers.cs line 112) DA 119 lines in Taaccess / Customers.cs: loadCommand = New SqlCommand ("getcuserbyemail", new sqlconnection (duwamishconfiguration.connections); initialization stored procedure. Its database connection is obtained by the CONNECTIONSTRING attribute in Common.duwamishConfiguration.

转载请注明原文地址:https://www.9cbs.com/read-127301.html

New Post(0)