Skip to end of metadata
Go to start of metadata

Authors: cv and Jon Tirsen

What is Prevayler?

  • Prevayler is a lightweight implementation of a prevalent persistence mechanism.
  • It is not a database, but can be used as a replacement for a database in many circumstances.
  • Prevayler has no external dependencies, except JDK 1.3.

What does Prevayler do?

  • It uses object serialization to store all the modifications to your data in a sequential form.
  • When the application is restarted, it reads and executes all those modifications again, thus bringing the data to the same state it was before the restart.
  • Optionally, you can take "snapshots" of your whole object graph, so re-executing all the modifications performed since the applications started is not needed.

How do I use Prevayler?

  • The Prevayler release is just one JAR file. You just need to add it to your CLASSPATH and you can start working immediately.
  • Create your domain model. It should not depend on any external resources specifically not Prevayler itself. It also needs to be serializable.
  • Create a Transaction (Command) object for each type of modification to the system. They need to be serializable.
  • Create a Prevayler instance and execute all your transactions through it.

(info) For further information, read the 2-minute Tutorial.

Why should I use Prevayler?

  • Simpler and faster development time.
  • Insanely fast object lookups and manipulation with less code.
  • No labels