One of the first things I noticed when working with the add-in framework was the definition of numerous interfaces for “sub-object” associated with “primary objects” but no factory for instantiation of concrete instances of these interfaces. For example, the framework defines the interface INote for notes associated to a contact object and IThread for threads associated with an incident object. The interfaces are nice when you are obtaining thread or note data from an incident or contact but the lack of a factory serves as a problem when trying to create your own instances of threads and notes.
For a long time (since August ’08) developers have had to implement these interfaces themselves anytime they wished to add such a sub-object to a primary object. Well I’m pleased to announce that with our November ’09 release of the RightNow Connect Add-In Framework we have resolved this issue. Beginning in November ’09 the add-in framework now contains a factory for obtaining concrete implementations of these interfaces. The factory, AddInViewsDataFactory, is contained in the RigthNow.AddIns.AddInViews namespace and contains two methods: IsSupported<T>() and Create<T>(). These operations can be used to determine if a particular interface can be created by the factory and to obtain a concrete implementation of a supplied interface.
If you would like to see how to use this new factory we have developed a sample application which can be found on the RightNow Connect Forums in our Developer Community. I hope you find this factory as valuable as I have. Now that we have this factory which feature should we add next?

Leave a Reply