Font Size: a A A

A Study About Improving Component Build Based On COM

Posted on:2011-09-21Degree:MasterType:Thesis
Country:ChinaCandidate:W ZhangFull Text:PDF
GTID:2178360302497515Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
Since last 90's,object-oriented software development technology has become the main technology in software development, it cause the software-reuse that based on object-oriented be regarded as a feasible approach which can solve the software crisis. According to different levels of reuse, software-reuse was divided into design reuse and code reuse.Design pattern was a software reuse technology on design level. factory pattern was one of those patterns. Factory was a class that build the components, it hid the build details to clients, made the clients' responsibility singlenessly,that means just use the component and don not build it.COM was a component technology, it was the code reuse in software reuse technology.COM used traditional factory pattern to build COM component, and make the clients manage the memory resource by themselves. It made the building process of traditional COM model components was extremely complexity, the management of memory extremely tedious and can make a mistake easily.About the traditional COM pattern defects on component create and memory management, this paper has done works as follow:1. Propose a class registration realization of simple factory pattern for the defects on the traditional factory pattern, factory didn't take responsibility of the components'building,but use a container to conserve the name of the components and their building functions. Factory searches the container when the clients ask the factory for their components, finds the components'building functions that clients need, and then back to the clients through the function building component, this made it more accord with "open-close" principle.2. Propose a way that optimize COM component's build process used the class registration factory pattern. In other words, replacing the COM factory use the class registration factory.3. Propose the handle class to manage COM memory resources, a handle class is a C++ class which packages inside build pointer, the handle class can manage the COM memory resource instead of the clients.4. Use an instance to explain COM component's build process and its memory management after optimize, validate the feasibility and validity of class registration factory pattern and the handle's, this experiment indicates the optimized COM pattern make the system's structure more simple, the system can be extended more easily.
Keywords/Search Tags:factory pattern, COM, class registration, handle
PDF Full Text Request
Related items