Component Interface
A server component's interface is made up of the objects it exposes, along with the properties, methods, and events for those objects. This interface is all the client code that uses the component needs to know about, and it is the stuff you can see when you open the Object Browser in the Visual Basic IDE and select a referenced component. The sample DHO exposes only two types of objects, and we defined a small set of functionality they must provide, so we can now define their interfaces, as shown in Table 1.
Table 1 The DHO Component's Interface
clsPublisherList |
Properties |
None |
Methods |
Public Sub Delete(ByVal lPublisher As clsPublisher) Removes a Publisher from the Publishers table. |
|
Public Sub Insert(ByVal lPublisher As clsPublisher) Inserts a Publisher into the Publishers table. |
||
Public Function Fetch(ByVal lPubID As Long) As clsPublisher Retrieves a Publisher from the Publishers table. |
||
Public Sub Update(ByVal lPublisher As clsPublisher) Updates a Publisher in the Publishers table. |
||
Public Function Search(ByVal lSearchString As String) As Collection Returns a new collection containing a list of references to Publishers objects with a Name that matches the search criteria. |
||
Events |
None |
|
clsPublisher |
Properties |
Public PubID As Long Public Name As String Public CompanyName As String Public Address As String Public City As String Public State As String Public Zip As String Public Telephone As String Public Fax As String The data items stored in the Publishers table. |
Methods |
None |
|
Events |
None |