Spif is the Simplest Possible Infrastructure Framework for distributed Java applications like J2EE.
Spif provides a way of organizing the infrastructure needed for reading and writing model objects. It allows you to start with a very simple infrastructure and plug in extensions as necessary, without changing the business code using the infrastructure.
For example you may start by storing your objects in a simple hash, then plugging in persistence, remote accessiblilty, caching, locking and access checking as needed. Each such feature is added by one single line of code in your application.
import net.sf.spif.*;
....
Store.setChained(new HashStore());
Some examples of real-world chains are found
here.
import net.sf.spif.Store;
....
Employee you=new Employee();
Store.put(you.getId(),you);
....
boolean writable=true;
Employee you=(Employee)Store.get(yourId,writable);
you.setSalary(employee.getSalary()*1.5);
Store.put(you.getId(),you);
....
Store.remove(yourId);
You can find the details in the Javadoc.
Systems which
Spif is the framework which emerged from following these design rules on some J2EE projects:
Architectures following these rules are called Model Centric Architectures.