Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

A Validated Set of Smells for MVC Architectures - ICSME 2016

493 views

Published on

My presentation on code smells at ICSME 2016 in Raleigh.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

A Validated Set of Smells for MVC Architectures - ICSME 2016

  1. 1. A Validated Set of Smells in MVC Architectures Maurício Aniche, Gabriele Bavota, Christoph Treude, Arie van Deursen, Marco Gerosa @mauricioaniche, @gbavota, @ctreude, @avandeursen, @gerosa_marco
  2. 2. ICSME 2016 2 Let’s improve that feature … Oh no! Code there sucks!
  3. 3. ICSME 2016 3 Look for code smells, young padawan!
  4. 4. ICSME 2016 4 Take a look at this God Class! Nah…
  5. 5. ICSME 2016 5 What about this Controller with many routes? Yeah, this is a problem!!!!
  6. 6. Interviews + surveys with 50 developers ICSME 2016 6
  7. 7. ICSME 2016 7 1. Layer-focused survey 2. Role-focused survey 3. Interviews with developers 4. Expert review
  8. 8. Result: A catalogue of smells ICSME 2016 8
  9. 9. Promiscuous Controller Offers too many actions ICSME 2016 9
  10. 10. Brain Controller Too much business logic ICSME 2016 10
  11. 11. Meddling Service Queries the database ICSME 2016 11
  12. 12. Brain Repository Complex logic (SQL or code) ICSME 2016 12
  13. 13. Laborious Repository Method Many queries in a single method ICSME 2016 13
  14. 14. Fat Repository Manages many entities ICSME 2016 14
  15. 15. Spring MVC in github ICSME 2016 15
  16. 16. Detection strategies ICSME 2016 16 3Q + 1.5IRQ
  17. 17. Smelly classes exist! ICSME 2016 17
  18. 18. Our studyICSME 2016 18
  19. 19. RQ1. What is the impact of the proposed code smells on change-proneness of classes? ICSME 2016 19
  20. 20. RQ2. What is the impact of the proposed code smells on defect-proneness of classes? ICSME 2016 20
  21. 21. Smelly classes ICSME 2016 21 Clean classes have changed have not changed have changed have not changed Is this difference significant?
  22. 22. Are they smells? ICSME 2016 22
  23. 23. RQ3. Do developers perceive classes affected by the proposed code smells as problematic? ICSME 2016 23
  24. 24. • We collected perceptions of 17 developers • 6 random classes of existing systems (2 T-smelly, 2 non smelly, 2 MVC smelly) • Evaluate from 0 to 5 the severity of the problem ICSME 2016 24
  25. 25. Developers’ perceptions Significantly different ICSME 2016 25
  26. 26. SCAM 2016 + ICSME 2016 = SCAM 2016 26
  27. 27. • Developers do care about other types of smells (contextual smells) • By means of a 4-step approach, we coined a catalogue of smells for MVC apps. • Classes affected by these smells tend to be prone to change and to defects. • Developers clearly perceive these smells. SCAM 2016 27
  28. 28. A Validated Set of Smells in MVC Architectures Maurício Aniche, Gabriele Bavota, Christoph Treude, Arie van Deursen, Marco Gerosa @mauricioaniche, @gbavota, @ctreude, @avandeursen, @gerosa_marco

×