Rule one: Create a cell for each class (one class,one unit)
Always keep this in mind: the Private (private) and protection (protected) portions of a class are hidden only for classes and procedures (procedure) in other cells. So, if you want effective encapsulation, you should use a different unit for each class. For some simple classes, such as those that inherit other classes, you can use a shared unit. However, the number of classes that share the same unit is limited: do not place more than 20 complex classes in a simple unit, although the Borland Company's VCL code has done so.
If you use a form, Delphi follows the rule of "one class using one unit" by default, which is also very handy for programmers. When you add a class without a form to your project, Delphi also creates a new stand-alone unit.
Rule number two: Name the component (name components)
It is important to give a meaningful name to each form and unit. The names of forms and units must be different, but I tend to use similar names for both of them, such as AboutForm and About.pas for the forms and units that are used for them.
It is also important to use a descriptive name for the component. The most common naming method is to use the lowercase letter of the class to begin with, plus the functionality of the component, such as Btnadd or Editname. Naming a component in such a way may have many similar names, and there is no best name, and the one that should be chosen depends on your personal preference.
Rule three: Name the event (name events)
It is more important to give the appropriate name to the event-handling method. If you give a proper name to the component, the system default name ButtonClick will become Btnaddclick. Although we can guess the function of this event handler from this name, I think it would be a better way to use a name that describes the function of the method, rather than a name added by Delphi. For example, the Btnadd button's onclick event can be named Addtolist. This makes your program more readable, especially if you call the event handler in other methods of the class, and it helps programmers choose the same method for similar events or for different components. But I have to say that using actions is my favorite way to develop important programs at the moment.