When I am reading some chapters in "Pattern.Oriented.Software.Architecture.Volume4: A Pattern Language for Distributed Computing",
one glue came into my mind if we can use some "Reflection" pattern to build up the test framework.
Further more, it also can help Transactive in supporting "plug-in-out" features in future as a real configurable product.
As one summary introduces this practice in page 199, that is:
Below is of detail explanations for those two patterns,
The INTROSPECTIVE INTERFACE (286) pattern offers a supplementary interface that supports clients in accessing information about a component’s type, functionality, public interface, internal structure, behavior, and computational state. Clients or application-external tools can use this information to monitor a component or control their use of the component.
The DYNAMIC INVOCATION INTERFACE (288) pattern offers a supplementary
interface that allows clients to invoke methods on
components dynamically, composing the calls at runtime rather
than selecting them from declarations.
interface that allows clients to invoke methods on
components dynamically, composing the calls at runtime rather
than selecting them from declarations.
My thought is,
Since I studied some libs done by c++, implementing Reflection, it's very useful to build one part of the framework to call the interfaces provided by Transactive.
Further, we also can use XML as an assistant to work with Reflection, so that the test cases can be configured one by one.
A link to C++ Reflection lib:
http://seal-reflex.web.cern.ch/seal-reflex/
A link to XML lib:
http://www.gccxml.org/HTML/Install.html
本文探讨了使用Pattern-Oriented Software Architecture Volume 4: A Pattern Language for Distributed Computing中的反射模式来构建测试框架的可能性。通过引入自省接口和动态调用接口模式,可以实现对外部客户端的支持,如测试框架或对象浏览器,使其能够获取关于基本级别域对象的信息,而无需依赖其内部结构。此外,还讨论了如何利用C++反射库和XML来增强配置能力。
543

被折叠的 条评论
为什么被折叠?



