In ASP programming, classes can play a good role in encapsulation. Although classes in ASP cannot be object-oriented in the true sense, they are only object-based. Despite this, classes can still play a good role in ASP development, and it is still necessary to use them well.
The functions of the class can be implemented purely with Sub and Function, but the class provides a more comfortable interface method. In ASP, there is no concept of "namespace". When many sub and functions are used, in order to distinguish these sub and functions, long and difficult to remember names are often used. Moreover, the interface method of Sub and Function is very rigid, but it can be greatly improved if you use classes.
Classes cannot help you improve the operation efficiency of your program, but classes can improve your development efficiency and improve your programming habits.
Since it comes to packaging, it involves good packaging and bad packaging. How to design the properties and methods of your class, that is, how to design the interface of this class, determines how much your class can assist you in development. If you don't encapsulate it well, the class may not bring you much practical convenience. But if you encapsulate it well, classes can indeed bring qualitative improvements to your development.
When should classes be used? Basically, the more complex the input and output interfaces of your modular functions, the more suitable it is to encapsulate it into a class. But this is obviously not necessary, and you can also achieve it with Function and Sub. If you have already tasted the sweetness of classes, you will inevitably tend to write these modules with complex interfaces and relatively independent functions into classes.