Reader small image

You're reading from  Sonar Code Quality Testing Essentials

Product typeBook
Published inAug 2012
Reading LevelIntermediate
PublisherPackt
ISBN-139781849517867
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Charalampos S Arapidis
Charalampos S Arapidis
author image
Charalampos S Arapidis

Charalampos Arapidis is a Senior Software Engineer located in Athens, Greece specializing in J2EE application design and implementation. His other notable interests include data-mining/visualization techniques and tuning continuous integrated environments. From a very early age, Charalampos showed particular interest in advanced Mathematics and software development and has been honored twice at the Panhellenic Mathematical Contest for providing prototype and innovative solutions. He graduated in Computer and Software Engineering from the Polytechnic school of the Aristotle University. After graduation he dynamically entered the enterprise field where he helped his organization make the transition from legacy client server ERP and CRM applications to full stack J2EE with JSF implementations all in a streamlined and integrated development environment. The development of the Proteus Web Document Management System for the Greek Public Sector and his solutions to Kallikratis - the largest data integration project ever conceived in the later years of Greece's public sector – are two of his most recognizable achievements nationwide. Charalampos currently works at Siemens Enterprise Communications as a Senior Software Applications Engineer, designing and implementing Unified Communications software at multinational level. When not working, he enjoys blogging, playing the classical guitar, and composing music, exploring new ways to translate polynomial equations to sound.
Read more about Charalampos S Arapidis

Right arrow

Cohesion and coupling


In object-oriented programming (OOP), cohesion and coupling are two fundamental concepts. The basic principle is to have classes with loose coupling and high cohesion. Loose coupling enables modularized packages that do not heavily rely on each other, while high cohesion provides tight and solid components with clearly defined responsibilities. High coupling means that a class relies on many other classes, while low cohesion signals for a class could be split into separate ones, offering fine-grained functionality.

Afferent coupling

Afferent (incoming) coupling is the total number of classes that depend on a given class. In Sonar, you can view afferent coupling within the Sonar source viewer under the Dependencies tab. For example, the afferent coupling for the class ReflectionToStringBuilder in the Apache commons-lang project equals to 4. Type the class name in the top-right search box from Sonar to find the class and open it in the source viewer. Then, click on...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Sonar Code Quality Testing Essentials
Published in: Aug 2012Publisher: PacktISBN-13: 9781849517867

Author (1)

author image
Charalampos S Arapidis

Charalampos Arapidis is a Senior Software Engineer located in Athens, Greece specializing in J2EE application design and implementation. His other notable interests include data-mining/visualization techniques and tuning continuous integrated environments. From a very early age, Charalampos showed particular interest in advanced Mathematics and software development and has been honored twice at the Panhellenic Mathematical Contest for providing prototype and innovative solutions. He graduated in Computer and Software Engineering from the Polytechnic school of the Aristotle University. After graduation he dynamically entered the enterprise field where he helped his organization make the transition from legacy client server ERP and CRM applications to full stack J2EE with JSF implementations all in a streamlined and integrated development environment. The development of the Proteus Web Document Management System for the Greek Public Sector and his solutions to Kallikratis - the largest data integration project ever conceived in the later years of Greece's public sector – are two of his most recognizable achievements nationwide. Charalampos currently works at Siemens Enterprise Communications as a Senior Software Applications Engineer, designing and implementing Unified Communications software at multinational level. When not working, he enjoys blogging, playing the classical guitar, and composing music, exploring new ways to translate polynomial equations to sound.
Read more about Charalampos S Arapidis