A flexible framework for Distributed & Dynamic Aspect-Oriented Programming in Java

Live Demonstration

A JAC server currently runs the photos sample on jac.aopsys.com. Our Tomcat servlet engine listens on the 8081 port so that you can access the photo repository from the WEB and play with it (if you are not behind a firewall for 8081).

Here is the link on the photo repository JAC object: http://jac.aopsys.com:8081/demo/servlet/JacServlet?action=view&jid=photorepository0.

Following, the different aspect configurations for the sample.

RTTI aspect configuration

include jac/core/rtti/rtti.acc
setFieldType jac.samples.photos.Photo imageURL "imageURL";

GUI aspect configuration

include jac/aspects/gui/gui.acc
include jac/aspects/authentication/gui.acc
      
// Person
class jac.samples.photos.Person {
	generateDefaultParameterNames;
	setParameterNames Person(String) { "name" };
}

// Photo
class jac.samples.photos.Photo {
	generateDefaultParameterNames;
	setParameterNames "Photo(String,URL)" { "title", "image URL" };
	setModifyingBoxes "Photo(String,URL)" { "", "fileChooser" };
	setModifyingBoxes "setImageURL(URL)" { "fileChooser" };
	setAttributesOrder {"title","imageURL","author","rate","date"};
	setFieldChoice "rate" "false" {1, 2, 3, 4, 5, 0 };
	setRender imageURL "Icon";
	setEmbeddedEditor author;
	setEmbeddedEditor rate;
}

// PhotoRepository
class jac.samples.photos.PhotoRepository {
	generateDefaultParameterNames;
	setCollectionType photos "jac.samples.photos.Photo";
	setParameterNames searchTitle(String) { "string to search" };
	setTableView photos;
}

Persistence aspect configuration

configureStorage "jac.aspects.persistence.PostgresStorage" { "photo", "laurent", "" };
configureClass "jac.samples.photos.Photo" "persistent";
configureClass "jac.samples.photos.PhotoRepository" "root";
configureClass "jac.samples.photos.Person" "root";
wrapCollection "jac.samples.photos.PhotoRepository" "photos";
registerStatic "photorepository0";