Comparing the code quality of ECMs Alfresco, Nuxeo, Open KM Davide Taibi davide.taibi@opensoftengineering.it  Open Soft En...
Outline <ul><ul><ul><ul><li>Goals </li></ul></ul></ul></ul><ul><ul><ul><ul><li>FLOSS selection and comparison </li></ul></...
FLOSS Selection & Comparison <ul><li>Search Engines </li></ul><ul><li>Online Opinion </li></ul><ul><li>Ideology </li></ul>...
Goals Assessing code quality to help developers and communities
Code Quality <ul><li>Programs must be written for people to read, and only indidentally for machines to execute </li></ul>...
What is quality <ul><li>Measure of how well the software is designed and implemented </li></ul>
Why care, there’s QA?! <ul><li>Can’t QA take care of quality? </li></ul><ul><ul><li>why should developers care? </li></ul>...
<ul><li>First Law of Programming </li></ul><ul><li>“ Lowering Quality Lengthens Development Time ” </li></ul><ul><li>http:...
Quality vs Maintenance <ul><li>You’ll do more maintenance if quality is better </li></ul><ul><li>Why?  </li></ul><ul><ul><...
Quality <ul><li>Don’t build Rube Goldberg Machines </li></ul>
Measuring Quality <ul><li>We need to find useful metrics </li></ul><ul><li>Is more code better or worse? </li></ul><ul><li...
Measuring Quality <ul><li>Is the code readable, understandable? </li></ul><ul><li>Is the code verbose? </li></ul><ul><li>A...
Code Standards <ul><li>Why common style/coding standard? </li></ul><ul><ul><li>Less defects. </li></ul></ul><ul><ul><li>Ea...
Coding Standards <ul><li>General rules: </li></ul><ul><ul><li>Simplicity  </li></ul></ul><ul><ul><ul><li>Build simple clas...
Coding Standards – Key Principles <ul><li>Consistent naming;  </li></ul><ul><ul><li>Use the same abbreviations, naming sch...
<ul><li>Loose Coupling; </li></ul><ul><ul><li>Try to make packages, routines as independent of each other as possible. </l...
<ul><li>Remember that the code you write shall be understood by others and yourself in the future. </li></ul><ul><li>The m...
ECM Code Assessment
The selected ECMs
The selected ECMs <ul><li>Alfresco (www.alfresco.com) </li></ul><ul><ul><li>Version: 3.4 </li></ul></ul><ul><ul><li>Checko...
A first quantitative overview   eLOC Packages Methods Classes Alfresco 350215 270 19214 2902 Nuxeo 327855 936 32629 4899 O...
A first quantitative overview
A first quantitative overview
A first quantitative overview
Documented API Comments Alfresco 65.70% Nuxeo 30.60% OpenKM 51.90%
Duplicated Code Duplications Alfresco 13.2% Nuxeo 1.5% OpenKM 13.9%
Maintainability   Complexity  LCOM4 LCOM >1 RFC  Alfresco 4.1 1 1.10% 1 Nuxeo 2.4 1.6 22.70% 21 OpenKM 3.4 1.3 15.20% 31
Maintainability <ul><li>Cyclomatic Complecity (Mc Cabe Index) </li></ul><ul><li>Number of decision logic in a single metho...
Maintainability <ul><li>LCOM 4 – Lack of Cohesion of Methods </li></ul><ul><li>number of &quot;connected components&quot; ...
Maintainability <ul><li>LCOM 4 – Lack of Cohesion of Methods </li></ul><ul><li>number of &quot;connected components&quot; ...
Maintainability <ul><li>RFC- Response for a Class </li></ul><ul><li>Set of methods that can potentially be executed in res...
Maintainability
Coding standards compliance   Rules Compliance Alfresco 73.60% Nuxeo 86.50% OpenKM 84.10%
Maintainability
Support <ul><li>Bugs opened in the last 6 months </li></ul>  Blocker Critical Major Minor Alfresco 12 84 145 24 Nuxeo 15 5...
Support <ul><li>“ Bugs” opened in the last 6 months </li></ul>
Conclusions <ul><ul><li>3 ECMs analyzed </li></ul></ul><ul><ul><li>We need to keep track on Coding Standards and Code Qual...
Conclusions <ul><ul><li>Alfresco: </li></ul></ul><ul><ul><ul><li>Reduce Class Size </li></ul></ul></ul><ul><ul><ul><li>Red...
Q & A ? THANKS. QUESTIONS? Davide Taibi davide.taibi@opensoftengineering.it  www.opensoftengineering.it www.taibi.it
Upcoming SlideShare
Loading in...5
×

Comparing the code quality of ECMs

2,374

Published on

Presentation by Davide Taibi (http://www.taibi.it) given at Nuxeo World 2011 on measuring the software code quality of ECM solutions.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,374
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • Al the goals were completely reached. Open BQR respect completeness, semplicity, adactability requirements, showing a good ability in hilighting each product characteristic as favorable or not. Open BQR is open to new extension and is released under GPL license. In the next future Open BQR will be applied to a large test on CMS products, in order to evaluate more them correctness. Next setp will be to fix the most relevant parameters to evaluate, afterword we would like to study a system able to reduce the assessment times including the people opinion looking automatically into forums, blogs and news groups througt blogmeter. Another possible develop is to make aware the community in order to speed up the access to the bugs database.
  • Al the goals were completely reached. Open BQR respect completeness, semplicity, adactability requirements, showing a good ability in hilighting each product characteristic as favorable or not. Open BQR is open to new extension and is released under GPL license. In the next future Open BQR will be applied to a large test on CMS products, in order to evaluate more them correctness. Next setp will be to fix the most relevant parameters to evaluate, afterword we would like to study a system able to reduce the assessment times including the people opinion looking automatically into forums, blogs and news groups througt blogmeter. Another possible develop is to make aware the community in order to speed up the access to the bugs database.
  • Thank ’ you, I would have finished Are there any questions?
  • Transcript of "Comparing the code quality of ECMs"

    1. 1. Comparing the code quality of ECMs Alfresco, Nuxeo, Open KM Davide Taibi davide.taibi@opensoftengineering.it Open Soft Engineering - Universita’ dell’Insubria
    2. 2. Outline <ul><ul><ul><ul><li>Goals </li></ul></ul></ul></ul><ul><ul><ul><ul><li>FLOSS selection and comparison </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Code Quality and Coding Standard </li></ul></ul></ul></ul><ul><ul><ul><ul><li>ECM Assessment </li></ul></ul></ul></ul>
    3. 3. FLOSS Selection & Comparison <ul><li>Search Engines </li></ul><ul><li>Online Opinion </li></ul><ul><li>Ideology </li></ul><ul><li>Experience </li></ul><ul><li>FLOSS Assessment models </li></ul><ul><li>Open Source Maturity Model (OSMM) </li></ul><ul><li>Open Business Readiness Ratings (BRR) </li></ul><ul><li>Qualification and Selection of O.S. Software (QSOS) </li></ul><ul><li>Model for Open Source Software Trustworthiness (MOSS) </li></ul>
    4. 4. Goals Assessing code quality to help developers and communities
    5. 5. Code Quality <ul><li>Programs must be written for people to read, and only indidentally for machines to execute </li></ul><ul><li>Abelson and Sussman </li></ul>
    6. 6. What is quality <ul><li>Measure of how well the software is designed and implemented </li></ul>
    7. 7. Why care, there’s QA?! <ul><li>Can’t QA take care of quality? </li></ul><ul><ul><li>why should developers care? </li></ul></ul><ul><li>QA shouldn’t care about quality of design and implementation </li></ul><ul><li>They should care about acceptance, performance, usage, and relevance of the application </li></ul>
    8. 8. <ul><li>First Law of Programming </li></ul><ul><li>“ Lowering Quality Lengthens Development Time ” </li></ul><ul><li>http://c2.com/cgi/wiki?FirstLawOfProgramming </li></ul>Why care, there’s QA?!
    9. 9. Quality vs Maintenance <ul><li>You’ll do more maintenance if quality is better </li></ul><ul><li>Why? </li></ul><ul><ul><li>It’s easier to accommodate change, so you can be flexible and relevant </li></ul></ul><ul><li>Maintenance is a solution, not a problem </li></ul><ul><li>Better methods lead to more maintenance </li></ul>
    10. 10. Quality <ul><li>Don’t build Rube Goldberg Machines </li></ul>
    11. 11. Measuring Quality <ul><li>We need to find useful metrics </li></ul><ul><li>Is more code better or worse? </li></ul><ul><li>Can you produce more code? </li></ul><ul><li>Do you need that much code? </li></ul>
    12. 12. Measuring Quality <ul><li>Is the code readable, understandable? </li></ul><ul><li>Is the code verbose? </li></ul><ul><li>Are variable/method names meaningful </li></ul>Coding Standards
    13. 13. Code Standards <ul><li>Why common style/coding standard? </li></ul><ul><ul><li>Less defects. </li></ul></ul><ul><ul><li>Easier/cheaper maintenance. </li></ul></ul><ul><ul><li>Several people may work and understand the same code. </li></ul></ul><ul><li>Java standards: </li></ul><ul><ul><li>The Elements of Java Style; Vermeulen et.al. SIGS Books. </li></ul></ul><ul><ul><li>http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html . </li></ul></ul>
    14. 14. Coding Standards <ul><li>General rules: </li></ul><ul><ul><li>Simplicity </li></ul></ul><ul><ul><ul><li>Build simple classes and methods. Keep it as simple as possible, but not simpler (Einstein). </li></ul></ul></ul><ul><ul><li>Clarity </li></ul></ul><ul><ul><ul><li>Ensure each class, interface, method, variable and object has a clear purpose. Explain where, when, why, and how to use each. </li></ul></ul></ul><ul><ul><li>Completeness </li></ul></ul><ul><ul><ul><li>Provide the minimum functionality that any reasonable user would expect to find and use. Create complete documentation; document all features and functionality. </li></ul></ul></ul>
    15. 15. Coding Standards – Key Principles <ul><li>Consistent naming; </li></ul><ul><ul><li>Use the same abbreviations, naming schema everywhere. </li></ul></ul><ul><li>Functional Cohesiveness; </li></ul><ul><ul><li>A function should do one thing good and only do that thing. </li></ul></ul>
    16. 16. <ul><li>Loose Coupling; </li></ul><ul><ul><li>Try to make packages, routines as independent of each other as possible. </li></ul></ul><ul><li>Code formatting; </li></ul><ul><ul><li>Use an agreed standard for code formatting. </li></ul></ul><ul><li>All artefacts should go through a quality control, including your code. </li></ul>Coding Standards – Key Principles
    17. 17. <ul><li>Remember that the code you write shall be understood by others and yourself in the future. </li></ul><ul><li>The maintainability costs is often 70% of a total project cost. </li></ul><ul><li>Reusable code creates greater income (and better score/bonus for you …). </li></ul>Coding Standards – Key Principles
    18. 18. ECM Code Assessment
    19. 19. The selected ECMs
    20. 20. The selected ECMs <ul><li>Alfresco (www.alfresco.com) </li></ul><ul><ul><li>Version: 3.4 </li></ul></ul><ul><ul><li>Checkout Date: 07/07/2011 </li></ul></ul><ul><li>Nuxeo DM (www.nuxeo.com) </li></ul><ul><ul><li>Version: 5.3 </li></ul></ul><ul><ul><li>Checkout Date: 09/07/2011 </li></ul></ul><ul><li>OpenKM (www.openkm.com) </li></ul><ul><ul><li>Version 5.1.5 </li></ul></ul><ul><ul><li>Checkout Date 12/07/2011 </li></ul></ul>
    21. 21. A first quantitative overview   eLOC Packages Methods Classes Alfresco 350215 270 19214 2902 Nuxeo 327855 936 32629 4899 OpenKM 106105 113 5763 927
    22. 22. A first quantitative overview
    23. 23. A first quantitative overview
    24. 24. A first quantitative overview
    25. 25. Documented API Comments Alfresco 65.70% Nuxeo 30.60% OpenKM 51.90%
    26. 26. Duplicated Code Duplications Alfresco 13.2% Nuxeo 1.5% OpenKM 13.9%
    27. 27. Maintainability   Complexity LCOM4 LCOM >1 RFC Alfresco 4.1 1 1.10% 1 Nuxeo 2.4 1.6 22.70% 21 OpenKM 3.4 1.3 15.20% 31
    28. 28. Maintainability <ul><li>Cyclomatic Complecity (Mc Cabe Index) </li></ul><ul><li>Number of decision logic in a single method. </li></ul>  Complexity LCOM4 LCOM >1 RFC Alfresco 4.1 1 1.10% 1 Nuxeo 2.4 1.6 22.70% 21 OpenKM 3.4 1.3 15.20% 31
    29. 29. Maintainability <ul><li>LCOM 4 – Lack of Cohesion of Methods </li></ul><ul><li>number of &quot;connected components&quot; in a class. </li></ul><ul><li>There should be only one such component in each class. </li></ul><ul><ul><li>If there are 2 or more components, the class should be splitted. </li></ul></ul>  Complexity LCOM4 LCOM >1 RFC Alfresco 4.1 1 1.10% 1 Nuxeo 2.4 1.6 22.70% 21 OpenKM 3.4 1.3 15.20% 31
    30. 30. Maintainability <ul><li>LCOM 4 – Lack of Cohesion of Methods </li></ul><ul><li>number of &quot;connected components&quot; in a class. </li></ul><ul><li>There should be only one such component in each class. </li></ul><ul><ul><li>If there are 2 or more components, the class should be splitted. </li></ul></ul>  Complexity LCOM4 LCOM >1 RFC Alfresco 4.1 1 1.10% 1 Nuxeo 2.4 1.6 22.70% 21 OpenKM 3.4 1.3 15.20% 31
    31. 31. Maintainability <ul><li>RFC- Response for a Class </li></ul><ul><li>Set of methods that can potentially be executed in response to a message received by an object of that class. </li></ul>  Complexity LCOM4 LCOM >1 RFC Alfresco 4.1 1 1.10% 1 Nuxeo 2.4 1.6 22.70% 21 OpenKM 3.4 1.3 15.20% 31
    32. 32. Maintainability
    33. 33. Coding standards compliance   Rules Compliance Alfresco 73.60% Nuxeo 86.50% OpenKM 84.10%
    34. 34. Maintainability
    35. 35. Support <ul><li>Bugs opened in the last 6 months </li></ul>  Blocker Critical Major Minor Alfresco 12 84 145 24 Nuxeo 15 50 50 50 OpenKM 20 20 20 20
    36. 36. Support <ul><li>“ Bugs” opened in the last 6 months </li></ul>
    37. 37. Conclusions <ul><ul><li>3 ECMs analyzed </li></ul></ul><ul><ul><li>We need to keep track on Coding Standards and Code Quality </li></ul></ul><ul><ul><li>Alfresco: </li></ul></ul><ul><ul><ul><li>Reduce Class Size </li></ul></ul></ul><ul><ul><ul><li>Reduce Duplicated Code </li></ul></ul></ul><ul><ul><li>Nuxeo </li></ul></ul><ul><ul><ul><li>Increase API documentation (Javadoc) </li></ul></ul></ul><ul><ul><ul><li>Reduce RFC and LCOM4 </li></ul></ul></ul>
    38. 38. Conclusions <ul><ul><li>Alfresco: </li></ul></ul><ul><ul><ul><li>Reduce Class Size </li></ul></ul></ul><ul><ul><ul><li>Reduce Duplicated Code </li></ul></ul></ul><ul><ul><li>Nuxeo </li></ul></ul><ul><ul><ul><li>Increase API documentation (Javadoc) </li></ul></ul></ul><ul><ul><ul><li>Reduce RFC and LCOM4 </li></ul></ul></ul><ul><ul><li>OpenKM </li></ul></ul><ul><ul><ul><li>Increase API documentation (Javadoc) </li></ul></ul></ul><ul><ul><ul><li>Reduce RFC and LCOM4 </li></ul></ul></ul><ul><ul><ul><li>Reduce Duplicated Code </li></ul></ul></ul>Suggestions for developers
    39. 39. Q & A ? THANKS. QUESTIONS? Davide Taibi davide.taibi@opensoftengineering.it www.opensoftengineering.it www.taibi.it

    ×