12.07.2015 Views

Migration of a Chosen Architectural Pattern to Service Oriented ...

Migration of a Chosen Architectural Pattern to Service Oriented ...

Migration of a Chosen Architectural Pattern to Service Oriented ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 5. Guidelines 136The migration process identified few technology related issues affecting themigration. The issues were following:1. Encapsulation – The project had very poor implementation that even didnot include encapsulation <strong>of</strong> properties <strong>of</strong> classes.All the properties were accessiblevia ..Lack <strong>of</strong> access methods (get /set)did not allow migrate classes as there were. Additional implementation <strong>of</strong>access methods was enforced by openESB. In fact this is very minor issuebecause <strong>to</strong>day Integrated Development Environments (IDE) allows generatingaccess methods au<strong>to</strong>matically. The IDEs allow also <strong>to</strong> identify placesin the code where a property is used explicitly. Both features helped <strong>to</strong>refac<strong>to</strong>r code in required scope.2. Redundant operations – Connection <strong>to</strong> a service requires creation <strong>of</strong> a serviceclient in the application. Netbeans supports this activity by generation<strong>of</strong> stubs <strong>of</strong> services, ports, connections, operations and messages stubs au<strong>to</strong>matically.IDE will generate only stubs <strong>of</strong> classes that are inputs foroperations or that are building blocks <strong>of</strong> operation input message. So farso good, but the problem arises in special circumstances as it was withmigrated project, namely one <strong>of</strong> the classes extended the other (CrComputerextends CrAsset) and this sub class (CrComputer) was neither a part<strong>of</strong> any existing operation <strong>of</strong> Canonical Resource service nor a part <strong>of</strong> anymessage accepted by this service. So when a user wanted <strong>to</strong> pass CrComputerobject through an operation which takes CrAsset as an argument(what is possible thanks <strong>to</strong> polymorphism), it was impossible because astub for CrComputer was not created; consequently a user has no possibility<strong>to</strong> use CrComputer stub at all. Creation <strong>of</strong> CrComputer stub manuallydoes not work either because the IDE recognizes changes and before run, itrebuilds generated classes, besides there is no guaranty that au<strong>to</strong>generatedclient does not depend on any “behind the scene” configuration files. Theonly possible solution was <strong>to</strong> create a “doing nothing” operation that takesCrComputer as an input- this operation ensures that the missing stub isgenerated properly.3. Dependency refresh – IDE generates and refreshes au<strong>to</strong>matically dependenciescreated during project development, at least in theory. It appearedseveral times that a part <strong>of</strong> removed dependency was left somewhere in aWSDL document, configuration file or somewhere else. Each case causedhard <strong>to</strong> find problems.4. Schema inclusion – XML schema allows <strong>to</strong> include other schemas from thesame or different namespace and use imported elements/complex types asown. The problem arises when a schema that imports other schemas isused in a WSDL document, this in turn is an input for au<strong>to</strong>matic client

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!