Department of Computer Science, The University of Akron
Concerns
A concern is a particular set of information that affects the code of a computer program
A section of conceptual information
Want to identify concerns
Want to separate concerns
Separating concerns is the primary tool we have to reduce complexity and complications
Why Identify Concerns
Clarify Functionality Recognizing distinct sets of information (or concerns) helps understand what each part of the system is responsible for
Enhance Communication When team members understand the different concerns, collaboration is improved, and miscommunication is reduced
Map Requirements to Code Identifying concerns ensures that each functional requirement is addressed explicitly in the code
Reveal Cross-Cutting Issues It helps pinpoint concerns (e.g., logging, security, error handling) affecting multiple application parts
Prevent Overlap and Duplication By knowing all the concerns, developers can avoid redundant code and overlapping functionalities
Facilitate Refactoring A clear map of concerns makes updating or refactoring specific aspects easier without unintended side effects
Why Separate Concerns
Improve Modularity Separating concerns leads to a more modular architecture, making the system easier to understand and manage.
Enhance Maintainability Changes can be made to one part of the system with minimal impact on others, simplifying debugging and future enhancements.
Boost Reusability Isolated components are easier to reuse across different projects or within different parts of the same application.
Simplify Testing With concerns separated, individual components can be tested in isolation, leading to more reliable and targeted tests.
Reduces Complexity Breaking down a system into distinct, manageable parts decreases overall system complexity, making it easier to reason about
Enables Parallel Development Teams can work on different concerns simultaneously without interfering with one another, speeding up the development process
Aligns with Best Practices It adheres to design principles like the Single Responsibility Principle (SRP), ensuring that each module has one clear purpose
srcFacts: Concerns
srcFacts report - The source code counts
Markdown - Markdown syntax, table format
srcML - An XML application consisting of XML elements specifically for source code
XML concepts - The parts of XML, and how we get them
XML parsing - What is valid XML, how to parse at a low level
srcML & XML
srcML is an XML application and one of many, e.g., XHTML
To use srcML, you must know about the XML format and an interface to an XML parser
However, to use XML, you do not have to know anything about srcML
To use an XML parser, you should not have to know anything about low-level XML parsing