October 5, 2002 - IBuySpy's CustomersDB Component
October 5, 2002 IBuySpy's CustomersDB Component Tips: October 2002
Yehuda Shiran, Ph.D.
|
CustomersDB.js
handles the business logic of the IBuySpy Store customers. In particular, it extracts customers from the database, adds customers to the database, and logs customers in the database.
All IBuySpy components share the same IBuySpy
namespace. The CustomersDB.js
component includes two classes: CustomerDetails
and CustomersDB
. The CustomerDetails
class includes only parameters:
public class CustomerDetails {
public var FullName : String;
public var Email : String ;
public var Password : String ;
}
The CustomersDB
class is the main class. It includes the following method declarations:
public class CustomersDB {
public function GetCustomerDetails(customerID: String) : CustomerDetails {...}
public function AddCustomer(fullName: String, email: String, password: String) : String {...}
public function Login(email: String, password : String) : String {...}
}