modularity and api design
TRANSCRIPT
1
Modularity andAPI Design
January 2015Johannes Kepler University Linz, Austriahttp://www.jku.at
Jaroslav Tulach (@JaroslavTulach)
Lukas Stadler
Thomas Wuerthinger (@thomaswue)
2
Goals
● Why is modularity essential?
● How to scale the development of a large software system?
● Why are APIs like stars?
● How to design an API that is extensible without breaking backwards
compatibility?
● What modularity and API design concepts are relevant in languages other
than Java?
● What are modularity concepts in NetBeans?
● Project
3
Don't reinvent the wheel!
4
5
Learning Curve
Results
Effort
Reuse
Reinvent
6
Object Oriented Spaghetti Code
≈ O(n2) dependencies
7
Module System
≈ O(n) dependencies
8
Tracking impacts
9
Information Hiding
Public API
Module B
Implementation
Module A
10
Limits are your friend!
Restrict dependencies
Small public API
11
Clean Structure
Results
Effort
Quick & Dirty
Clean & Modular
12
Distributed Development
Public API
Implementation
Module User Module Developer
sees publishes
creates
13
Mechanisms in Java
Access modifiers only at class level -
Custom class loaders!
JDK9: New modularized JDK
14
GOTO vs IF, WHILE, …
=
unrestricted OOP vs modular programming
?
15
16
Application
Architecture Eclipse/NetBeans
Platform
Swing / JDK
Java VM
IDE
17
Detailed Architecture
Swing / JDK
Java VM
Application
Platform
IDE
● Standalone: Deployment including required platform / IDE modules
● Plugin: Deployment only with user-defined modules