发明名称 Object extensions using attributes to decouple base classes from derived classes
摘要 An object oriented application framework is provided in which base classes are decoupled from derived classes by using attributes. Relationships between derived classes and attributes can be generated, and derive classes can be statically or dynamically instantiated at run time. By decoupling the base class from derived classes using instances of such attributes, a developer does not modify computer program code defining the base class when adding customized extensions to that base class. The framework includes a class factory that uses instances of attributes associated with elements to derive, at run time, extension classes. The attributes can be specified at run time to specify or to alter the run time behavior of the application. This framework also allows the application to conditionally instantiate an element based on its attributes.
申请公布号 US9026989(B2) 申请公布日期 2015.05.05
申请号 US201213490487 申请日期 2012.06.07
申请人 Microsoft Technology Licensing LLC 发明人 Gall Michael;Pontoppidan Michael Fruergaard;Blaaberg Lars Dragheim;Greef Arthur
分类号 G06F9/44 主分类号 G06F9/44
代理机构 代理人 Reith Damon;Hoff Aaron;Minhas Micky
主权项 1. A computer implemented process supporting an application framework, comprising: receiving computer program code into memory defining: an element defining a base class;an attribute having one or more instances;wherein the element includes an extension definition defining a derived class for the base class as an extension of the element using an instance of the attribute, the extension definition associating the extension of the element with the instance of the attribute; andan element factory having a method for the element that, given the extension definition of the element and an instance of the attribute, generates an instance of the extension of the element according to the instance of the attribute associated with the extension of the element by the extension definition; processing the computer program code with a processor to instantiate the extension of the element including: receiving a value for the attribute, andexecuting the method of the element factory for the element that instantiates the extension using the received value for the attribute; and enabling the computer program code to be altered on a computer to add an extension to the element by adding an instance of the attribute to the computer program code.
地址 Redmond WA US