Architecture of Spago, the open source Java Enterprise Framework for the development of web and multichannel applications in SOA environments

Spago, a Java Enterprise framework, is a reusable, semi-complete infrastructure that can be customized to produce vertical applications. Designed with the aim to support mission-critical projects, it is a framework providing multi-channel services towards external infrastructures.

Java Enterprise Framework

A Java Enterprise Framework is a reusable, semi-complete infrastructure that can be specialized to produce custom applications. It doesn't include users' functionalities, but it is a platform for developing distributed multi-tier applications, based on modular components. The framework provides an architectural model, a functional model and a development model. It provides some services for generic users' applications (user-interface interaction, data store, parameters configuration, transactional processes, multichannel publishing), but it also provides development guidelines, standards, methodologies and tools for development and maintenance.
Main benefits of using a framework are:

  • Modularity: stable interfaces hide code implementation
  • Reuse: a framework includes stable interfaces that help build generic components, reusable in different applications
  • Extensibility: a framework stable interface can be extended through applications using "hook" methods.

Spago Framework

Spago framework implements a Model-View-Controller architectural pattern and supports client interaction via different channels/protocols. Front Controllers act with the following collaborative objects:

  • Adapter: it takes responsibility for acquiring request data from a specific channel, transforming request parameters into a format compliant with the Model module, and for choosing the correct view. It also makes the binding of conversational context in the specific container
  • Dispatcher: it takes responsibility for identifying one of the supported ways to carry out business logic, and for locating the right coordinator
  • Coordinator: it takes responsibility for coordinating business logic execution
  • Business Factory: it takes responsibility for retrieving rights references to business objects cooperating in the request execution.

architecture.jpg

Available adapters are:
  • AdapterHTTP (HTML/HTTP): a servlet to manage client HTTP requests, arising from a browser or a WAP device
  • AdapterSOAP (XML/HTTP): it is a component, stored as SOAP end-point, to manage requests arising from a SOAP client
  • AdapterEJB (XML/IOOP): it is a statefull session bean to manage requests arising from IIOP client
  • AdapterJMS (XML/JMS): it is a message driven bean to manage requests sent as JMS messages.

The framework allows to choose the correct view according to the channel, the request parameters and the application state. Spago can manage views whose information are published via JSP and servlet (as usual for web channels), but it can also apply XML/XSLT transformation of business logic data. This is the only publishing method that can be applied to all channels. Dispatchers are stored in Spago through a plug-in mechanism and are one of the main customizable elements of the framework.

You can configure the Security Manager in the Controller module to verify execution priviledges of the applicative logic of a business object. Grant checking is available for all business objects or only for some of them.
security.jpg

Modules dispatching

Services implementation is very flexible with a high degree of coding reuse. It introduces the page concept as a logic composition of modules: many cooperating business objects interact to service a request. A graph defines modules cooperation logic and the used parameters.

Presentation logic

Data produced by the business logic are redirected to the View module, which manages the publication according to the request. When no publisher is configured for a specific channel request, the framework response to the client is in XML format. This allows you to test the correct execution of business logic in the development phase, before the View module is available. You can use one or more stylesheets for XML data description for all available channels. As for web and WAP channels, you can publish contents using JSP or servlets. The framework provides you with some custom-tags for rendering specific data, such as objects forming a paging list, a detail of one of these objects or a user's messages display.

Copyright 2016 Engineering Ingegneria Informatica S.p.A. - VAT Number: 05724831002 - Technical Innovation & Research Division

Powered by: xwiki - wordpress - jira - jforum - jenkins