What is architecture? How things work.
What is the goal of architecting before coding?
- 80:20
- Spend more time figuring out how your code will work
- Spend less time writing code
But really...
- Reduce time spent rewriting code
- Improve code quality and cohesion
- Future-proofing code
- What is the goal of the feature?
-
Example: GPS
- Track and display all of the user's GPS motion activities automatically
-
What are the sub-features of the feature?
- What is necessary for the feature to operate
- What other features need to work with this feature (now or in the future)
- What existing functionality is there that can be reused for this feature
- Example: GPS
- Track an activity (in background)
- Differentiate between activities
- Store the activity data
- Compress the data before storing it
- Send the data to the server
- Retrieve the data from the server
- Display the activity data in
- Display the activity data in
-
How will everything work together?
- Research available technologies to implement every sub-feature and pick best option
- Determine all functionality required by all sub-features
- Example:
- Display the activity data in
- Display the icon, calories, and time for every activity
- Display the activity data in
- Display the icon, calories, and time for a single activity
- Display the activity data in
-
Group common functionality
- Example:
- Both and need to display the icon, calories, and time for an activity
- Example:
- Draft the architecture for the feature
- Create a new architecture file,
architecture/FEATURE_NAME.md
* Use the template * Example:architecture/GPS.md
- Be sure to describe, in as much detail, every section of the template
- Commit your architecture every day or two
- Present the architecture to a qualified party
- Make a [Pull Request](/Pull Requests/README.md) from feature branch to project branch
- Assign a qualified party
- Implement the feature
- Update the architecture as you go, especially the R&D section
- Update the architecture upon completing your feature
- Completion date, post-mortem, R&D, etc.