-
Type:
Sub-task
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Done
-
Affects Version/s: 4.0.0.Final
-
Fix Version/s: 4.1.0.Final
-
Component/s: Graph and Models, Reporting
-
Labels:None
-
Sprint:Sprint 39
-
Git Pull Request:
windup-rulesets$ git grep -h '<tag name=' | sed 's# \+##' | sort | uniq -c | sort -bnr
|
32 <tag name="Java EE"/>
|
26 <tag name="View"/>
|
18 <tag name="Connect"/>
|
14 <tag name="Embedded"/>
|
8 <tag name="Web"/>
|
8 <tag name="MVC"/>
|
8 <tag name="Bean"/>
|
6 <tag name="Messaging"/>
|
6 <tag name="Markup"/>
|
4 <tag name="Rich"/>
|
4 <tag name="HTTP"/>
|
2 <tag name="Sustain"/>
|
2 <tag name="Security"/>
|
1 <technology-identified name="Wicket">
|
1 <technology-identified name="Web XML File">
|
1 <technology-identified name="WebSocket">
|
1 <technology-identified name="Struts">
|
1 <technology-identified name="Stateless (SLSB)">
|
1 <technology-identified name="Stateful (SFSB)">
|
1 <technology-identified name="Spring-MVC">
|
1 <technology-identified name="Security Realm">
|
1 <technology-identified name="Message (MDB)">
|
1 <technology-identified name="JSP Page">
|
1 <technology-identified name="JSF Page">
|
1 <technology-identified name="JS">
|
1 <technology-identified name="JNLP">
|
1 <technology-identified name="JMS Topic">
|
1 <technology-identified name="JMS Queue">
|
1 <technology-identified name="JMS Connection Factory">
|
1 <technology-identified name="JAX-WS">
|
1 <technology-identified name="JAX-RS">
|
1 <technology-identified name="HTML">
|
1 <technology-identified name="GWT">
|
1 <technology-identified name="Entity Bean">
|
1 <technology-identified name="CSS">
|
1 <technology-identified name="Applet">
|
The problem with how the tags were used for these rules is that it goes against how I thought they would work.
How it works is that the titles of the columns or groups are taken as tags, and the technologies, rather than being tagged, get an arbitrary model assigned with an arbitrary title, which is disconnected from existing tags, and these models are tagged with the column headers.
I consider that as a wrong idea and wrong way to do it, for few reasons.
1) When the column structure changes, it forces you to change all affected rules.
2) There is no common place defining the technologies, so once you can write "Spring-MVC" and other time "Spring MVC".
3) The tags of the technology-identified denote where in the report matrix the technology should be counted. That is again a bad idea, because the matrix may change very easily and again, you'll need to change those tags. For instance, if MZ decides that WebService is Java EE and not Embedded afterall.
4) Even if we accepted that, the tags mix different levels of technologies. So there is <tag name="Web"> and <tag name="Java EE">, and the later is redundant.
5) There is already an existing mechanism to tag the technologies: <classification> <tag .../> </classification>. If some user creates a rule which will classify something and tag it as a orm for instance, then using the current mechanism this will not end up in the report.
How it should work:
- The rule author shouldn't have to care about the report columns.
- The report author should not have to care about the tags in the rules.
- The connection between the two should be defined in the tag relations structure defined by *.tags.xml files.
To achieve that, the rule author should classify items and tags them with what it is, for instance, <tag name="mybatis"/> and then defines that tag in a my.tags.xml file, like this:
<tag name="mybatis" parents="orm, persistence"/>
|
Or, if that way is simpler, the user may just do <classification ...> <tag name="orm"/><tag name="persistence"/></classification>.
And then, it should be up to the author of the report to take care of taking the right technologies, deciding which should go where in the report matrix.
My idea was:
1) The items (files, classes, libraries, ...) would be tagged with the technology, using our existing ClassificationModel which is meant to do that. E.g.
@Entity would be marked with a tag "jpa-enity", and apache-log4j-1.2.3.jar would be tagged with "apache-log4j".
2) The tag structure covers what "jpa-entity" is. It is "jpa". Then "jpa" is "orm" and "java-ee" and "persistence". Then, "orm" and "persistence" is "techSector:Store".
3) Then, some rule at the end would sum up the occurences of all tags which are under all "techSector:..." tags, for each application.
4) And then, to get the stats for the report, I would query each combination of Application and certain set of TagModels.
This way would satisfy the principles mentioned above.
For now, however, I can do a workaround to make the report work with the current state of things.