Adding Methods to the Search Component
The Search component was created for the Corporate Media Library (CML) application featured in Scenario 1 and About the Search Component describes what this component does. The new AdvancedSearch method, created to support critique enhancements, is added to the Search component. The new method is added for several reasons:
- The AdvancedSearch method performs a task similar to that of existing methods in the component. The methods of the Search component work together to support a common purpose; searching the FmLib database.
- The existing Let and Get procedures of the SearchString property used by the CreateTable method, created for the CML, also work with AdvancedSearch. Placing AdvancedSearch and SearchString in the same component saves the overhead of marshalling between components.
- The User component, which the AdvancedSearch method calls, is part of the same DLL (CML.dll) as the Search component and communication between two components in the same DLL is more efficient than communication between DLLs.
- From the perspective of the CML/LitCrit application there is no reason not to place the advanced search capabilities in the existing Search component, meaning there are fewer components to manage.
The methods, AuthorsToString and TypesFromArray, that support the AdvancedSearch method are also added to the Search component.