"Better" is subjective. If the UDF collection works with the same data that you need to pass between them, it probably should be implemented as CFC, so you can have stateful objects so that the data and methods can be encapsulated in their own memory space.
If they are purely static methods, then the library-enabled file may be right.
INCluded UDFs pollute the scope of variables separately, while functions in a CFC instance are accessible through a single object variable, so itβs a bit tidier.
If CFML had the concept of static methods, I would always use CFC, but since CFML has no static methods, there is an opportunity to justify function libraries, as well as for CFC.
Personally: I will always use CFCs. They just seem more organized and tidy.
source share