[go: up one dir, main page]

WO2009061146A2 - A method for software development and operation based on component reuse and dependency injection - Google Patents

A method for software development and operation based on component reuse and dependency injection Download PDF

Info

Publication number
WO2009061146A2
WO2009061146A2 PCT/KR2008/006566 KR2008006566W WO2009061146A2 WO 2009061146 A2 WO2009061146 A2 WO 2009061146A2 KR 2008006566 W KR2008006566 W KR 2008006566W WO 2009061146 A2 WO2009061146 A2 WO 2009061146A2
Authority
WO
WIPO (PCT)
Prior art keywords
component
interface
components
client
glue
Prior art date
Application number
PCT/KR2008/006566
Other languages
French (fr)
Other versions
WO2009061146A3 (en
Inventor
An-Mo Jeong
Original Assignee
An-Mo Jeong
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by An-Mo Jeong filed Critical An-Mo Jeong
Publication of WO2009061146A2 publication Critical patent/WO2009061146A2/en
Publication of WO2009061146A3 publication Critical patent/WO2009061146A3/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation

Definitions

  • the present invention relates to a component-based development (CBD) technology and a framework technology, and more particularly, to a method of dividing a component process into a development process and an assembly process of component to actually realize the essential tenor of the component-based development paradigm for a substantial increase in production by re-using and assembling components of a binary code type developed by a third party like hardware components and thus developing a new application, which is capable of developing an application through an efficient assembly of these components and providing a high quality middleware service.
  • CBD component-based development
  • the reuse of components means herein to obtain components of a binary code declaration developed already, immediately and compiled, and to assemble and again use the components in a new environment without a source code correction. That is, if even functionally reusable components, source code drawn up by others should be obtained, analyzed and corrected, a development productivity effect in the reuse becomes immaterial owing to high expenses taken in such work. Furthermore, acquiring the source code of components transacted in the market may be impossible realistically.
  • a component-based development methods according to a related area employs a software development scheme including an already-decided combination with other specific component in a component developing step, thus this may be different from the CBD essential idea to realize a reuse/assembly of components without a source code correction of a commercial off-the-shelf (COTS) developed independently.
  • COTS commercial off-the-shelf
  • Component technologies according to a related art employ such software development scheme of mixed type with a component development and a component assembly in a single process. This may have some meaning in an aspect of simplicity, intuition and stability in the component developing, but a substantial increase opportunity in reuse of component and productivity of software, which can be acquired by definitely dividing into a component production process and an assembly process, may lose in itself.
  • Components mutually communicates through a medium of an exposed interface with meta data and with hiding a built-in code, in being serviced and servicing, and each component comprises provided- interfaces for service that the component itself as a server provides to a client, and required- interfaces for service that the component itself as a client depends on a server. Since there is no communication unit except the interface, the required-interface of the client component should be exactly equal to the provided- interface of the server component in two components being serviced and servicing mutually in an actual environment.
  • each component is ready for a communication in higher and lower both directions with various kinds of other components, independently existing as the client or server.
  • the one type being as a highest configuration unit of programs, i.e., class or interface etc., drawn up in an object- oriented programming language;
  • a specific interface has a peculiar identifier and exists on any one position from the principle that a specific type should exist only on one place. That is, in two components giving and receiving a service, the required interface of client component and the provided interface of server component should become precisely equal to each other, but the same type of interfaces cannot be adapted on two positions, accordingly one should store only information referring to another.
  • each component includes completely defining only a provided- interface for a service provided by the each component itself, without specifically defining the required interface and has a built-in code using a provided-interface type defined in a server component on which the each component itself depends.
  • each component includes assembly information with its own depending server component in the code, and as a result, components of a multi hierarchy structure are solidly combined with one another in a static call stack scheme. This indicates that a related code should be modified to use one component in other environment besides an original target system. That is, it is impossible to increase productivity by developing software in a system of acquiring independently-developed binary components and simply assembling the components.
  • the present component technologies do not support a reuse without a source code correction of binary component developed independently, thus do not render services to the SOA service development enhancement, and become a serious obstacle in a change into an SOA system being spotlighted as an optimum architecture to speedily correspond to a rapidly changing outside environment in large scales of systems of enterprises etc.
  • a dependency injection is a design model to improve a reuse characteristic of component by eliminating a dependency between a client component and a service implementation, in a system for instancing a server component through a container instead of the client component and injecting its reference into a client component object.
  • a class of the client component does not need to inform an implementation class of server component to a compile time, and it does not need to have a server component identifier, thus a component assembly is flexible.
  • client component using a specific interface type as a service call is valid to combine with only server components implementing an interface type thereof, and thus useful to a version change within a single application, meanwhile impossible in an assembly of components that are independently developed and thus have different interfaces, that is, an actual reuse effect of components is relatively low.
  • a product line or framework approach is also one example of component reuse method.
  • this method common function elements are identified per specific application domain and thus previously realized, and then only variable elements are developed according to the need, thereby increasing productivity.
  • This model is based on a concept of entirely using the previously realized component set and newly realizing only components additionally necessary per a demanded place or newly developed product. That is, in a reuse aspect of already-developed components there is provided a relatively high efficiency regardless of a limit in a component technology of a related art.
  • a developer optionally defines information, i.e., method s name, parameter/name of return value, form etc., necessary for a service request, instead of storing inside the client component a code using a provided- interface type of a specific server component, and on the basis of that, a server component object is called, thereby getting an internally completed coding without information for a server component to actually depend on.
  • information i.e., method s name, parameter/name of return value, form etc.
  • the glue component is generated by reading out metadata of client and server components in an assembly performed separately from a component development, and used in adjusting and intermediating for a grammar and meaning disaccord between both interfaces.
  • a component of a component can be developed as an independent component not subordinate to a specific application, and these components may become intermediate and be combined outside a source code, thus a software development through a reuse/assembly is valid without a correction for source code of binary component independently developed by a third party.
  • the active binding technology selects a new independent scheme in place of the existing standard programming technique familiar to a developer in a component development. Metadata is extended in an independent scheme using a custom attribute etc. to internally store in a component, service request-related information defined optionally.
  • a wizard type of tool automatically processing a considerable amount of this procedure is provided together, thus the execution is relatively simple and a learning burden is small, but may still cause a refusal feeling to a developer sensitive to a development environment change, and a code is unfamiliar and complicated.
  • a component realized in a non-stan dard scheme may cause a comparability trouble in a new version of platform.
  • a performance drop caused in an application execution may be more serious in selecting the non-standard scheme in the existing active binding technology.
  • a specific type i.e., class, interface etc.
  • a required- interface type to be referred by a client component can be generated within a glue component generated only when the previously developed components are assembled. That is, an active binding component code developed in a declaration that a type to be referred does not exist, cannot call a method of glue component object by using an interface type.
  • a method call of a client component for a glue component object is implemented dynamically through a function of reflection etc. in a runtime, and such dynamic binding or late binding causes much more performance burden in a program execution as compared with a static binding or early binding of a general object oriented-programming.
  • the dependency injection model is also an object oriented-programming based-technology usable when a dependency relation for a specific interface type is specified within an execution code.
  • the object oriented-programming based-component technologies have an essential point on a type stability and development efficiency of an application unit rather than a free assembly and reuse of components, thus can obtain an intuition of a conciseness of coding and a consistency and an efficiency in the same project, but are far from an essential idea of CBD based on a software development productivity increase through a complete component standardization and their assembly and production.
  • the active binding technology proposed to compensate defects of component technologies according to the related art provides a method of realizing components approximate to completely independent component standardization not directly depending on other specific components, and of assembling and reusing the components, on the principle that a development and an assembly of components should be divided as separate processes, but employs a non-standard programming scheme, causing a new burden in an aspect of learning, coding, performance and compatibility.
  • some embodiments of the invention provide a method for realizing a compensated active binding component by using an interface type definition as an object-oriented programming standard in a solution aspect to a negative effect caused in an independent component realizing scheme selected in an active binding technology, maintaining intact a basic principle of the existing active binding technology in a broadly prospection, to increase productivity, the basic principle being based on a component reuse increase and a separation between a component development and an assembly process to become a complete component standardization in a practical scheme thereof.
  • Some embodiments of the invention provide a method for providing relatively easier coding and assembly by applying a dependency injection model to an assembly of compensated-active binding component objects additionally to the compensated active binding component realizing method described above, and for enhancing an execution performance with a compatibility with latest middleware to substantially enhance the technology.
  • an active binding technology proposed for a productivity increase of software through a reuse and assembly of binary components developed independently unlike component-based technologies of a related art is compensated and a usefulness thereof increases.
  • An effect in an embodiment of the invention succeeds almost to an inventive principal effect intact provided in the existing active binding technology and is provided being reinforced more, thereby providing several additional effects.
  • a component can be developed and tested even without a server component to depend, thereby obtaining a non-sequential parallel development of application.
  • human resources of development can be utilized efficiently, thereby shortening a development period.
  • an interface definition scheme based on an object-oriented programming standard, sublating a non-standard independent scheme is selected in realizing a component with the effect described above, thereby preventing developer s learning burden and obtaining a concise and intuitive coding.
  • a self-sufficient and completed dependent relation can be coded statically by directly referring to a required interface optionally defined within a component, thereby preventing a performance drop causable by a dynamic binding in a runtime of client and server component objects, being regarded as an inevitable burden caused in a pre-development/post-assembly scheme.
  • inventive virtual and static binding obtains the same effect from an aspect of general/actual static binding scheme and performance adapted in a component technology of related art undergoing a development and an assembly in the same process.
  • a self-sufficient and completed dependency relation can be expressed, thereby being valid to utilize a dependency injection model for which generation and management of an object are entrusted to a container.
  • a coding becomes relatively more concise by applying a dependency injection model as a latest middleware technology to a component model according to an embodiment of the invention, and efficiency in a resource use and an operating performance are more enhanced.
  • FIG. IA provides a logic model of component assembly shown in a component diagram in a program design in a component-based technology according to a related art
  • FIG. IB illustrates an actual assembly of components in a component-based technology according to a related art
  • FIG. 2A provides a structure of component according to an embodiment of the invention
  • FIG. 2B illustrates a structure of component file according to an embodiment of the invention
  • FIG. 3 is a flowchart providing a component realizing step according to an embodiment of the invention
  • FIG. 4 illustrates a component assembly according to an embodiment of the invention
  • FIG. 5 is a flowchart providing an assembly procedure of components according to an embodiment of the invention
  • FIG. 6 provides a dependency injection of a framework for components developed and assembled according to an embodiment of the invention
  • FIG. 7 is a flowchart providing a dependency injection procedure between components by a framework in executing software developed according to an embodiment of the invention
  • FIG. 8 illustrates an assembly of components according to an embodiment of the invention
  • FIG. 9 illustrates a code of client component developed according to an embodiment of the invention
  • FIG. 10 provides a custom attribute class according to an embodiment of the invention
  • FIG. 11 illustrates a code of server component according to an embodiment of the invention
  • FIG. 12 illustrates a code of server component according to an embodiment of the invention
  • FIG. 13 illustrates a component layout file according to an embodiment of the invention. Best Mode for Carrying out the Invention
  • the method for realizing a component comprises defining a required interface type in place of drawing up a code directly depending on a provided-interface of another component when a service of the another component is required; completing a field to accept an object reference of a glue component generated in an assembly of a development component and a server component thereof, and used for intermediating for an interface disaccord thereof, and a service call code declaring an attribute as an access path to the field and using a field variable; and including the interface information into metadata.
  • the component assembling method comprises identifying call/called methods to be coupled to each other by reading required-interface information in a client component and provided-interface information in a server component among components to be assembled; generating a project of glue component to match the interface disaccord of the components, and generating a required-interface implementation class therein; declaring an attribute and a field necessary for receiving an assignment of object reference of server component within the class, and drawing up a code calling the called method by using the declaration; drawing up a code performing an intermediation when signatures of the call/called methods disaccord from each other syntactically or semantically, and inserting it into the class; generating a glue component by compiling the glue project; and drawing up dependency information between the client/server/glue components by a component layout file according to a dependency injection framework form.
  • a method of executing software using the dependency injection framework comprises identifying components including a glue component, relating to a service treatment by reading out a component layout file by a framework when a service is requested by a client outside the framework; generating in sequence, objects in a server-glue-client direction from a component positioned on an endmost part of a service treatment path to an uppermost component providing a method requested the outside client in the identified components, and transferring a reference thereof; and transferring an object reference of the uppermost component to the outside client.
  • each component internally has just a provided interface type definition, and employs a scheme of internally having a code used referring to a provided interface type of a server component without a specifically defined required- interface specification or type definition.
  • a developer independently defines and internally has a required interface type, and a method of the interface is used for a service call code, and its specification is automatically generated in metadata in compiling.
  • Each component except glue component in an embodiment of the invention, has a built-in required-interface type in a code, and has a built-in provided- interface specification and required-interface specification in metadata.
  • a definition of required- interface type within glue component is omitted according to a change of component realizing method, and a dependency injection function of framework can be utilized through a difference of the component realizing method, thereby providing a change of adding a procedure of drawing up a component layout file to allow the injection function.
  • the basic scheme of assembling a client component and a server component by intermediating between different interfaces through glue component is maintained intact, and a difference of assembly burden from the omission and addition of procedures may be slight.
  • FIG. IA provides a logic model of component assembly shown in a component diagram in designing an application of a component-based technology according to a related art. As illustrated in the drawing, a service is given and received through a link between a required interface 111 of a client component 110 and a provided interface
  • the client component 110 is called by using a type of provided interface 121 built in a server component 120, as shown in the physical model of FIG. IB, in place of use that the client component 110 independently defines the required interface.
  • the client component realized in such scheme has a built-in code dependent to an interface that is defined outside, and is thus statically, solidly combined with the server component as shown in FIG. IB, and cannot be independently reused without a source code correction.
  • FIG. 2A illustrates a structure of component according to an embodiment of the invention.
  • a component 210 development and assembly of a component are divided as respective separate processes, and on the principle of not having to include any assumption or meta information, code for an assembly with other specific component so as to draw up a new software by acquiring/assembling components existing as already-developed and independent component, the component 210 includes inside itself not only a provided interface type 221 but also an independently-defined required-interface type 212 as shown in FIG. 2A. Accordingly, when a service of other component is required, the component 210 completes a service call code by using the required interface type 221 built-in itself without depending on the provided interface of its component.
  • FIG. 2B illustrates a structure of component file generated when realizing a component got by extending a .NET component (assembly) according to an embodiment of the invention, on a .NET framework, .NET Framework, as one of present representative object-oriented component platforms.
  • a .NET component file according to a related art comprises a manifest 310 as metadata of a component level including developer information, identifier of dependent component, version number etc.; type metadata 320 including information 321 for a type of class, the provided interface 221 realized by component, etc.; a compiled execution code 330; and a resource 340 such as a bit map, string.
  • a component provided by extending a .NET component according to an embodiment of the invention further comprises information 322 of a required interface type 212 in the type metadata 320.
  • FIG. 3 is a flowchart for a development procedure Sl of developing a component according to an embodiment of the invention.
  • a step S 11 of developing a component according to an object-oriented component-based technology of a related art when a service of other (server) component is required in a step S 12, a required interface type is defined in a step S 13 within a development component instead of depending on a provided interface defined in its server component.
  • a field to accept a reference of glue component object and an attribute as a path accessing to the field are declared in a class including the service call code in a step S 14, the glue component object being generated when the development component and the server component are assembled and being used to intermediate for an interface disaccord between two components.
  • the service call code is completed by using a variable of the declared field in a step S 15.
  • a code drawn up through such steps is compiled, a component of file structure like in FIG. 2B that required-interface information 323 is included in the type metadata 320, is generated in a step S 16.
  • a note indicating the required interface is added to the type definition by using a function of custom attribute etc., thereby simply discriminating information of the provided interface and the required interface included in metadata.
  • step S 15 of drawing up the service call code with the procedure of FIG. 3 when draw-up code constitutes a method belonging to the provided interface of the development component, a corresponding method adds as a note, names of methods belonging to dependent required- interface to the same method in a call sequence by using a function of the custom attribute etc. to perform a service of the corresponding method itself, thereby including protocol information indicating an interaction between components into the metadata and thus supporting an interaction realization between components in a later assembly of components without error.
  • FIG. 4 illustrates a structure of two independently developed components assembled with each other as a relation of client and server according to an embodiment of the invention.
  • a glue class 231 realizing a required interface 212 within a glue component 230 is generated by using metadata 322 and metadata 321, and intermediates for a call/called method between components 210 and 220 assembled with each other through the glue class 231, the metadata 322 being for a required interface type built-in the client component 210, and the metadata 321 being for a provided interface type built in the server component 220.
  • FIG. 5 is a flowchart for an assembly procedure S2 of components developed according to an embodiment of the invention.
  • the procedure is as follows.
  • a call method and a called method to be coupled to each other are identified in a step S21 by reading out required- interface information from metadata of client component, and provided- interface information from metadata of server component among two components to be assembled.
  • a project of glue component to match an interface disaccord of the two components is generated in a step S22, and a class to implement a required interface type including the identified call method within a glue project is generated in a step S23.
  • a field to accept an object reference of server component and an attribute as an access path of the field are declared within the generated class in a step S24.
  • a code for an intermediation thereof is drawn up and is inserted into the class in a step S25.
  • a code calling the called method of the server component is drawn up in a step S26 by using a variable of the field declared in the step S24.
  • a glue component is generated by compiling it in a step S27.
  • Dependency information between client, server and glue component is drawn up as a component layout file according to a form regularized in a framework to execute a dependency injection in executing a later-completed application after the generation of glue component, in a step S28.
  • FIG. 6 provides a scheme a framework injects a dependency in a runtime, for components developed and assembled according to an embodiment of the invention.
  • an assembly module 411 of a framework 410 individually generates an object 223 of server component 220, an object 231 of glue component 230, and an object 213 of client component 210 and injects in sequence a reference of the server component object to an attribute of glue component and a reference of the glue component object to an attribute of the client component object, thereby obtaining an interaction of independently-developed components.
  • FIG. 7 is a flowchart providing a procedure S3 of injecting a dependency between components by a framework in executing software developed according to an embodiment of the invention.
  • the procedure is as follows.
  • a client outside the framework of a user interface etc. requests a service in a step S31
  • the framework reads out a component layout file and identifies all components, including glue component, relating to a request service treatment in a step S32.
  • an endmost component not depending on other component among the identified components is determined as a server component, and a component calling a method of its component is determined as a client component, and a glue component for intermediating between the components is identified in a step S33.
  • Objects of identified client, server and glue component are generated in a step S34.
  • a server object reference is transferred to an attribute of glue object in a step S35.
  • a glue object reference is transferred to an attribute of client object in a step S36. It is checked in a step S37 that a client object having received the glue object reference is an uppermost component providing a service method requested by an outside client, and when not the uppermost component, a new server-glue-client component relation with this component as a server component is identified in a step S38, and the object reference transfer procedure of S34 to S36 is repeated. When such dependency injection process reaches the uppermost component, a reference of the uppermost component object is transferred to outside client in a step S39.
  • glue component in an embodiment is basically in charge of an intermediation for an interface disaccord between client component and server component, but all call method/called-method between components are got through the glue component, the glue component may perform a middleware service, i.e., security, transaction, monitoring etc., provided by the framework referring to setting information of the framework immediately before and after the glue component calls a method of server component.
  • a middleware service i.e., security, transaction, monitoring etc.
  • the framework referring to setting information of the framework immediately before and after the glue component calls a method of server component.
  • an already-statically compiled glue component is used unlike a middleware technology of a related art for which in a program execution, a proxy of server component is dynamically generated and a framework is referred immediately before and after a method call, thereby substantially reducing a burden for a performance.
  • CBD method (UML Components: A Simple Process for Specifying Component-Based Software. Addison-Wesley, 2001) celebrated, of Cheeseman-Daniel, client component and server component with different interfaces are realized according to an embodiment, and are assembled through glue component matching the different interfaces, and then a component layout file to commit an object generation of server, glue and client components and a dependency injection between them to the framework, is drawn up.
  • FIG. 8 illustrates a logic model of interaction in client component Reserva- tionSystem, glue component GlueComponent and server component HotelMgr realized and assembled, according to an embodiment of the invention.
  • FIG. 9 illustrates a code portion of client component ReservationSystem developed according to an embodiment of the invention.
  • the code comprises a provided- interface IMakeReservation 221, a client object ReservationObject 213 realizing the provided- interface, and a required-interface IHotelHandling 212 used by the object.
  • the client object 213 implements (214) a member method MakeReservation of the provided- interface 221, and in this step, when the need for a use of another component occurs, a developer optionally defines a required interface type 212, and the interface is realized by glue component generated in a coming assembly work.
  • the client object should call the member method of the required interface realized by glue component, a field 215 to receive a reference of glue component object from framework and an attribute 216 as an access path to the field should be declared. Then, a code 217 calling a called method to be implemented in glue component is drawn up by using a field variable.
  • a method BookRoom of the required interface 212 to be implemented in the glue component is called by using a variable htHandler.
  • a note 218 indicating the required interface is added to an upper part of the required interface 212 is added by using a custom attribute to be easy to discriminate from provided-interface information within metadata.
  • FIG. 10 indicates a code of custom attribute class InterfaceAttribute to be used in adding the required interface note 218 of FIG. 9. That is, in compiling a content of the note is included into the metadata by implementing an optional custom attribute class succeeding to a System.Attribute class and adding the note on the basis of that.
  • FIG. 11 illustrates a portion of code of server component HotelMgr according to an embodiment of the invention.
  • This code is comprised of provided interface IHotelMgr 221 and server object HotelMgrObject 223 realizing the provided interface.
  • a signature for a member method RentRoom is defined in the provided interface 221, and the member method is implemented in the server object 223.
  • FIG. 12 illustrates a portion of code of a glue component GlueComponent to intermediate for different interfaces of server component HotelMgr of client component ReservationSystem realized respectively, independently and to assemble the components according to an embodiment of the invention.
  • a class of the glue component realizes the required interface of the client component, and in FIG. 11, this corresponds to glue object 231 of the name of GlueObject.
  • This object may be again largely classified as a field declaration unit 23 to receive a reference of server component object from framework, an attribute declaration unit 233 as an access path to the field, and a method implementation unit 235 implementing a member method belonging to a required interface of client component.
  • An assembler draws up a code 236 calling a called method of the server component in the method implementation 235, and at this time, when signatures of the call method and the called method are different from each other, an intermediation operation therefor should be performed.
  • signatures of the call method BookRoom and the called method RentRoom almost accord mutually, but a second parameter type of the call method is CustomerDetails, meanwhile a parameter type of its corresponding called method is Custld, that is, mutually different status is provided as the type that CustomerDetails includes Custld.
  • the method call code 236 transfers cus.custid required by the server component instead of cus received from the client component.
  • FIG. 13 illustrates a component layout file indicating to generate respective server, glue and client component objects by framework in executing components assembled in an embodiment of the invention and to inject a dependency between the objects.
  • the framework generates a client component object ReservationObject, a glue component object GlueObject, a server component object HotelMgr Object according to dependency information of the file, and then performs an operation of injecting a server object reference into an attribute HotelMgr of glue object, and a glue object reference into an attribute HotelHandling of client object.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

A component-based development (CBD) technology is provided. A software productivity increases through an application development with an assembly of independently developed binary components by more effectively improving an existing active binding technology (ABT) through a definite separate process of a development and an assembly of software components and by combining it with a framework technology having a dependency injection, thereby substantially increasing a reuse of components and performance and quality of an application.

Description

Description
A METHOD FOR SOFTWARE DEVELOPMENT AND
OPERATION BASED ON COMPONENT REUSE AND
DEPENDENCY INJECTION
Technical Field
[1] The present invention relates to a component-based development (CBD) technology and a framework technology, and more particularly, to a method of dividing a component process into a development process and an assembly process of component to actually realize the essential tenor of the component-based development paradigm for a substantial increase in production by re-using and assembling components of a binary code type developed by a third party like hardware components and thus developing a new application, which is capable of developing an application through an efficient assembly of these components and providing a high quality middleware service. Background Art
[2] A software productivity increase remains as a continuous and unfinished subject presented since the advent of the computer. In particular, Internet s development and the introduction of ubiquitous computing age bring about a continuously more- increasing demand for various and new software and a change of the existing software, but a slow improvement in a software development productivity. Therefore, a related remarkable breakthrough is urgently required nowadays. In fact, in the software development there have been proposed and experimented numerous technologies and methods as a structural development method, information engineering-based development method, object-oriented programming, component-based development method, model-driven development (MDD) method, aspect-oriented programming (AOP), service-oriented architecture (SOA) etc., actually obtaining a considerable productivity and quality improvement. However, such respective methodic theory itself has a limit in an idea or lacks for a practical possibility etc., thus there have not been ever decided as a decisive solution to a chronic software crisis.
[3] The heart of proposals for a productivity increase of software is resultantly converged to the existing components of software module. Like in the field of hardware such as motor cars, computers etc., components are purchased and assembled to produce new goods in a declaration that standardized components to constitute a finished product are abundant in the market. In such aspect the need for a reuse and mass production of components has been proposed as the solution to the software crisis in the end of 1960, and from 1990, component-based development platforms of CORBA/CCM, COM+, Java/EJB, .NET etc. have lead a programming environment. At recent, SOA arising as the topic in the IT business world has been also advocated emphasizing a reuse of service as a component in a broad sense.
[4] The reuse of components means herein to obtain components of a binary code declaration developed already, immediately and compiled, and to assemble and again use the components in a new environment without a source code correction. That is, if even functionally reusable components, source code drawn up by others should be obtained, analyzed and corrected, a development productivity effect in the reuse becomes immaterial owing to high expenses taken in such work. Furthermore, acquiring the source code of components transacted in the market may be impossible realistically.
[5] To reuse software components like hardware components without inconvenience it needs to develop and produce without a previous consideration regarding to an assembly with a specific thing and to treat the assembly as a specific process hereafter. However, a component-based development methods according to a related area employs a software development scheme including an already-decided combination with other specific component in a component developing step, thus this may be different from the CBD essential idea to realize a reuse/assembly of components without a source code correction of a commercial off-the-shelf (COTS) developed independently. Component technologies according to a related art employ such software development scheme of mixed type with a component development and a component assembly in a single process. This may have some meaning in an aspect of simplicity, intuition and stability in the component developing, but a substantial increase opportunity in reuse of component and productivity of software, which can be acquired by definitely dividing into a component production process and an assembly process, may lose in itself.
[6] Components mutually communicates through a medium of an exposed interface with meta data and with hiding a built-in code, in being serviced and servicing, and each component comprises provided- interfaces for service that the component itself as a server provides to a client, and required- interfaces for service that the component itself as a client depends on a server. Since there is no communication unit except the interface, the required-interface of the client component should be exactly equal to the provided- interface of the server component in two components being serviced and servicing mutually in an actual environment.
[7] In the above-descriptive aspect it is regarded that each component is ready for a communication in higher and lower both directions with various kinds of other components, independently existing as the client or server. However, in the component-based development method and technology according to a related art, with a concentration on a type stability of application unit than an independency and reuse of component in managing the interface as one type, the one type being as a highest configuration unit of programs, i.e., class or interface etc., drawn up in an object- oriented programming language; a specific interface has a peculiar identifier and exists on any one position from the principle that a specific type should exist only on one place. That is, in two components giving and receiving a service, the required interface of client component and the provided interface of server component should become precisely equal to each other, but the same type of interfaces cannot be adapted on two positions, accordingly one should store only information referring to another.
[8] A related art is provided with a structure that each component includes completely defining only a provided- interface for a service provided by the each component itself, without specifically defining the required interface and has a built-in code using a provided-interface type defined in a server component on which the each component itself depends. Thus, each component includes assembly information with its own depending server component in the code, and as a result, components of a multi hierarchy structure are solidly combined with one another in a static call stack scheme. This indicates that a related code should be modified to use one component in other environment besides an original target system. That is, it is impossible to increase productivity by developing software in a system of acquiring independently-developed binary components and simply assembling the components.
[9] Such question in the conventional component-based technology is applied intact and influences to other existing reuse methods. In SOA, services as an autonomy module reflecting a service unit of a business aspect communicate being based on a standard message base of XML etc., thus the reuse may be simple, but a particle become considerably great to get an autonomy function without depending on other services. Meanwhile, the entire -development of a relatively great particle is relatively very inefficient through a total software life period of a design to a realization, maintenance and repair. It is therefore, general to divide and implement each service into several relatively-smaller object-oriented or component-based modules and combine the modules. For example, when in this procedure, binary components developed by a third party can be reused as a service matter, an SOA service development productivity will be largely improved. However, as described above, the present component technologies do not support a reuse without a source code correction of binary component developed independently, thus do not render services to the SOA service development enhancement, and become a serious obstacle in a change into an SOA system being spotlighted as an optimum architecture to speedily correspond to a rapidly changing outside environment in large scales of systems of enterprises etc.
[10] A dependency injection is a design model to improve a reuse characteristic of component by eliminating a dependency between a client component and a service implementation, in a system for instancing a server component through a container instead of the client component and injecting its reference into a client component object. In the system a class of the client component does not need to inform an implementation class of server component to a compile time, and it does not need to have a server component identifier, thus a component assembly is flexible. However, when this model is also applied to a related component technology, client component using a specific interface type as a service call is valid to combine with only server components implementing an interface type thereof, and thus useful to a version change within a single application, meanwhile impossible in an assembly of components that are independently developed and thus have different interfaces, that is, an actual reuse effect of components is relatively low.
[11] A product line or framework approach is also one example of component reuse method. In this method, common function elements are identified per specific application domain and thus previously realized, and then only variable elements are developed according to the need, thereby increasing productivity. This model is based on a concept of entirely using the previously realized component set and newly realizing only components additionally necessary per a demanded place or newly developed product. That is, in a reuse aspect of already-developed components there is provided a relatively high efficiency regardless of a limit in a component technology of a related art. However, in this system, a large scale pre-investment is required in a domain engineering, and also an effect can be obtained only in a portion, particular area, i.e., military, money market etc., in which a service treatment is regularized relatively highly and thus a reuse frequency of once-developed components is relatively very high. That is, this system is non-realistic and economic model to apply it to a wider range of general field. Accordingly, a commercial-use component base of a general field with a much general purpose may be realistic to naturally establish in a way that numerous independent vendors competitively develop and accumulate various kinds of and useful components in a declaration of having arranged a method capable of assembling and using components with different interfaces.
[12] As described above, one of most serious obstacles in a reuse of binary component is caused from one-sided dependency of a client component on an interface defined in a server component in implementing a link between components in representative component technologies according to a related art. As a result, peculiar identifier information of a specific service provided-interface of server component cannot help but be stored inside a source code of client component, and the components cannot be reused except in an original development environment unless codes are modified. To overcome such structural limit of the component, an active binding technology is disclosed in patent registration No. 10-0697246 of Korea in the title of Software developing method and system using metadata enlarged in a base-environment .
[13] In a component model of the active binding technology, a developer optionally defines information, i.e., method s name, parameter/name of return value, form etc., necessary for a service request, instead of storing inside the client component a code using a provided- interface type of a specific server component, and on the basis of that, a server component object is called, thereby getting an internally completed coding without information for a server component to actually depend on. Such optionally defined and generated information relating to a service request is provided to the outside, being included in the metadata through a function of custom attribute etc., and this becomes the base of automatically generating a templet code of a glue component as a virtual server component to intermediate for an assembly with an actual server component. The glue component is generated by reading out metadata of client and server components in an assembly performed separately from a component development, and used in adjusting and intermediating for a grammar and meaning disaccord between both interfaces. In such active binding technology, a component of a component can be developed as an independent component not subordinate to a specific application, and these components may become intermediate and be combined outside a source code, thus a software development through a reuse/assembly is valid without a correction for source code of binary component independently developed by a third party.
[14] However, such active binding technology has several inefficient causes. First the active binding technology selects a new independent scheme in place of the existing standard programming technique familiar to a developer in a component development. Metadata is extended in an independent scheme using a custom attribute etc. to internally store in a component, service request-related information defined optionally. In such invention patent of active binding technology, a wizard type of tool automatically processing a considerable amount of this procedure is provided together, thus the execution is relatively simple and a learning burden is small, but may still cause a refusal feeling to a developer sensitive to a development environment change, and a code is unfamiliar and complicated. Furthermore, a component realized in a non-stan dard scheme may cause a comparability trouble in a new version of platform.
[15] Additionally to that, a performance drop caused in an application execution may be more serious in selecting the non-standard scheme in the existing active binding technology. In the object oriented-programming, a specific type, i.e., class, interface etc., should be definitely referred in an execution code representing a dependency relation, meanwhile, on the principle of a pre-development and post-assembly in the active binding technology, a required- interface type to be referred by a client component can be generated within a glue component generated only when the previously developed components are assembled. That is, an active binding component code developed in a declaration that a type to be referred does not exist, cannot call a method of glue component object by using an interface type. In this case, a method call of a client component for a glue component object is implemented dynamically through a function of reflection etc. in a runtime, and such dynamic binding or late binding causes much more performance burden in a program execution as compared with a static binding or early binding of a general object oriented-programming.
[16] Another question caused in the non-standard scheme of the active binding component is that a dependency injection model with an easiness of version change and a performance enhancement effect and a brief coding cannot be applied thereto. This question is also caused from a point there does not exist a type to be referred in the active binding component development. The dependency injection model is also an object oriented-programming based-technology usable when a dependency relation for a specific interface type is specified within an execution code. When generation and pooling of a component object are entrusted to a container according to a dependency injection model, it does not need to draw up an object generation relation code and thus the coding becomes concise and an efficiency in a system resource use is enhanced depending on an efficient management of the generated object. In addition, as a container assigns a server component object necessary for a client component object, an assembly with a server component having another version is relatively free, thus this technology is spotlighted being selected as the standard in EJB3.0 as Java s latest middleware standard. In a reuse aspect of component, an effectiveness of active binding technology supporting a free assembly of binary components developed independently is much more as compared with the dependency injection model just to a version change of server component having an according interface, but what cannot use the concise coding and the performance enhancement effect of the dependency injection model may be considerable limitations. Disclosure of Invention Technical Problem
[17] As described above, the object oriented-programming based-component technologies have an essential point on a type stability and development efficiency of an application unit rather than a free assembly and reuse of components, thus can obtain an intuition of a conciseness of coding and a consistency and an efficiency in the same project, but are far from an essential idea of CBD based on a software development productivity increase through a complete component standardization and their assembly and production. On the other hand, the active binding technology proposed to compensate defects of component technologies according to the related art provides a method of realizing components approximate to completely independent component standardization not directly depending on other specific components, and of assembling and reusing the components, on the principle that a development and an assembly of components should be divided as separate processes, but employs a non-standard programming scheme, causing a new burden in an aspect of learning, coding, performance and compatibility. Technical Solution
[18] Accordingly, some embodiments of the invention provide a method for realizing a compensated active binding component by using an interface type definition as an object-oriented programming standard in a solution aspect to a negative effect caused in an independent component realizing scheme selected in an active binding technology, maintaining intact a basic principle of the existing active binding technology in a broadly prospection, to increase productivity, the basic principle being based on a component reuse increase and a separation between a component development and an assembly process to become a complete component standardization in a practical scheme thereof.
[19] Some embodiments of the invention provide a method for providing relatively easier coding and assembly by applying a dependency injection model to an assembly of compensated-active binding component objects additionally to the compensated active binding component realizing method described above, and for enhancing an execution performance with a compatibility with latest middleware to substantially enhance the technology.
Advantageous Effects
[20] In an embodiment of the invention, an active binding technology proposed for a productivity increase of software through a reuse and assembly of binary components developed independently unlike component-based technologies of a related art is compensated and a usefulness thereof increases. An effect in an embodiment of the invention succeeds almost to an inventive principal effect intact provided in the existing active binding technology and is provided being reinforced more, thereby providing several additional effects.
[21] The inventive effects of active binding technology succeeding and being reinforced are as follows.
[22] First, a development of component is definitely discriminated from an assembly of components as mutual separate processes, and a component becomes a complete comp onent standardization not including dependency information on another specific component, thereby assembling and reusing binary components with a source code correction, the binary components being developed independently by a third party and thus having different signatures in an interface. This is one of top priority conditions necessary for implementing an essential idea of CBD to increase software productivity through a development based on an assembly not a new development.
[23] Secondly, a component can be developed and tested even without a server component to depend, thereby obtaining a non-sequential parallel development of application. In acquiring already-developed components and newly developing an application from the first time without an assembly, human resources of development can be utilized efficiently, thereby shortening a development period.
[24] Effects in embodiments of the invention, which are not impossible to attain in the existing active binding technology, are as follows.
[25] First, an interface definition scheme based on an object-oriented programming standard, sublating a non-standard independent scheme, is selected in realizing a component with the effect described above, thereby preventing developer s learning burden and obtaining a concise and intuitive coding.
[26] Secondly, the existing matured and verified platform technologies as ones of the latest/highest technical levels can be entirely utilized by selecting a standard component realizing scheme, without causing a compatible trouble even in a platform of new version.
[27] Thirdly, a self-sufficient and completed dependent relation can be coded statically by directly referring to a required interface optionally defined within a component, thereby preventing a performance drop causable by a dynamic binding in a runtime of client and server component objects, being regarded as an inevitable burden caused in a pre-development/post-assembly scheme. Such inventive virtual and static binding obtains the same effect from an aspect of general/actual static binding scheme and performance adapted in a component technology of related art undergoing a development and an assembly in the same process.
[28] Fourthly, a self-sufficient and completed dependency relation can be expressed, thereby being valid to utilize a dependency injection model for which generation and management of an object are entrusted to a container. In addition, a coding becomes relatively more concise by applying a dependency injection model as a latest middleware technology to a component model according to an embodiment of the invention, and efficiency in a resource use and an operating performance are more enhanced.
[29] In combining the effects described above, a component capable of being reused and freely assembled at a binary level can be obtained, including a simplified and intuitive coding, type stability, dominant execution performance etc. obtained in latest component-based technologies of a related art, accordingly the productivity of software including the whole development to maintenance and repair can greatly increase. In addition, large and small scales of enterprises as manufacturer experts are produced and a component market becomes active through a change of software production paradigm according to an embodiment of the invention, thereby improving echo system of software industry and a positive effect in the whole economy.
Brief Description of Drawings [30] The accompanying drawings illustrate example embodiments of the present invention. Example embodiments may, however, be embodied in different forms and should not be considered as limited to the embodiments set forth in the drawings: [31] FIG. IA provides a logic model of component assembly shown in a component diagram in a program design in a component-based technology according to a related art; [32] FIG. IB illustrates an actual assembly of components in a component-based technology according to a related art; [33] FIG. 2A provides a structure of component according to an embodiment of the invention; [34] FIG. 2B illustrates a structure of component file according to an embodiment of the invention; [35] FIG. 3 is a flowchart providing a component realizing step according to an embodiment of the invention; [36] FIG. 4 illustrates a component assembly according to an embodiment of the invention; [37] FIG. 5 is a flowchart providing an assembly procedure of components according to an embodiment of the invention; [38] FIG. 6 provides a dependency injection of a framework for components developed and assembled according to an embodiment of the invention; [39] FIG. 7 is a flowchart providing a dependency injection procedure between components by a framework in executing software developed according to an embodiment of the invention; [40] FIG. 8 illustrates an assembly of components according to an embodiment of the invention; [41] FIG. 9 illustrates a code of client component developed according to an embodiment of the invention; [42] FIG. 10 provides a custom attribute class according to an embodiment of the invention; [43] FIG. 11 illustrates a code of server component according to an embodiment of the invention; [44] FIG. 12 illustrates a code of server component according to an embodiment of the invention; and
[45] FIG. 13 illustrates a component layout file according to an embodiment of the invention. Best Mode for Carrying out the Invention
[46] Hereinafter, some embodiments of the invention are described with reference to the accompanying drawings. However, those skilled in the art appreciating the ideas of the present invention can easily propose other embodiments through addition, deletion, change, etc. of components within the scope of the present invention.
[47] In a development of object-oriented component-based software according to embodiments of the invention there are provided a method for implementing a complete component standardization not subordinate to other specific component, a method for assembling the components by using a glue component, and a method for treating an object generation and a dependency injection by a framework in executing an application drawn up through an assembly of the components.
[48] The method for realizing a component comprises defining a required interface type in place of drawing up a code directly depending on a provided-interface of another component when a service of the another component is required; completing a field to accept an object reference of a glue component generated in an assembly of a development component and a server component thereof, and used for intermediating for an interface disaccord thereof, and a service call code declaring an attribute as an access path to the field and using a field variable; and including the interface information into metadata.
[49] The component assembling method comprises identifying call/called methods to be coupled to each other by reading required-interface information in a client component and provided-interface information in a server component among components to be assembled; generating a project of glue component to match the interface disaccord of the components, and generating a required-interface implementation class therein; declaring an attribute and a field necessary for receiving an assignment of object reference of server component within the class, and drawing up a code calling the called method by using the declaration; drawing up a code performing an intermediation when signatures of the call/called methods disaccord from each other syntactically or semantically, and inserting it into the class; generating a glue component by compiling the glue project; and drawing up dependency information between the client/server/glue components by a component layout file according to a dependency injection framework form.
[50] A method of executing software using the dependency injection framework comprises identifying components including a glue component, relating to a service treatment by reading out a component layout file by a framework when a service is requested by a client outside the framework; generating in sequence, objects in a server-glue-client direction from a component positioned on an endmost part of a service treatment path to an uppermost component providing a method requested the outside client in the identified components, and transferring a reference thereof; and transferring an object reference of the uppermost component to the outside client.
[51] In the software development and execution method described above according to an embodiment of the invention, the basic idea and implementing method of the existing active binding technology for a software development productivity increase through a reuse of binary component developed independently is used partially by a considerable extent, but the following significant difference is provided according to an embodiment of the invention.
[52] First, in realizing a component, a definition method of a required interface, that is called a client-side interface in the existing active binding technology, and a place where the interface exists, are changed as compared with the existing one. In a general component technology, each component internally has just a provided interface type definition, and employs a scheme of internally having a code used referring to a provided interface type of a server component without a specifically defined required- interface specification or type definition.
[53] Meanwhile, in the existing active binding technology, a developer independently decides an optional signature for a service to be request from each component to another component, and uses the signature for a coding, and this is included into metadata by specifying the required interface through a function of custom attribute etc. The specification of required-interface included into the metadata of client component is generated as a glue component object and then becomes a call-possible type. Accordingly, each component except glue component, of the existing active binding technology-base, has built-in provided-interface specification and required- interface specification in metadata.
[54] Meanwhile, in an embodiment of the invention, a developer independently defines and internally has a required interface type, and a method of the interface is used for a service call code, and its specification is automatically generated in metadata in compiling. Each component except glue component, in an embodiment of the invention, has a built-in required-interface type in a code, and has a built-in provided- interface specification and required-interface specification in metadata.
[55] When such independent required-interface keeping and type are changed, a relatively great change is naturally caused in a programming pattern, that is, in detail, influencing on an aspect of reuse of binary component, a limit in a sequential limit of a de- velopment, coding and learning burden, use of framework, execution performance etc. This is described more in detail in the inventive effect.
[56] Secondly, in a component assembly method, a definition of required- interface type within glue component is omitted according to a change of component realizing method, and a dependency injection function of framework can be utilized through a difference of the component realizing method, thereby providing a change of adding a procedure of drawing up a component layout file to allow the injection function. However, the basic scheme of assembling a client component and a server component by intermediating between different interfaces through glue component is maintained intact, and a difference of assembly burden from the omission and addition of procedures may be slight.
[57] Thirdly, in a software execution method, a use for a dependency injection function of framework is added, which has not been considered in the existing active binding technology. This change can be acquired by defining a required interface type within each component as described above with reference to the change of component realizing method, and a positive influence in the combination with a latest middleware technology is also described in the inventive effect.
[58] Software development method and execution method according to embodiments of the invention are described in detail as follows, referring to the accompanying drawings.
[59] FIG. IA provides a logic model of component assembly shown in a component diagram in designing an application of a component-based technology according to a related art. As illustrated in the drawing, a service is given and received through a link between a required interface 111 of a client component 110 and a provided interface
121 of a server component 120.
[60] However, in actually implementing a dependency relation between components through a commercial component technology, a method of a server component object
122 is called by using a type of provided interface 121 built in a server component 120, as shown in the physical model of FIG. IB, in place of use that the client component 110 independently defines the required interface. What the dependency relation between components in the actual programming environment cannot has no choice but to implement as shown in FIG. IB, is from the reason why the existing commercial component technologies valuing a type stability regard the interface as a type and thus do not allow an interface having the same identifier (Full Name) to be defined on physically one place or more and do not allow to assign a reference of a specific interface implementation object to a variable of an interface having another identifier. As a result, the client component realized in such scheme has a built-in code dependent to an interface that is defined outside, and is thus statically, solidly combined with the server component as shown in FIG. IB, and cannot be independently reused without a source code correction.
[61] FIG. 2A illustrates a structure of component according to an embodiment of the invention. In a component 210, development and assembly of a component are divided as respective separate processes, and on the principle of not having to include any assumption or meta information, code for an assembly with other specific component so as to draw up a new software by acquiring/assembling components existing as already-developed and independent component, the component 210 includes inside itself not only a provided interface type 221 but also an independently-defined required-interface type 212 as shown in FIG. 2A. Accordingly, when a service of other component is required, the component 210 completes a service call code by using the required interface type 221 built-in itself without depending on the provided interface of its component.
[62] FIG. 2B illustrates a structure of component file generated when realizing a component got by extending a .NET component (assembly) according to an embodiment of the invention, on a .NET framework, .NET Framework, as one of present representative object-oriented component platforms. A .NET component file according to a related art comprises a manifest 310 as metadata of a component level including developer information, identifier of dependent component, version number etc.; type metadata 320 including information 321 for a type of class, the provided interface 221 realized by component, etc.; a compiled execution code 330; and a resource 340 such as a bit map, string. Meanwhile, a component provided by extending a .NET component according to an embodiment of the invention further comprises information 322 of a required interface type 212 in the type metadata 320.
[63] FIG. 3 is a flowchart for a development procedure Sl of developing a component according to an embodiment of the invention. In a step S 11 of developing a component according to an object-oriented component-based technology of a related art, when a service of other (server) component is required in a step S 12, a required interface type is defined in a step S 13 within a development component instead of depending on a provided interface defined in its server component. Here, a field to accept a reference of glue component object and an attribute as a path accessing to the field are declared in a class including the service call code in a step S 14, the glue component object being generated when the development component and the server component are assembled and being used to intermediate for an interface disaccord between two components. The service call code is completed by using a variable of the declared field in a step S 15. When a code drawn up through such steps is compiled, a component of file structure like in FIG. 2B that required-interface information 323 is included in the type metadata 320, is generated in a step S 16. [64] On the other hand, in the step S 13 of defining the required interface type according to the procedure of FIG. 3, a note indicating the required interface is added to the type definition by using a function of custom attribute etc., thereby simply discriminating information of the provided interface and the required interface included in metadata.
[65] In the step S 15 of drawing up the service call code with the procedure of FIG. 3, when draw-up code constitutes a method belonging to the provided interface of the development component, a corresponding method adds as a note, names of methods belonging to dependent required- interface to the same method in a call sequence by using a function of the custom attribute etc. to perform a service of the corresponding method itself, thereby including protocol information indicating an interaction between components into the metadata and thus supporting an interaction realization between components in a later assembly of components without error.
[66] Furthermore, in the steps S 13 of defining the required interface and in the step S 15 of drawing up the service call code in the steps of FIG. 3, signature syntax note and semantic action note with a description of invariant, pre-condition and post-condition are added to each interface and method by using the function of custom attribute etc., and then are included into metadata, thereby supporting a precise assembly target method identification and a precise intermediate code write.
[67] FIG. 4 illustrates a structure of two independently developed components assembled with each other as a relation of client and server according to an embodiment of the invention. In an embodiment of the invention, on the principle the component assembly should be performed outside a component without any correction of component source code, a glue class 231 realizing a required interface 212 within a glue component 230 is generated by using metadata 322 and metadata 321, and intermediates for a call/called method between components 210 and 220 assembled with each other through the glue class 231, the metadata 322 being for a required interface type built-in the client component 210, and the metadata 321 being for a provided interface type built in the server component 220.
[68] FIG. 5 is a flowchart for an assembly procedure S2 of components developed according to an embodiment of the invention. The procedure is as follows. A call method and a called method to be coupled to each other are identified in a step S21 by reading out required- interface information from metadata of client component, and provided- interface information from metadata of server component among two components to be assembled. Subsequently, a project of glue component to match an interface disaccord of the two components is generated in a step S22, and a class to implement a required interface type including the identified call method within a glue project is generated in a step S23. A field to accept an object reference of server component and an attribute as an access path of the field are declared within the generated class in a step S24. For example, when signatures of the call method and the called method disaccord with each other in syntax or semantically, a code for an intermediation thereof is drawn up and is inserted into the class in a step S25. A code calling the called method of the server component is drawn up in a step S26 by using a variable of the field declared in the step S24. When the glue project is completed through the steps described above, a glue component is generated by compiling it in a step S27. Dependency information between client, server and glue component is drawn up as a component layout file according to a form regularized in a framework to execute a dependency injection in executing a later-completed application after the generation of glue component, in a step S28.
[69] On the other hand, when protocol metadata for the called method on which the call method depends, is added in the step S21 of identifying the call method and the called method in the procedure of FIG. 5, methods belonging to the required interface are represented in a call sequence on the basis of the step S21, thereby supporting a realization of interaction between components in the component assembly without error.
[70] FIG. 6 provides a scheme a framework injects a dependency in a runtime, for components developed and assembled according to an embodiment of the invention. In this model, an assembly module 411 of a framework 410 individually generates an object 223 of server component 220, an object 231 of glue component 230, and an object 213 of client component 210 and injects in sequence a reference of the server component object to an attribute of glue component and a reference of the glue component object to an attribute of the client component object, thereby obtaining an interaction of independently-developed components.
[71] FIG. 7 is a flowchart providing a procedure S3 of injecting a dependency between components by a framework in executing software developed according to an embodiment of the invention. The procedure is as follows. When a client outside the framework of a user interface etc. requests a service in a step S31, the framework reads out a component layout file and identifies all components, including glue component, relating to a request service treatment in a step S32. Subsequently, an endmost component not depending on other component among the identified components is determined as a server component, and a component calling a method of its component is determined as a client component, and a glue component for intermediating between the components is identified in a step S33. Objects of identified client, server and glue component are generated in a step S34. A server object reference is transferred to an attribute of glue object in a step S35. A glue object reference is transferred to an attribute of client object in a step S36. It is checked in a step S37 that a client object having received the glue object reference is an uppermost component providing a service method requested by an outside client, and when not the uppermost component, a new server-glue-client component relation with this component as a server component is identified in a step S38, and the object reference transfer procedure of S34 to S36 is repeated. When such dependency injection process reaches the uppermost component, a reference of the uppermost component object is transferred to outside client in a step S39.
[72] On the other hand, glue component in an embodiment is basically in charge of an intermediation for an interface disaccord between client component and server component, but all call method/called-method between components are got through the glue component, the glue component may perform a middleware service, i.e., security, transaction, monitoring etc., provided by the framework referring to setting information of the framework immediately before and after the glue component calls a method of server component. In this method an already-statically compiled glue component is used unlike a middleware technology of a related art for which in a program execution, a proxy of server component is dynamically generated and a framework is referred immediately before and after a method call, thereby substantially reducing a burden for a performance.
[73] An embodiment of the invention for software development method and execution method applied to a .NET framework of Microsoft Co. as one of the existing representative development platforms, is described in detail as follows.
[74] In the embodiment described above, with the model of a hotel reservation system of
CBD method (UML Components: A Simple Process for Specifying Component-Based Software. Addison-Wesley, 2001) celebrated, of Cheeseman-Daniel, client component and server component with different interfaces are realized according to an embodiment, and are assembled through glue component matching the different interfaces, and then a component layout file to commit an object generation of server, glue and client components and a dependency injection between them to the framework, is drawn up. These procedures are described in detail referring to the accompanying drawing.
[75] FIG. 8 illustrates a logic model of interaction in client component Reserva- tionSystem, glue component GlueComponent and server component HotelMgr realized and assembled, according to an embodiment of the invention.
[76] FIG. 9 illustrates a code portion of client component ReservationSystem developed according to an embodiment of the invention. The code comprises a provided- interface IMakeReservation 221, a client object ReservationObject 213 realizing the provided- interface, and a required-interface IHotelHandling 212 used by the object. Here, the client object 213 implements (214) a member method MakeReservation of the provided- interface 221, and in this step, when the need for a use of another component occurs, a developer optionally defines a required interface type 212, and the interface is realized by glue component generated in a coming assembly work. The client object should call the member method of the required interface realized by glue component, a field 215 to receive a reference of glue component object from framework and an attribute 216 as an access path to the field should be declared. Then, a code 217 calling a called method to be implemented in glue component is drawn up by using a field variable. Here, a method BookRoom of the required interface 212 to be implemented in the glue component is called by using a variable htHandler. On the other hand, a note 218 indicating the required interface is added to an upper part of the required interface 212 is added by using a custom attribute to be easy to discriminate from provided-interface information within metadata.
[77] FIG. 10 indicates a code of custom attribute class InterfaceAttribute to be used in adding the required interface note 218 of FIG. 9. That is, in compiling a content of the note is included into the metadata by implementing an optional custom attribute class succeeding to a System.Attribute class and adding the note on the basis of that.
[78] FIG. 11 illustrates a portion of code of server component HotelMgr according to an embodiment of the invention. This code is comprised of provided interface IHotelMgr 221 and server object HotelMgrObject 223 realizing the provided interface. A signature for a member method RentRoom is defined in the provided interface 221, and the member method is implemented in the server object 223.
[79] FIG. 12 illustrates a portion of code of a glue component GlueComponent to intermediate for different interfaces of server component HotelMgr of client component ReservationSystem realized respectively, independently and to assemble the components according to an embodiment of the invention. A class of the glue component realizes the required interface of the client component, and in FIG. 11, this corresponds to glue object 231 of the name of GlueObject. This object may be again largely classified as a field declaration unit 23 to receive a reference of server component object from framework, an attribute declaration unit 233 as an access path to the field, and a method implementation unit 235 implementing a member method belonging to a required interface of client component. An assembler draws up a code 236 calling a called method of the server component in the method implementation 235, and at this time, when signatures of the call method and the called method are different from each other, an intermediation operation therefor should be performed. In the embodiment, signatures of the call method BookRoom and the called method RentRoom almost accord mutually, but a second parameter type of the call method is CustomerDetails, meanwhile a parameter type of its corresponding called method is Custld, that is, mutually different status is provided as the type that CustomerDetails includes Custld. As a solution to such signature disaccord, the method call code 236 transfers cus.custid required by the server component instead of cus received from the client component.
[80] FIG. 13 illustrates a component layout file indicating to generate respective server, glue and client component objects by framework in executing components assembled in an embodiment of the invention and to inject a dependency between the objects. The framework generates a client component object ReservationObject, a glue component object GlueObject, a server component object HotelMgr Object according to dependency information of the file, and then performs an operation of injecting a server object reference into an attribute HotelMgr of glue object, and a glue object reference into an attribute HotelHandling of client object.
[81] Although the embodiments of the present invention have been described in the above, they are only examples and are not intended to limit the present invention. It may be appreciated by those skilled in the art that various modifications and applications may be made without departing from the essential feature of the present invention. Differences associated with this modification and application should be interpreted as being included in the scope of the present invention defined in accompanying claims.

Claims

Claims
[1] A method for developing a software in a component developing method including defining an independent required interface in place of drawing up a code depending on a provided interface of component when a development component needs to call a service of other component, to ensure components to be reused in developing a new software, the components being independently developed in an object-oriented component technology with different interface signatures and being assembled in a binary level without a source code correction; completing a service call code by using the required interface; and including information of the required interface into metadata, the method comprising:
(a) defining the required interface as a standard interface type in the defining of the independent required interface;
(b) adding a note indicating the required interface in the type by using a user defined metadata facility after the definition (a) of the required interface type to discriminate the required interface from the provided interface in a subsequent component assembly;
(c) in the completing of the service call code by using the independently defined required interface, (cl) declaring a field to accept a reference of a glue component object and an attribute to access to the field outside, in a class including the code, the glue component object being generated in an assembly of a development component and a component on which the development component depends, and being used for an intermediation for an interface disaccord between two components, and (c2) completing the service call code by using a variable of the reference acceptance field; and
(d) automatically including information of the required interface defined as the standard interface type, into metadata through a compiler, in the including of the independently defined required-interface information into the metadata of the development component.
[2] The method of claim 1, wherein the component developing method further comprises including protocol information indicating an interaction between the components into the metadata, by adding in a call sequence, methods names of dependent required-interface as a note to a method through the user definition metadata facility, to perform a service of method itself, when the code drawn up in (c) constitutes the method belonging to the provided interface of the development component.
[3] The method of claim 1, wherein the component development method further comprises adding signature syntax note and semantic action note with a description of invariant, pre-condition and post-condition to the respective interface types and methods by using the user definition metadata facility, to support a precise assembly target method identification and a definite intermediate code write in a subsequent component assembly, and thus including the notes into the metadata.
[4] A method of developing software in a component assembly to draw up new software by reusing components developed in the method of the claim 1, the method comprising:
(a) identifying methods to be coupled to mutually by reading out required- interface information in metadata of a client component and provided-interface information in metadata of a server component among two components to be assembled in a call/called method relation by using a reflection function;
(b) generating a project of glue component to match an interface disaccord of the client component and the server component, and implementing a required- interface implementation class of the client component including the identified call method in the project;
(c) declaring a field to accept a reference of a server component object within the class of the project, and an attribute to access to the field, and drawing up a code calling a called method of the server component by using a variable of the reference acceptance field;
(d) drawing up a code for an intermediation when signatures of the call/called methods disaccord from each other syntactically or semantically in drawing up the method call code, and inserting it into the class of the project;
(e) generating a glue component by compiling the project; and
(f) drawing up dependency information between the client, server and glue components by a component layout file according to a dependency injection framework form.
[5] The method of claim 4, wherein the identifying (a) of the methods further comprises providing in sequence, methods of the required interface on which the method depends, in the protocol metadata added in the method of the claim 2 when a specific method belonging to the provided interface of any component is selected, to implement an interaction between components in a component assembly without error.
[6] A method of executing software by using a framework with a dependency injection function, the software being drawn up in the method of the claim 4, the method comprising:
(a) identifying glue components and a series of components relating to a cor- responding service treatment by reading out a component layout file by the framework when a service is requested by a client outside the framework;
(b) determining an endmost component among the identified components, as a server component, and a component calling a method of the endmost component, as a client component, and indentifying the glue component for an intermediation of an interface between the two components;
(c) performing a dependency injection by generating an object of the server component and an object of the glue component and assigning a reference of the server component object to an attribute of the glue component object;
(d) performing a dependency injection by generating an object of the client component and assigning a reference of the glue component object to an attribute of the client component object;
(e) when the client component is not an uppermost component providing a service method requested by an outside client among the components identified in the performing (a) of the dependency injection, repeating the object generation and dependency injection process of the performing (c) of the dependency injection and the performing (d) of the dependency injection until reaching the uppermost component by identifying new server, glue and client components with the component as a server component; and
(f) transferring a reference of the uppermost component object to the outside client.
[7] The method of claim 6, further comprising using the glue component for intermediating for all call/called methods between components, in place of using a proxy dynamically generated as a place calling a middleware service provided by a framework, causing a performance burden.
PCT/KR2008/006566 2007-11-07 2008-11-07 A method for software development and operation based on component reuse and dependency injection WO2009061146A2 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR20070113441A KR100828302B1 (en) 2007-11-07 2007-11-07 Software development and execution method using component reuse and dependency injection technology
KR10-2007-0113441 2007-11-07

Publications (2)

Publication Number Publication Date
WO2009061146A2 true WO2009061146A2 (en) 2009-05-14
WO2009061146A3 WO2009061146A3 (en) 2009-07-02

Family

ID=39090963

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2008/006566 WO2009061146A2 (en) 2007-11-07 2008-11-07 A method for software development and operation based on component reuse and dependency injection

Country Status (2)

Country Link
KR (1) KR100828302B1 (en)
WO (1) WO2009061146A2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105897728A (en) * 2016-04-27 2016-08-24 江苏警官学院 Anti-virus system based on SDN (Software Defined Network)
CN108255495A (en) * 2018-01-31 2018-07-06 中国银行股份有限公司 A kind of modularization method and system based on Mediator
CN111158698A (en) * 2019-12-30 2020-05-15 小船出海教育科技(北京)有限公司 Modular communication device and method under Android platform
CN113031933A (en) * 2021-03-22 2021-06-25 北京达佳互联信息技术有限公司 Data processing method, data processing apparatus, electronic device, storage medium, and program product
US11048485B2 (en) 2018-12-07 2021-06-29 International Business Machines Corporation User interface code re-use based upon machine learning of design documents

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8065714B2 (en) * 2008-09-12 2011-11-22 Hytrust, Inc. Methods and systems for securely managing virtualization platform
US8166552B2 (en) 2008-09-12 2012-04-24 Hytrust, Inc. Adaptive configuration management system
KR101101519B1 (en) * 2009-11-03 2012-01-04 정안모 Software development system and method using ontology based component assembly technology
KR101418390B1 (en) * 2012-10-18 2014-07-11 이지케어텍(주) system for remotely debugging an application programming and controlling method therefor
US20170230419A1 (en) 2016-02-08 2017-08-10 Hytrust, Inc. Harmonized governance system for heterogeneous agile information technology environments
KR102179890B1 (en) * 2017-12-07 2020-11-17 최윤진 Systems for data collection and analysis
CN110471651B (en) * 2019-07-31 2024-06-14 北京速通科技有限公司 Method and server for realizing control inversion based on C++
CN117349185B (en) * 2023-12-04 2024-02-23 杭银消费金融股份有限公司 System testing method based on interface strength dependence grading

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004099896A2 (en) * 2003-05-12 2004-11-18 An Mo Jeong Method and system of developing a software with utilizing extented metadata of component under component-based development environment
US20050005261A1 (en) * 2003-07-02 2005-01-06 Severin William B. Component integration engine

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20030044959A (en) * 2003-05-12 2003-06-09 정안모 A Method for Implementing and Assembling Software Components using Client-Side Metadata and Glue Codes

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004099896A2 (en) * 2003-05-12 2004-11-18 An Mo Jeong Method and system of developing a software with utilizing extented metadata of component under component-based development environment
US20050005261A1 (en) * 2003-07-02 2005-01-06 Severin William B. Component integration engine

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
'KISS(Korean Institute of Information Scientists and Engineers) 2007 Korea Computer Congress', vol. 34, June 2007 article LIM, Y. ET AL.: 'A Component Model Supporting the Assembly of Independently Developed Binary Components', pages 138 - 142 *
SCHEBEN,U. ET AL.: 'Concepts and Techniques simplifying the Assembly Process for Component Instances.' ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE vol. 82, no. 5, 2003, pages 115 - 131 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105897728A (en) * 2016-04-27 2016-08-24 江苏警官学院 Anti-virus system based on SDN (Software Defined Network)
CN105897728B (en) * 2016-04-27 2022-06-17 江苏警官学院 Anti-virus system based on SDN
CN108255495A (en) * 2018-01-31 2018-07-06 中国银行股份有限公司 A kind of modularization method and system based on Mediator
US11048485B2 (en) 2018-12-07 2021-06-29 International Business Machines Corporation User interface code re-use based upon machine learning of design documents
CN111158698A (en) * 2019-12-30 2020-05-15 小船出海教育科技(北京)有限公司 Modular communication device and method under Android platform
CN111158698B (en) * 2019-12-30 2024-03-26 北京百舸飞驰科技有限公司 Modularized communication device and method under Android platform
CN113031933A (en) * 2021-03-22 2021-06-25 北京达佳互联信息技术有限公司 Data processing method, data processing apparatus, electronic device, storage medium, and program product
CN113031933B (en) * 2021-03-22 2024-01-09 北京达佳互联信息技术有限公司 Data processing method, device, electronic equipment, storage medium and program product

Also Published As

Publication number Publication date
WO2009061146A3 (en) 2009-07-02
KR20070112755A (en) 2007-11-27
KR100828302B1 (en) 2008-05-08

Similar Documents

Publication Publication Date Title
WO2009061146A2 (en) A method for software development and operation based on component reuse and dependency injection
Berger et al. The state of adoption and the challenges of systematic variability management in industry
Almonaies et al. Legacy system evolution towards service-oriented architecture
Gacek et al. Implementing product line variabilities
Goncalves Beginning Java EE 6 with GlassFish 3
Gorton Essential software architecture
CA2777443C (en) Automated enterprise software development
Beugnard et al. Making components contract aware
US9170787B2 (en) Componentization of compiler functionality
US20110179280A1 (en) Software development and distribution workflow employing meta-object time stamping
Liao et al. Toward a service platform for developing smart contracts on blockchain in bdd and tdd styles
CN101820428A (en) Composite service optimizing method and device based on protocol composition mechanism
CN103069385A (en) Dynamically loading graph-based computations
US8239828B2 (en) Method of recovering from software failures using replanning
Stevens Connecting software build with maintaining consistency between models: towards sound, optimal, and flexible building from megamodels
Pop et al. Comparison of component frameworks for real-time embedded systems
Lohmann et al. A model-driven approach to discovery, testing and monitoring of web services
WO2006009287A1 (en) Automatic converting program and program conversion server
Buisson et al. Safe reconfiguration of Coqcots and Pycots components
Sneed et al. Linking legacy services to the business process model
Mateos et al. EasyFJP: Providing hybrid parallelism as a concern for divide and conquer Java applications
Raja et al. Domain specific languages
Gazzarri et al. Supporting structured parallel program design, development and tuning in FastFlow
CN114816419A (en) Engineering compiling method and device
JP2000347875A (en) File transplanting technique

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 08846344

Country of ref document: EP

Kind code of ref document: A2

NENP Non-entry into the national phase in:

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC

122 Ep: pct application non-entry in european phase

Ref document number: 08846344

Country of ref document: EP

Kind code of ref document: A2