发明名称 Static extensibility models with dynamic languages and scripts
摘要 Various technologies and techniques are disclosed for generating add-in bridges that allow hosts to be extended using a dynamic language. The system programmatically determines static requirements that an add-in is required to implement in order to integrate with a particular host. The system programmatically generates the add-in bridge to conform to the requirements of the particular host and to operate like a compiled add-in while actually calling dynamic language script files that are executed by a scripting engine. The add-in bridge is generated by generating a component for the add-in that contains at least one class to conform to the host requirements. A constructor is then generated for the class. For each method the add-in is required to implement, a respective method is generated in the class that provides a stub implementation but that calls dynamic-language script files to perform a desired functionality.
申请公布号 US8762976(B2) 申请公布日期 2014.06.24
申请号 US200711716186 申请日期 2007.03.09
申请人 Microsoft Corporation 发明人 Kaplan Jesse D.;Gudenkauf John C.;Miller James S.
分类号 G06F9/44 主分类号 G06F9/44
代理机构 代理人 Sullivan Kevin;Drakos Kate;Minhas Micky
主权项 1. A computer storage memory having computer-executable instructions for causing a computer to perform steps comprising: receive input from a user to generate an add-in bridge to dynamically extend functionality of a particular host application that has one or more requirements to be met by a compiled add-in, the particular host application not directly supporting dynamic languages; programmatically determine the one or more requirements that an add-in is required to implement in order to integrate with the particular host application by examining an object model of the particular host application to find an abstract class that represents the one or more requirements, the one or more requirements being a static set of requirements that are part of a static extensibility model; and programmatically generate the add-in bridge dynamically to conform to the one or more requirements of the particular host application and to operate like a compiled add-in while actually calling one or more script files that are executed by at least one scripting engine to implement a desired functionality, the one or more script files being written in a dynamic language, wherein the generation of the add-in bridge further comprises: generate a component for the add-in bridge that contains at least one class to conform to the static set of requirements of the host application;generate a constructor for the class, wherein the constructor reads a configuration to obtain an actual type to instantiate in order to create a particular script engine from a plurality of script engines; andfor each method the add-in bridge is required to implement, generate a respective method in the class that provides a stub implementation of the respective method but calls the one or more script files that are executed by the scripting engine to perform an actual implementation of a desired functionality.
地址 Redmond WA US