Intro To Software Architecture
-
Upload
jason-ables -
Category
Technology
-
view
59 -
download
0
Transcript of Intro To Software Architecture
![Page 1: Intro To Software Architecture](https://reader030.fdocuments.us/reader030/viewer/2022032716/55b51b2abb61eb25698b46a2/html5/thumbnails/1.jpg)
Software ArchitectureEthode University
![Page 2: Intro To Software Architecture](https://reader030.fdocuments.us/reader030/viewer/2022032716/55b51b2abb61eb25698b46a2/html5/thumbnails/2.jpg)
“I hear and I forget. I see and I remember. I do and I understand.”
- Confucius
![Page 3: Intro To Software Architecture](https://reader030.fdocuments.us/reader030/viewer/2022032716/55b51b2abb61eb25698b46a2/html5/thumbnails/3.jpg)
The Big 3Follow these three simple rules for clean code.
![Page 4: Intro To Software Architecture](https://reader030.fdocuments.us/reader030/viewer/2022032716/55b51b2abb61eb25698b46a2/html5/thumbnails/4.jpg)
Stay DRYDon’t Repeat Yourself
![Page 5: Intro To Software Architecture](https://reader030.fdocuments.us/reader030/viewer/2022032716/55b51b2abb61eb25698b46a2/html5/thumbnails/5.jpg)
![Page 6: Intro To Software Architecture](https://reader030.fdocuments.us/reader030/viewer/2022032716/55b51b2abb61eb25698b46a2/html5/thumbnails/6.jpg)
Keep It Super SimpleComplexity is expensive. Less complexity = less bugs.
Less complexity = easier to read and understand.
Do the simplest thing that could possibly work.
![Page 7: Intro To Software Architecture](https://reader030.fdocuments.us/reader030/viewer/2022032716/55b51b2abb61eb25698b46a2/html5/thumbnails/7.jpg)
YAGNITrust in your ability to solve problems as they arise. Don't build
something now that you _might_ need in the future. If you don't need it now, or it's not in the requirements, do not build it.
![Page 8: Intro To Software Architecture](https://reader030.fdocuments.us/reader030/viewer/2022032716/55b51b2abb61eb25698b46a2/html5/thumbnails/8.jpg)
Good Rules of Thumb
- Keep your class, variable and method names verbose – avoid uncommon abbreviations
- Always think: “What am I actually doing?” – design your API the way you would want to use it. Tell your app to do something, don’t ask.
- Keep flow paths to a minimum: remove unnecessary else statements whenever possible
- Reduce complexity by keeping your indentations to one level ideally – forces you to extract behavior into more modular code
![Page 9: Intro To Software Architecture](https://reader030.fdocuments.us/reader030/viewer/2022032716/55b51b2abb61eb25698b46a2/html5/thumbnails/9.jpg)
The SOLID Principles
![Page 10: Intro To Software Architecture](https://reader030.fdocuments.us/reader030/viewer/2022032716/55b51b2abb61eb25698b46a2/html5/thumbnails/10.jpg)
S: Single Responsibility
Separation of concerns
- Routing- Validation- Filtering- Logging- Formatting
- Mapping- Notifications- Parsing- Object Creation- Rendering- Querying
![Page 11: Intro To Software Architecture](https://reader030.fdocuments.us/reader030/viewer/2022032716/55b51b2abb61eb25698b46a2/html5/thumbnails/11.jpg)
![Page 12: Intro To Software Architecture](https://reader030.fdocuments.us/reader030/viewer/2022032716/55b51b2abb61eb25698b46a2/html5/thumbnails/12.jpg)
O: Open/Close Principle
Don’t add a basement to a finished house.
![Page 13: Intro To Software Architecture](https://reader030.fdocuments.us/reader030/viewer/2022032716/55b51b2abb61eb25698b46a2/html5/thumbnails/13.jpg)
L: Liskov Substitution Principle
In other words: Design To An Interface. Whopper and BigMac both implement the HamburgerInterface
![Page 14: Intro To Software Architecture](https://reader030.fdocuments.us/reader030/viewer/2022032716/55b51b2abb61eb25698b46a2/html5/thumbnails/14.jpg)
I: Interface Segregation PrincipleKeep your interfaces small. By following this principle, you
will implicitly follow the Open/Closed Principle, win-win
Classes that implement interfaces should not be forced to implement methods that they do not use. Violation of this principle is a red flag that your interface is too big and should be broken down into smaller interfaces
![Page 15: Intro To Software Architecture](https://reader030.fdocuments.us/reader030/viewer/2022032716/55b51b2abb61eb25698b46a2/html5/thumbnails/15.jpg)
D: Dependency Inversion Principle
Communication between high level and low-level classes should be done through abstraction. In other words, reference interfaces and not concrete classes
- File System - Database - 3rd Party Libraries - Mailing - Web Services - Configuration
![Page 16: Intro To Software Architecture](https://reader030.fdocuments.us/reader030/viewer/2022032716/55b51b2abb61eb25698b46a2/html5/thumbnails/16.jpg)
![Page 17: Intro To Software Architecture](https://reader030.fdocuments.us/reader030/viewer/2022032716/55b51b2abb61eb25698b46a2/html5/thumbnails/17.jpg)
Onion Architecture
![Page 18: Intro To Software Architecture](https://reader030.fdocuments.us/reader030/viewer/2022032716/55b51b2abb61eb25698b46a2/html5/thumbnails/18.jpg)
Pattern RecognitionLearning different frameworks helps you recognize common architecture
patterns and which ideas consistently emerge as best practices.
![Page 19: Intro To Software Architecture](https://reader030.fdocuments.us/reader030/viewer/2022032716/55b51b2abb61eb25698b46a2/html5/thumbnails/19.jpg)
Most problems can be solved with another layer of abstraction.