Home Page Icon
Home Page
Table of Contents for
II. Modularization
Close
II. Modularization
by
Learning Test-Driven Development
Preface
What is Test-Driven Development
A technique
Designing and structuring code
Enhanced simplicity
Increased confidence
Who is this book for
What are the prerequisites for reading this book
How to read this book
Follow the book one language at a time
Follow the book in two languages first and then in the third language
Follow the book in all three languages simultaneously
Conventions used in this book
Typographical conventions
Lexical conventions
Using Code Examples
The Apologies
Why does this book use Go, JavaScript, and Python?
Why not this other language?
Why does this book have a “Chapter 0”?
Chapter 0 - Introduction & Setup
Setting up your development environment
Common Setup
Go
JavaScript
Python
Where We Are
I. Getting Started
1. The Money Problem
Red-Green-Refactor — The Building Blocks of TDD
What’s the problem?
Our first failing test
Go
JavaScript
Python
Going for green
Go
JavaScript
Python
Cleaning up
Go
JavaScript
Python
Committing our changes
Where We Are
Go
JavaScript
Python
2. Multi-currency Money
Enter the Euro
Go
JavaScript
Python
Keeping code DRY
Go
JavaScript
Python
Didn’t we just say “Don’t Repeat Yourself”?!
Divide and Conquer
Go
JavaScript
Python
Cleaning Up
Go
JavaScript
Python
Committing Our Changes
Where We Are
Go
JavaScript
Python
3. Portfolio
Designing our next test
Go
JavaScript
Python
Committing our changes
Where We Are
II. Modularization
4. Separation of Concerns
Test and Production Code
Unidirectional Dependency
Dependency Injection
Packaging and Deployment
Modularization
Removing Redundancy
Where We Are
5. Packages and Modules in Go
Separating our code into Packages
Go Modules
Creating a package
Encapsulation
Removing Redundancy in Tests
Committing Our Changes
Where We Are
6. Modules in JavaScript
Separating our code into Modules
A segue into JavaScript Modules
CommonJS
Asynchronous Module Definition (AMD)
Universal Module Definition (UMD)
ESModules
Improving Our Tests
Removing redundancy in tests
Adding a test class and test methods
Discovering and running tests automatically
Produce output when tests run successfully
Run all tests even when an earlier test assertion fails
Committing Our Changes
Where We Are
7. Modules in Python
Separating Our Code into Modules
Removing redundancy in tests
Committing Our Changes
Where We Are
III. Features and Redesign
8. Evaluating a Portfolio
Mixing money
Go
JavaScript
Python
Committing our changes
Where We Are
9. Currencies, Currencies, Everywhere
Making a Hash(map) of Things
Go
JavaScript
Python
Committing our changes
Where We Are
10. Error Handling
Error wish list
Go
JavaScript
Python
Committing our changes
Where We Are
11. Banking on Redesign
Dependency Injection
Putting it all together
Go
JavaScript
Python
Committing our changes
Where We Are
IV. Finishing Up
12. A Living Document
Changing exchange rates
Go
JavaScript
Python
Committing our changes
Where We Are
13. Continuous Integration
Core Concepts
Version Control
Build Server and Agent
Artifact Repository
Deployment Environment
Putting it all together
Create Github account
Verify Github account
Push code repository to Github
Prepare for CI build scripts
Go
JavaScript
Python
Committing our changes
Where We Are
14. Retrospective
Profile
Cyclomatic complexity
Coupling
Succinctness
Purpose
Cohesion
Completeness
Process
Putting it all together
Go
JavaScript
Python
Where We Are
A. Development Environment Setup
Online REPLs
Repl.it
LeetCode
CoderPad
The Go Playground
The comprehensive list of online REPLs
Integrated Development Environments (IDEs)
Visual Studio Code
IntelliJ IDEA
Eclipse
Installing Language Tools
Go
JavaScript / ES6
Python
B. A brief history of the 3 languages
Go
JavaScript
The assert module
The module mechanism
Python
C. Acknowledgments
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
3. Portfolio
Next
Next Chapter
4. Separation of Concerns
Part II.
Modularization
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset