Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Currently for school we are working on a research project. The central question of this project is: Which architectural patterns can be detected using static code analysis? With architectural pattern is meant the architectural patterns from the book: Patterns of Enterprise Application Architecture written by Martin Fowler.

During our literature research we didn't find any studies/articals/journals that adress this problem. So for our approach for this rpoject we where thinking to create a prototype of this kind of tool. But first we have to know if there are any (open-source)tools with the same functionality?(detect architectural patterns with a static code analysis)

So my question is do you know a tool that kind detect architectural patterns? We know of the existence of tools that can detect design patterns of the Gang of Four. And do you have any suggestions for our approach?

Thanks in advance

share|improve this question
    
Could you given an example of what you mean exactly by "architectural patterns" and what do you expect the input and output to be for this tool? –  Emmad Kareem Feb 16 '12 at 10:53
    
@EmmadKareem What more are you looking for? The question defines "architectural patterns" as the patterns defined in Fowler's PoEAA book. The input to static analysis is some kind of work product, and the question specifically mentions "static code analysis" meaning that source files would be the artifacts analyzed. –  Thomas Owens Feb 16 '12 at 12:56
    
@ThomasOwens, I am not familiar with software architectural patterns detection techniques or even objectives, I could not comprehend the output of such a tool, that is why I asked for an example. –  Emmad Kareem Feb 16 '12 at 15:10

2 Answers 2

A few quick Google searches turned up a paper titled An Eclipse plug-in for the detection of design pattern instances through static and dynamic analysis presented at the 2010 IEEE International Conference on Software Maintenance. Unfortunately, I don't have access to this particular publication with my current IEEE subscription. However, the abstract mentions the name of the project as ePAD. This tool uses both static analysis as well as dynamic monitoring of a running application to detect design patterns. The plugin is available and apparently runs on Eclipse 3.6.0 and better, but I haven't tried it. It might be an interesting start, though, and there is contact information for the creators available.

Searching the Eclipse Marketplace also yielded a tool called Design Pattern Recognizer, which only identifies a handful of Gang of Four patterns. Their hompage indicates that the project is no longer active, but you might be able to look at how they approached the problem as another possible starting point.

Something to keep in mind, though, is that the majority of the patterns defined in Fowler's PoEAA book are not actually architectural patterns. Instead, they are design patterns often found in data-driven "enterprise" applications. It's been a while, but the only two that I can remember as being at the architectural level are Service Layer and Model-View-Controller. The other patterns are defined at the class and method level - the detailed design level - not at the software system architecture level that deals with more abstract modules or packages and nodes.

share|improve this answer

Anything that is a measurable, well-defined pattern can be parsed.

A deeper question is why would this be important (and important enough to measure and evaluate it with a tool)? How would you meaningfully 'score' or quantify the results, and how would you use those scores? The answer to those questions will tell you why there aren't many tools with that kind of capability, and the ones that are out there with a feature-set advertising this kind of capability are limited, either: pricey, fragile, or some blended combination of the two.

In the past, at least six or eight years ago, I saw these features in the upper end editions of UML tools, like Rational and Sparx Systems (architect/enterprise oriented editions of each respective version). From what I can remember, these products could sometimes 'see' EAA patterns in models of imported/analyzed source. They would suggest complementing patterns and naming for other facets that were participating somehow. Or they would let you 'stub-in' skelatons of these patterns (somewhat useful, but counter to a degree in how patterns are supposed to more often than not, organically emerge).

Identifying patterns of any kind was a very new concept at the time, and in one of the first sets of tools that would incorporate this kind of built-in feature, finding patterns of any kind, but also including EAA patterns. I haven't really looked at them since, so perhaps they are now more refined, stable, and economically feasible.

Perhaps they are also available from someone where the tools operate directly on source (instead of a model), but I am not aware of it.

share|improve this answer
    
Agree, there just doesn't seem to be any point in identifying them –  jk. Feb 16 '12 at 8:59
    
This doesn't quite answer the question at all! (No downvotes) –  Dipan Mehta Feb 16 '12 at 12:21
1  
If this is the path they are going to go down, I would strongly consider looking at the MS FxCop/StyleCop tools, as they were, last I knew, inferrence based engines that you could write your own custom rules for, and in order to find EAA patterns directly in source, which might be a shade ambigious to a traditional parser that merely matches symbols, the inferrence engine approach might be quite useful. In evaluation, this limits you somewhat (.Net assemblies); however, the underlying approach and rationale might serve as a good jumping off point. –  JustinC Feb 16 '12 at 16:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.