In this section you will find example applications. Each one will attempt to highlight
a particular aspect, feature or benefit of Gracelets.
The example code is taken directly from the live examples shipped with Gracelets
Server, so if you want to see the code in action you can download
When running the examples in the Gracelets Server we have a copy of HSQLDB
with Gracelets Server and it is using the JPA extension with an in-memory database
already setup. The persistence.properties for our setup is as follows:
provider.class = org.hibernate.ejb.HibernatePersistence
connection.driver = org.hsqldb.jdbcDriver
connection.url = jdbc:hsqldb:mem:demodb
connection.username = sa
hibernate.dialect = org.hibernate.dialect.HSQLDialect
hibernate.hbm2ddl.auto = create-drop
For now there are two examples:
My Blog Example
The following example is a simple blog example. It will give you an idea of just about
how much you can do in a single script. It allows you to add blog entries, add
comments to those entries, view blog entries either in the app or with a perma link.
User Manager Example
If the perl/php style of coding is not your preference or you are doing something
that will get big and required detailed maintenance, you can still code in the MVC
style and yet have the power of Gracelets inside your controllers as well as your
view scripts. This example will demonstrate this.