Skip to content

asgerp/archtypeMaven

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Archtype

Masters project on how to annotate source code to make sure that architectural patterns/styles, used to design a system, is upheld in the actual implementation.

Run it

compile the project and then call:

javac -processor com.apkc.archtype.processors.ComponentProcessor -cp ~/path/to/archtype-1.0.jar
path/to/TestController.java path/to/TestView.java path/to/TestModel.java

Annotations

An annotation looks like this

@Component(
	patterns = {@Pattern(name="testMvc",kind = "MVC", role="Controller"), @Pattern(...)}
)

Certain patterns may require meta data, such as layers and presenter-abstraction-control. This can be done by post fixing the role name with the meta data in {}. Like this:

@Component(
	patterns = {@Pattern(name="testLayer",kind = "Layered", role="layer{1}")}
)

where patterns is a list of patterns the component participates in. A pattern consists of a name of the pattern, the kind of the pattern, and the role the components plays in the pattern.

Supported patterns

  1. Layers ( Components: Layer{layer#}, Pattern name: Layered)
  2. Indirection Layers ( Components: Inlayer{inlayer#}, Pattern name: Indirectionlayer)
  3. Model-View-Control ( Components: Model, View, Controller, Pattern name: MVC)
  4. Client-Server ( Components: Client, Server, Pattern name: clientserv)
  5. Peer-to-Peer ( Components: Peer, Pattern name: peer2peer)
  6. Publish-Subscribe ( Components: Producer, SubscriptionManager, Consumer, Pattern name: publishsubscribe)
  7. Shared Repository
  8. Active Repository
  9. Blackboard

Requirements

all extern jars should be placed in lib/ folder.

You have to install alloy locally to maven

mvn install:install-file -Dfile=/path/to/alloy4.2.jar -DgroupId=alloy4.2 -DartifactId=alloy4 -Dversion=1.0.0 -Dpackaging=jar

Also make sure that the java jdk and jre are the same by updating and by setting:

export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.7.0_13.jdk/Contents/Home"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages