General Information

What is Spine Framework?
It is a Java/J2EE API with various features. Please see our product overview pages for more information.
Who should use Spine Framework?

Anyone who wishes to build a transposable Java/J2EE application and wants to use the dependency injection capabilities inherent in the application programming interface.

Spine Framework is especially useful to Java/J2EE developers who wish to leverage the technologies available in todays market and still be able to switch application logic objects from configuration.The framework defines an architechure that makes it possible to build for future technology while using present day technology.

Download and Install

How can I obtain Spine Framework?
You may download the latest version of the Spine Framework here.
What do I need to use Spine Framework?
System requirements are described in the release notes.
System requirements are any computer with a processor speed of at least 250 MHz, 250 MB of RAM. 10 MB of free disk space, and one of the following operating systems: Windows 98/2000/XP, Mac OSX, and all variants of unix
You must have JDK1.5 or higher installed and an application server with database access installed if planning to develop web driven applications
What software libraries do I need to have on my system to use Spine?
You will usually need all the libraries packaged in the Spine/lib/ directory of the distribution to integrate the framework with your application. Some of this libraries may already be available to your application, but in certain cases you may need to download some of the libraries below:
  • For Hibernate integration with Spine, you will require all the libraries in the hibernate-distribution/lib directory, please note that Spine's in built Hibernate objects are only compartible with Hibernate3.0 or higher.
  • For Struts integration with Spine,you will require all the libraries in the struts-distribution/lib directory.
How do I install Spine Framework?
Installation instructions are available here.
How do I upgrade from an older version of Spine Framework?
Installation instructions are available here.

Getting Started

What is J2SE and J2EE?
It means java 2 standard edition and Java 2 enterprise edition. For additional technical terms, see the glossary.
How do I do integrate Spine with my Web application
Please read the quick start guide for details on how to integrate spine with your web application.
How do I do initialize the Spine Framework
Please read the initialization section in the user guide for details on how to initialize Spine within your application.
How do I configure the Framework to recognize my classes
Please read the configuration section in the  user guide for details on how to configure Spine within your application.

Features

What Extensible features does the framework offer?
Spine defines various classes and interfaces which are expected to be implemented so as to be recognized by the framework.

Spine is designed to accomodate future technology by virtue of its specifying interfaces which can easily be integrated into whatever object you wish your application to use for processing business logic or accessing data repositories.

What configuration features are available to the framework?
Spine allows the developer to define the process flow for application calls via configuration. It defines process flows which the developer can implement and specify via configuration making it possible for a project to decouple objects by configuration.

The framework also lets the developer create and define proxies to known and yet unknown data services or systems by proposing a simplified pattern which can be made concrete at configuration time.

All configuration files in Spine are defined using XML with schemas and DTDs available from this site and initialization features available to allow the client developer add java properties files for localization of messages.

How can spine recognize my user defined variables at initialization?

Spine provides a configuration file specifically for initialization (spine-init.xml), client developers are advised to define/implement a SpinePlugin to handle custom initialization variables which will be recognized by the system.

The user can define/implement a SpinePlugin which is available throughout the life time of the virtual machine running the framework and can be accessed globally via its specified name in configuration

What is Dependency Injection or Inversion of Control?
Dependency Injection is the term used to describe the manner in which external configuration properties are used to define the process flow within an application. This the reduces the amount of tight coupling between objects which enable the flow of information or processing within an application.

The benifit gained by this means of driving applications lie mainly in the ability of the application to decouple or divert the process flow based on the specification defined in a configuration file, making the application more flexible and transposable.

What type of security model does Spine offer its users?

Spine defines two security models namely:

  1. Role / Principal level security model - Roles and Principals which can be implemented by the client developer.It also provides methods for principals and associated roles to enforce their accessibility
  2. Object level security model - A developer using spine is encouraged to use an object known as a SpineBean as the default POJO super class. This automatically provides client objects with object access level security based on the unix octal notation i.e Read,Write and Execute access are granted based on the object's specified principals Role and directives

This model allows the user to query objects before access or execution is granted to principals within an application.

What is a Identity Management?
It is a term used to describe the process of managing various levels of users and administrators of an IT system. It is used for managing all the various levels of users who use applications built on a spine core.
How does spine integrate with multiple types of data storage systems?

Spine defines a two Objects which must be implemented to allow the system recognize an unknown data store,i.e

  • DataProxy - Contains life cycle methods for accessing a data storage system, and provides base properties required by the data storage system (eg Connection object for databases) for the:
  • DataAccessObject - An arbitary object within which the developer writes data storage type code. e.g JDBC code in a sub class of AbstractDataBaseDAO.

For any type of data storage system, a DataProxy must exist, if it is not available the client developer is expected to extend AbstractDataProxy and create a proxy suitable for communicating with the data store, while providing implementations for it's life cycle processes.

How can spine integrate with other MVC architechures?

Spine does not provide an MVC implementation or a presentation tier architechure,but on integration, an appropraitely initialized Spine engine will allow calls from an MVC by providing a suitably defined ViewProcessor (a call to the ViewProcessorFactory will provide this ViewProcessor) which can be identified by its name within configuration.

All the MVC or the user need do is to call methods within this ViewProcessor to invoke the process flow or retrieve the results of the invocation.

Design Pattern Driven Objects and Classes Used By Spine

What is a View Processor?
It is an object or class which serves as a gateway to making an application call to the framework to execute a process flow. It is the object whose method are invoked from an application to request that the framework processes the attached DataTransferObject

There two predefined types of ViewProcessors i.e ViewProcessor and MultiViewProcessor which are both used to execute the process flow in your application.

What is a Business Delegate?
A BusinessDelegate is an object used by Spine to dictate where business logic and business rule code must be written. This is to allow for transposition of application coupling at any time.
What is a Data Transfer Object
A DataTransferObject is the object used by the framework to package data within the application, the interface define by Spine ensures that data is unique to each user or process call during transportation between layers of the application
What is a Data Access Object
An arbitary object used to access data stores within which the developer writes data storage type code. e.g JDBC code in a sub class of AbstractDataBaseDAO.
What is a Data Proxy
A DataProxy is an object used by Spine to dictate life cycle methods for accessing a data storage system, and provides base properties required by the data storage system eg Connection object for databases when using a DataAcessObject which is a child of AbstractDataBaseDAO.
What is a Data Transfer Assembler
A DataTransferAssembler is an object which implements the Command Design pattern and is used by the framework to transport a set of objects between layers, namely objects which are vital to ensuring the application logic can be or has been executed.
What is a SpinePlugin

A SpinePlugin is an object which must be implemented by the client developer when he/she wishes to provide initialization variables to their application at startup.

In addition a SpinePlugin extends the concept of a plugin by retaining the plugin as a named static object available to the user throughout the life time of the virtual machine.

Properties defined in the spine-init.xml are made available as a map to the implemention of a SpinePlugin

What is a Builder
There are two main builders in Spine which the client developer may need to implement depending on his/her use of the framework. They are:
  • DataSourceBuilder - This is used to create DataSources for Databases based on the defined configuration properties.Users may need to implement a DataSourceBuilder for their database type which may not have been implemented in Spine.
  • AbstractBuilder - This is a builder which is targeted at SpineBean creation and manipulation.In certain processes and process flows, a developer may need to create several objects or make calls to several objects which are associated with the process, Spine ensures that this can be done generically if these objects are SpineBeans and the Builder implementation defined at configuration time should handle this object calls.

Initialization

The framework does not seem to recognize the path to my spine-init.xml file?

For web applications, it is normally sufficient to place the spine-init.xml file in the application context and reference the path to this file from the context. Eg.

Stating that the path to the spine-init.xml file is /WEB-INF/spine-init.xml is sufficient.

When accessing the framework through a non web application, the full path name of the spine-init.xml file must be specified for the ApplicationConfigurator to read the init file.

I defined a DataSource in my spine-init.xml, but it has not been initialized ?

While a default DataSourceBuilder is available, it may not be able to initialize a suitable DataSource for certain databases. Your are advised to write an implementation of a DataSourceBuilder for your database type where necessary.

We aim to make more custom DataSourceBuilders available as time permits.

How can I initialize a SpinePlugin?

You should follow the initialization and configuration instructions in the user guide. Additionally a dtd and a schema is available at the spine website which is useful for validating the spine-init.xml.

How can I write a Spine Plugin?
Please read the How to create a SpinePlugin section in the user guide for details on how to create a Spine Plugin within your application.

Configuration

My configuration does not seem to be recognized?

Please ensure your specific configuration is defined in the spine.xml file and that the spine.xml is placed in the path that is defined for it in the spine-init.xml file.

How do I configure multiple DAOs to use one Business Delegate?
Define a configuration which uses a MultiViewProcessor. For further information please read the MultiViewProcessor configuration section in the user guide and/or the MultiViewProcessor configuration section in the quick start document.
How do I add a new proxy to configuration?

Please read the implementing a proxy section in the user guide for details on how to implement a proxy within your application.

Implementation and Use

How do I integrate Spine with our in house MVC?

If using a custom desktop application, you will need to initialize Spine from your code, please read the section on initialization and installation and for web applications you should also read the quick start guide.

How do I use multiple DAOs from one Business Delegate?
Define a configuration which uses a MultiViewProcessor. For further information please read the MultiViewProcessor configuration section in the user guide and/or the MultiViewProcessor configuration section in the quick start document.
How do I integrate a non standard data system e.g we need to use Berkerly DB for data storage?

You must create a new DataProxy which will provide life cycle methods for objects which wish to act as DataAccessObjects used to retrieve and store data in the BerkerlyDB.

Because a BerkerlyDB is a file based data storage system, you may be able to extend a FileProxy otherwise you need to write a new DataProxy

Please read the implementing a proxy section in the user guide for details on how to implement a new proxy within your application

Why do I need to place my Hibernate calls in an HibernateDAO?

Because Hibernate is an Object relational mapping tool, one is tempted to simply call Hibernate objects where data storage or retrieval is required, one of the key goals of Spine is the transposition of objects related to the process flow which implies that Hibernate must conform to this architechure.

This will ensure that if in future, the project decides it wishes to replace Hibernate as the data access tool, all that needs change is the DAO!

How do I do assign roles and administrators?
The framework does not assign administrators or roles for a group, the default implementation is packaged with a text file of example groups, you may add more groups to this file but you should write your own implementation based on you datastore or application.

Your application can be written to assign administrators and roles to groups or applications.

How do I use Spine to respond to my Ajax presentation tier?

At present Spine does not offer specific support for xml data as its main input to the ViewProcessor. What the client developer can do is to build a composite object from the incomming xml and ensure it either honors the DataTransferObject signature or packages the composite Object in a DTOWrapper.

This composite object can then be used in your Spine classes and the result unwrapped and reconstituted as an XML stream.

Future versions of Spine may provide this feature which will be packaged as an Ajax ViewProcessor.

Troubleshooting

I see an error message "java.io.FileNotFoundException: spine-init.xml (No such file or directory)". What's wrong?

This is usually caused by the fact that the path to spine-init xml file is incorrect.

It is best placed in the same context as the application which it will run otherwise the full server path must be stated in the configuration.Additionally you should ensure that it is placed in a non public readable directory e.g /WEB-INF/ in web applications.

I can't access my specified ViewProcessor even though it's the DefaultViewProcessor in Spine. What's wrong?

This is usually caused by the name associated with the ViewProcessor in the spine.xml file

Make sure the named identify passed to the ViewProcessorFactory is the same name with which the ViewProcessor is defined in configuration.

Other Questions

My question is not on this page. How do I find the answer?
First read the user guide and other on-line help. Your question may have already been asked and answered, to find it: search the Spine support forums archives and issue tracking system. If you still don't find it, you can ask the question on the developers' support forums or you can enter an issue.
Use our technical support website to search our knowledge-base or contact us.

Where should I send comments on this FAQ?
You can write to spine@zphinx.com.
Copyright (C) 2008 Zphinx Software Solutions , all rights reserved