• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Utilities

Utilities are similar to services, but they do not provide vital functionality, so applications should not be broken if utilities are missing. This statement should be clarified by an example.

In pre-alpha development of Zope 3, SQL connections to various relational databases were managed by a service. The SQL connection service would manage SQL connections, and the user could then ask the service for SQL connections by name. If a connection was not available, the service would give a negative answer. Then the Zope 3 developers realized the role of utilities, and they were able to be rid of the SQL connection service and implement SQL connections as utilities. Now you can ask the utility service to give you an object that implements ISQLConnection and has a specified name. Many services that merely acted as registries were thrown out, and the objects they managed became utilities. This greatly reduced the number of services and the complexity of the system.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint