1 / 14

MÉTRICAS PARA MELHORIA CONTÍNUA DE CÓDIGO UM ESTUDO DE CASO COM JAVA

Faculdade Cenecista Nossa Senhora dos Anjos FACENSA. Sistemas de Informação. MÉTRICAS PARA MELHORIA CONTÍNUA DE CÓDIGO UM ESTUDO DE CASO COM JAVA. por Guilherme da Silveira Elias - guilherme.elias@gmail.com Daniel Wildt - dwildt@gmail.com. AGENDA.

noel
Download Presentation

MÉTRICAS PARA MELHORIA CONTÍNUA DE CÓDIGO UM ESTUDO DE CASO COM JAVA

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Faculdade Cenecista Nossa Senhora dos Anjos FACENSA Sistemas de Informação MÉTRICAS PARA MELHORIA CONTÍNUA DE CÓDIGO UM ESTUDO DE CASO COM JAVA • por • Guilherme da Silveira Elias - guilherme.elias@gmail.com • Daniel Wildt - dwildt@gmail.com

  2. AGENDA • Objetivos • Métricas de Qualidade de Código • Ferramentas de Apoio • Trabalhos Relacionados • Estudo de Caso • Perguntas

  3. Objetivos • Métricas de forma pró-ativa; • Maior qualidade de código fonte • gerado.

  4. Métricas de Qualidade de Código • Testes • Unitários – Funcionais • - Testar até não conseguir a pensar em mais • nenhum possível teste. (BECK, 2004) • - Ambiente Automatizado • Code Coverage • - Garantir maior abrangência dos testes • - Buscando qualidade nos teste

  5. Métricas de Qualidade de Código • OO • - Acoplamento, Abstração • (LANZA, 2006) • REFACTORING • - Instrumento de otimização • C.I. (Continue Integration) • - Agir de forma • preventiva • TAMANHO - SLOC, LOC, KLOC - Mensurar métodos, classes, módulos etc.. (KOSCIANSKI, 2006) • COMPLEXIDADE - Sinônimo de Legibilidade!!

  6. Ferramentas de Apoio • Junit • Selenium IDE • Cobertura • EMMA • Ant

  7. Ferramentas de Apoio • PMD/CPD • Checkstyle • NDepend • Metrics • Simian

  8. Ferramentas de Apoio • Netbeans • Eclipse • Cruise Control • Continuum

  9. Trabalhos Relacionados • MÉTRICAS ASSOCIADAS AO DESENVOLVIMENTO DE SOFTWARE • USANDO MÉTODOS ÁGEIS. - SPM (Social Program Management)

  10. Estudo de Caso • FUJA • Voluntário!

  11. Estudo de Caso “Detector de Reuso de Código” Projeto: Classdiary Solução: - Adotado reuso de código; - Criado método publico(public) em classe base. Situação Adversa - CPD (Copy Paste Detector) - 12 incidências do trecho de código: • Automatização: • Refatoração de código (IDE Netbeans) If (rs != null){ rs.close(); } If(st != null){ st.close(); } If(c != null){ c.close(); } • Beneficios Trazidos: • Redução de mais 75 LOC; • Reducão do % de CC (Métodos e • Classes); • Novo teste unitário específico; • Aumento cobertura para: • Bloco refatorado • Método refatorado

  12. PERGUNTAS ?

  13. Referências • Sites • EMMA – http://emma.sourceforge.net • ChecStyle – http://checkstyle.sourceforge.net/ • Junit – http://www.junit.org • Cruise Control Java http://cruisecontrol.sourceforge.net • Selenium IDE - http://selenium-ide.openqa.org • Ant Apache - http://ant.apache.org • PMD / CPD – http://pmd.sourceforge.net • Metrics – http://metrics.sourceforge.net • Netbeans – http://www.netbeans.org • Eclipse – http://www.eclipse.org • Continuum - http://continuum.apache.org • Livros • BECK, Kent. Extreme Programming Explaned. Bookman, Porto Alegre, 2004; • LANZA, Michele. Object-Oriented Metrics in Pratice, using software metrics to characterize, evaluate, and improve the design of object-oriented systems. Springer, 2006. • KOSCIANSKI , André e dos Santos Soares, Michel. Qualidade de • Software. São Paulo: Novatec, 2006;

  14. http://fuja.dev.java.net http://furor.dev.java.net http://groups.google.com/group/fuphp http://groups.google.com/group/FacensaNET

More Related