WTF?

One of the firsts questions that come to mind is what the fuck does this thing do? The answer can be both simple and complicated. In simple terms this is an application development infrastructure. The complicated answer is that this is a combination of several open source tools nicely tide-up to a single robust framework. The purpose of this framework is to simplify the development cycle - having the developer concentrate on the development process of the business logic and freeing the developer from the plumbing, flows and other architectural concerns. With this in mind whenever this framework generated automatic actions (for example in DAOs and Facades) there is always a way to configure the behavior or to override it altogether.

[top]

Where to start?

Start by reading all the documentation. Them take a look at the demo application (demoapp in the svn repository)

[top]

What is the development process?

The entire development cycle from server to gui is as follows:

  • Develop the domain objects (DM, yes DM not DO) and map them to the database tables using EJB3 persistence.
  • Produce DAO (Data Access Objects) to each domain object. The DAO enables the persistence of the domain object - it takes care of saving, merging, deleting, and of course fetching the DM.

    This is done simply by writing an interface - there's no need to implement the interface to a concrete class the framework does this for you. See relevant section (DAO) in the server documentation.
  • Write services. The service is the main location of the business logic of the application resides. A service may use other services, and will most certainly use DAOs to access data. A service has two parts: the service interface and the service implementation class (no shortcuts here). For further details see relevant section (Services) in the server documentation.
  • Produce Facades. A Facade (some may call it a channel) is the entry point of the application. There is absolutly no logic in the Facade - as its name suggests it's just a facade.

    A Facade is an interface that, much like the DAOs, is implemented by the framework at runtime, which means that no implementation class is needed. See the relevant section (Facades) in the server documentation.
  • Write your gui and activate Facades to communicate with the server-side.

[top]

How do I initialize the server side of my application?

The frameowrk supplies a convenience method that retrieves the names and order of the Spring configuration files:

InfraDefinitions.getInfraResourceNames()

This method reads a text service file: META-INF/services/net.sf.shineframework.core, which is supplied in the framework server jar. This file defines the standard names of the configuration files of the application. All standard-named files are read in the initialization of the application automatically (see the contentes of the file for further details).

It is also possible to add your own custom-named configuration files (as opposed to the standard-named ones). To do this include the following files in your distribution package:

META-INF/services/net.sf.shineframework.application.custom

META-INF/services/net.sf.shineframework.application.custom.1

META-INF/services/net.sf.shineframework.application.custom.2

...

The format of the file is a regular properties file with a single property: resources .

Usually the initialization is done in a single location in the application.

[top]