Posts tagged "refactoring"
I’m going to outline an example to make the concept clearer:
You need to send a recurring email to some users (a newsletter for example), based on some business logic.
The business logic / user story could say:
"As a user
I want to receive an email every week
So that I can stay up to date with the latest news."
This is intentionally a contrived example to reduce the scope of the exercise.
Topics, Approaches and Tools
Concepts discussed below are
- SOLID principles
- Single Responsibility Principle
- Open-Closed Principle
- Dependency Inversion Principle
- Reason for a software component to change
- Test doubles like Spies and Stubs
- Collaborators in tests
- User Acceptance tests
- Unit tests
On the technical side, I am going to use the following tools
devblogis yet another lightweight static site generator. Although there are widely used SSG like 11ty (which this blog was previously based on), Jekyll (also previously used), GatsbyJS and many others, I wanted to get my hands dirty and understand how to make the process of building a static blog even simpler, if possible. Even simpler in the sense of "it does just what I need and nothing more". Install via
npm i -g devblogor create a blog with a one-liner
npx devblog init my-new-blog,
cd my-new-blogand serve with
npx http-server _site 8080. It's that easy. Rebuild the blog by running
npm i -g devblogand then just run
devblogin the main directory) Continue reading my story of building