Software Architektur in der Wildnis Software Architecture in the Wild Oscar Nierstrasz Software Composition Group scg.unibe.ch Entwicklertage 2013
Roadmap What is Software Architecture? Challenges Software Assessment
What is Software Architecture??!
The theory... Constraints govern enable Components/ Connectors Properties/ Analyses 4
What is SA in the Wild? 5
Impact of SA constraints constraint Impact (1-5) availability 4.2 response-time 4.0 authorization 3.9 authentication 3.6 communication 3.4 throughput 3.4 signature 3.4 software infrastructure 3.3 data integrity 3.3 recoverability 3.1 dependencies 3.1 visual design 3.0 data retention policy 3.0 hardware infrastructure 2.9 system behavior 2.9 data structure 2.9 event handling 2.9 code metrics 2.7 meta-annotation 2.6 naming conventions 2.6 file location 2.5 accessibility 2.5 software update 2.2 6
Tool support constraint no verif. code review blackbox test whitebox test tool availability 0.35 0.06 0.23 0.06 0.10 0.19 response-time 0.11 0.14 0.33 0.08 0.17 0.17 authorization 0.05 0.23 0.38 0.18 0.15 0.03 authentication 0.13 0.25 0.38 0.16 0.03 0.06 communication 0.16 0.34 0.21 0.13 0.08 0.08 throughput 0.16 0.10 0.35 0.06 0.26 0.06 signature 0.15 0.33 0.11 0.07 0.07 0.26 software infrastructure 0.31 0.19 0.12 0.12 0.08 0.19 data integrity 0.14 0.19 0.22 0.22 0.08 0.14 recoverability 0.48 0.05 0.19 0.05 0.00 0.24 dependencies 0.14 0.39 0.03 0.00 0.22 0.22 visual design 0.07 0.14 0.43 0.04 0.04 0.29 data retention policy 0.16 0.24 0.32 0.18 0.08 0.03 hardware infrastructure 0.50 0.13 0.13 0.00 0.06 0.19 system behavior 0.08 0.28 0.32 0.12 0.08 0.12 data structure 0.16 0.42 0.16 0.00 0.16 0.11 event handling 0.23 0.35 0.15 0.12 0.12 0.04 code metrics 0.19 0.19 0.03 0.06 0.39 0.13 meta-annotation 0.14 0.33 0.14 0.14 0.19 0.05 naming conventions 0.27 0.51 0.03 0.00 0.11 0.08 file location 0.41 0.29 0.18 0.00 0.00 0.12 accessibility 0.21 0.07 0.43 0.00 0.00 0.29 software update 0.44 0.22 0.11 0.11 0.00 0.11 other 7
Architecture... depends on context 8
The architecture... is not in the code 9
The IDE focuses on code... not architecture 10
Software Assessment with Moose
Moose is a platform for software and data analysis www.moosetechnology.org 12
ConAn Van Hapax... CodeCrawler Smalltalk Extensible meta model Java Model repository COBOL C++ External Parser MSE Navigation Metrics Querying Grouping Smalltalk Nierstrasz et al. The Story of Moose. ESEC/FSE 2005 13
System complexity Lanza et al. Polymetric Views. TSE 2003 14
15
Mondrian Demo Demo: visualizing name cohesion within packages Meyer et al. Mondrian: An Agile Visualization Framework. SoftVis 2006
Case study: transaction scope in JEE applications Start a Transactions Inherit Transactions No attributes defined DB Data accessors base accessor Start an unnecessary Transactions Starts Unnecessary Transactions Supports Transactions DB Data Accessors base accessor Staring a starting Transactiona transaction 17
Start a Transactions Inherit Transactions No attributes defined DB Data accessors base accessor Start an unnecessary Transactions Starts Unnecessary Transactions Supports Transactions DB Data Accessors base accessor Staring a starting Transactiona transaction Recovery and Analysis of Transaction Scope from Scattered Information in Java Enterprise Applications, ICSM 2010 18
Functional Component Presentation Layer Local Case study: framework customization Core Components Business Layer Local s Core Local s 19
Functional Component Presentation Layer Local Core Business Layer Local Core Java Package Java Package Java Package Java Package Java Package Java Package 20
Duplication Functional Component Presentation Layer Local Functional Component Presentation Layer Local Core Core Business Layer Business Layer Local Local Core Core 40 local/global duplications 21
Duplication Functional Component Presentation Layer Local Functional Component Presentation Layer Local Core Core Business Layer Business Layer Local Local Core Core 78 local duplications 22
23
Challenges for Agile Software Assessment Agile Modeling Customization Continuous Assessment
Agile Modeling Load the model in the morning, analyze it in the afternoon
Problems Unknown languages Heterogeneous projects Unstructured text 26
Ideas Exploit conventions to infer program parts Exploit indentation to infer structure Exploit PL similarity to compose parsers Focus on islands (not water) 27
Customization Build a new assessment tool in ten minutes
Problems Enormous scope What are the right metaphors? How to integrate tools into the workflow? 29
Ideas Moldable tools Analyze developer needs Active recommendations 30
Continuous Assessment What will my code change impact?
Problems Diverse views of SA SA is not in the code The IDE focuses on code 32
Ideas Uncovering Software Architecture in the Wild Architecture monitoring (beyond dependencies) 33
The bottom line SA is not just dependencies Developers need custom tools The system is not just code