Form and data module naming 1. Naming standards for form types: The name of the form type should express the purpose of the form, and should be prefixed with T, followed by a descriptive name, and finally Form. For example: Student form type name is: TStudentForm= class (TForm) User login form type name is: TUserEntryForm= class (TForm) 2. Naming standard for form instances: The name of the form instance is the same as the corresponding type name , but without the prefix T. For example: varStudent Form: TStudentFormUserEntryForm: TUserEntryForm3. Automatically created form: Unless there are special reasons, only the main form is automatically generated. All other forms must be removed from the automatically generated list in the PRoject Options dialog box. 4. Modal form instantiation function: All form units should contain instantiation functions for creating, setting, modal display and releasing the form. This function will return the mode result returned by the form. Parameters passed to this function follow the rules for parameter passing. The reason for encapsulation like this is to facilitate code reuse and maintenance. The form's variables should be removed from the unit and defined as local variables in the form instantiation function (note that this requires the form to be removed from the automatically generated list in the ProjectOptions dialog box. Please see the previous content). For example, the following unit file demonstrates the GetStudent instantiation function. Unit StudentFrm;InterfaceUsesWindows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;Type TStudentForm= class(TForm)editID: TEdit;editName: TEdit;private{Private declarations}public{Public declarations}end;function GetStudent (var aStudentName: String; var aStudentID: Integer): Word;implementation{$R*.DFM}function GetStudent (var aStudentName: String; var aStudentID: Integer): Word;varStudentForm: TStudentForm;beginStudentForm: = TStudentForm.Create (application);TryStudentForm.Caption:='Getting Student'; Result: = StudentForm.ShowModal;If Result=mrOK then beginaStudentName: = StudentForm.editName.Text;aStudentID: = StrToInt (StudentForm.editID.Text);end;finallyStudentForm.Free;end;end;end.5 Naming standards for data modules: The data module type name should express its purpose , and should be prefixed with T, followed by a descriptive name, and finally DataModule. For example: the type name of the Student data module is TStudentDM= class(TDataModule)6 Naming standard for data module instances: The name of the data module instance should be the same as the corresponding type name, but without the prefix T. For example: varStudentDM: TStudentDM;