Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you measure/estimate size of XML programming effort?

To set the scene - I work in one of those industries that loves estimating and tracking pretty much everything. One of our key metrics is SLOC (source lines of code - declarative and executable statements). We use it for project size and cost estimation, project planning, and many other things. We try to use it to compare apples to apples (ie, we don't compare SLOC in one language/domain to SLOC in another language/domain). NOTE: We don't evaluate individual developers on this metric, nor do we call something wrong or bad just because the SLOC is different than expected. We do, however, consider a project has more SLOC likely to also have more bugs.

Fairly recently, I've started working in projects that use libraries in place of components that would otherwise have been hand-coded - for example JSF instead of JSP, Hibernate instead of JDBC, etc. So... instead of writing lines of code, our team is developing XML files. The XML mappings still take effort, and there's still a vague correlation of complexity - that having 100X more of these XML configuration files in a given project might suggest that it took more effort to create and might be more complex to debug than a project with only 1/100th of the XML files.

So... does anyone have any suggestions for measuring the size of these XML configuration files? # of elements? # elements + # attributes? something else?

like image 693
bethlakshmi Avatar asked Jan 28 '09 21:01

bethlakshmi


1 Answers

Interesting question. The only metric I am aware of (other than just counting nodes and attributes as you suggest) is something called the Structured Document Complexity Metric.

http://www.oreillynet.com/xml/blog/2006/05/metrics_for_xml_projects_5_str_1.html

Is the best link I can find on it currently (its been a while). I also found this little tool which will apparently calculate it for you (there may be others):

http://schematron.com/resources/documentcomplexitymetric.html

Beyond that, I'm afraid my only advice would be to just pick a couple of metrics to track that seem reasonable, and re-evaluate them to determine if they actually do trend with the effort being applied to each document...

like image 75
Brian B. Avatar answered Nov 02 '22 16:11

Brian B.