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 ...

12.07.2015 Views

Chapter 5. Guidelines 130layers. View becomes View Layer, Controller becomes Controller Layer andModel becomes Model Layer. Connections between particular componentsalso have to be reorganized in order to minimize dependencies (coupling)between layers. Dependency reduction can be achieved by removing registrationmechanism from Model. This change removes notification functionalitywhat not always is intended.Lack of the mechanism eliminates Model ⇾ View and Model ⇾ Controllerdependencies. This change also eliminates transitive dependencies. Additionallythe View ⇾ Model dependency needs to be removed In case of themigrated project.Output projects: Frontend, ProncessAbstractionService and Basic Ser- vices.The Frontend project is meant to contain all GUI related code. Pro- cess-AbstractionService is meant to contain BPEL. Basic Services project is atemporary project that is meant to contain code that cannot be copied toany of the existing services. This project will be deleted at the end. Thecode from this project will be further transformed into services.2. Chose main communication protocolApplied SOA pattern: Canonical ProtocolApplication Project meant for adaptation is not a mission critical system.The system is also used only within university by very limited group ofpeople and any external user (non-university IP) does not have any accessto the application. Therefore a standard HTTP plus SOAP messagingis applied for project migration. Besides, technologies like RosettaNet orWebShare tie architects to vendors, while SOAP and HTTP are vendorindependent.Output: Communication protocol: SOAP over http3. Unify used schemasApplied SOA pattern: Canonical SchemaApplication: In order to simplify schema maintenance following name notationis used:(a) name of a namespace have to refer to the name of lower layer whennamespace contains definitions of information used in communicationbetween two layers. For instance information used in communicationbetween Process Abstraction and Canonical Resource will be placedin a namespace referring to Canonical Resource.(b) schema is divided into a set of sub–schemas. Each of sub–schemas definesone “main” complex type and a set of related types. In case of AssetDAO,the main complex type is Asset and related types are: Com-

Chapter 5. Guidelines 131puter (extends Asset), Part (composes Asset), AssetNumber (identifiesAsset). The name of such schema is defined as.xsd. For instanceresourceAsset.xsd.Output: XML schema. The schema is located in ProcessAbstractionService.The document will contain definition of arguments of service’s methods andtheir return types.4. Unify PoliciesApplied SOA pattern: Policy CentralisationApplication: Available documentation does not require special security protocols.Application of policies is a complex task. See [44] for more information.Output: No new elements are introduced in case of this project.5. Identify and wrap into services all coarse grained utilitiesApplied SOA pattern: Utility AbstractionApplication: Presentation Layer has only GUI related code, while Controllerexcept process flow code has some code responsible for maintenanceof temporary assets. Code of Model also do not provide any “utility” code.The project does not have utility related code, therefore application of thisguideline in case of TRWAM will not introduce changes to the target architecture.Output: No new services are implemented in case of this project. If aUtility Abstraction related code would exist; it would be wrapped into abasic service.6. Identify and encapsulate access to any external resourceApplied SOA pattern: Canonical ResourcesApplication: In case of MVC, the only place where an access to Resourceis allowed is Model. Therefore any resource-related parts of Model shouldbe identified. Analysis of TRWAM project shows only two resource relatedclasses. The first, AbstractDAO defines general CRUD operations. Thesecond is AssetDAO (SrodkiTrwaleDAO) which executes asset related operationson database. AssetDAO becomes a service providing asset-relateddatabase operations.Output: Two projects are created. The first is crAssetService providingasset related operations like addAsset (adds a new asset) and getCurrent-MaxNumber (returns max id of an asset). There is also removeAsset operationbut it is only a stub that takes crComputer as an argument. This

Chapter 5. Guidelines 131puter (extends Asset), Part (composes Asset), AssetNumber (identifiesAsset). The name <strong>of</strong> such schema is defined as.xsd. For instanceresourceAsset.xsd.Output: XML schema. The schema is located in ProcessAbstraction<strong>Service</strong>.The document will contain definition <strong>of</strong> arguments <strong>of</strong> service’s methods andtheir return types.4. Unify PoliciesApplied SOA pattern: Policy CentralisationApplication: Available documentation does not require special security pro<strong>to</strong>cols.Application <strong>of</strong> policies is a complex task. See [44] for more information.Output: No new elements are introduced in case <strong>of</strong> this project.5. Identify and wrap in<strong>to</strong> services all coarse grained utilitiesApplied SOA pattern: Utility AbstractionApplication: Presentation Layer has only GUI related code, while Controllerexcept process flow code has some code responsible for maintenance<strong>of</strong> temporary assets. Code <strong>of</strong> Model also do not provide any “utility” code.The project does not have utility related code, therefore application <strong>of</strong> thisguideline in case <strong>of</strong> TRWAM will not introduce changes <strong>to</strong> the target architecture.Output: No new services are implemented in case <strong>of</strong> this project. If aUtility Abstraction related code would exist; it would be wrapped in<strong>to</strong> abasic service.6. Identify and encapsulate access <strong>to</strong> any external resourceApplied SOA pattern: Canonical ResourcesApplication: In case <strong>of</strong> MVC, the only place where an access <strong>to</strong> Resourceis allowed is Model. Therefore any resource-related parts <strong>of</strong> Model shouldbe identified. Analysis <strong>of</strong> TRWAM project shows only two resource relatedclasses. The first, AbstractDAO defines general CRUD operations. Thesecond is AssetDAO (SrodkiTrwaleDAO) which executes asset related operationson database. AssetDAO becomes a service providing asset-relateddatabase operations.Output: Two projects are created. The first is crAsset<strong>Service</strong> providingasset related operations like addAsset (adds a new asset) and getCurrent-MaxNumber (returns max id <strong>of</strong> an asset). There is also removeAsset operationbut it is only a stub that takes crComputer as an argument. This

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

Saved successfully!

Ooh no, something went wrong!