> Architecture Rules looks great.
Hi Dirk! Thank you for your feedback.
> I did a testdrive by executing it as an ant task. But all i get is:
What version of the architecture-rules do you use?
> c:\SVN\APFlow\antbuild\build.xml:1028:
> com.seventytwomiles.architecturerules.exceptions.DependencyConstraintException:
> rule bpm integration tier failed: com.isr.bpm.integration.base is not
> allowed to depend upon com.isr.bpm.service.domain
>
> Is there a way to find out what class file causes this violation?
As I can see its not possible in the version 2.1.1. We have such info
for cycles (see issue
http://code.google.com/p/architecturerules/issues/detail?id=35), but not
for layers .
--
MAN-UANIC
As I can see its not possible in the version 2.1.1. We have such info
for cycles (see issue http://code.google.com/p/architecturerules/issues/detail?id=35), but not
for layers .
> There are a few other alternatives. I have never used any of them and I think they all have
> different feature sets. Here is a list that I came up with.
>
> http://72miles.com/architecturerules/alternatives
Mike, what about these two:
* http://classycle.sourceforge.net/
* http://patterntesting.sourceforge.net/05/whatis.html
I've never used any of them too...
--
MAN-UANIC
I'll have to update that alternatives page. Thanks Mykola.Here are some examples of automated checks that the PatternTesting framework allows:
- Verify that no calls to any method in our application is allowed to use
null,- Verify that all Avalon components must extend a base
AbstractAvalonComponentclass,- Verify that all calls to the database go through a
JdbcDataAccessclass and that none uses JDBC directly,- Verify that no
System.out.println()are used anywhere (should use the project defined logging facility instead),- Verify that stateless classes (Thread Safe classes in Avalon terminology, Singleton or "static classes" in other terminologies) are not allowed to set instance variables except at initialisation time,
- Verify that the "control" layer (for exemple for a web application) is only allowed to talk to the "service" layer (implementation of the use cases) and not to the "persistence" layer (for example),
- Verify that any application exception must be a subclass of
BusinessException,TechnicalExceptionorCriticalException,- Verify that the MVC model is applied consistently. For example, verify that any call to the service layer has been through an Action class (if you're using Struts for example),
- Verify that exceptions are only logged at the top level,
- Verify that for any use case, a maximum number of 5 SQL queries to the database is allowed,
- etc...
Classycle's Analyser analyses the static class and package dependencies in Java applications or libraries. It is especially helpful for finding cyclic dependencies between classes or packages. Classycle is similar to JDepend which does also a dependency analysis but only on the package level.