Computer-implemented methods, systems and apparatus implement
techniques for generating custom coclasses. A runtime environment includes a client
application implementing an object model, which includes a hierarchy of object
classes that can be instantiated in the client application. The object model includes
class templates, each having an associated class type, and includes class functionality
information—including required class functionality and elective class functionality—for
custom classes that can be implemented in the client application. When a user requests
the creation of a custom class of a specified type, a design-time environment is
launched and class functionality information is retrieved for a class template
associated with the type. A custom class is created, based on a class definition
defining a class having the required class functionality and the specified elective
class functionality. Objects belonging to the custom class can be instantiated
from the runtime environment independent of the design-time environment.