Boundaries – Functional Core and Imperative Shell

Designing module boundary is an important factor on developing a software. As it grows, number of paths and its combination grows exponentially. Then, it becomes difficult to pick paths to test, since it’s not feasible to test all the possible paths.

One idea is to isolate modules into smaler pieces by making “values” as boundary, rather than the message communications. It reduces the dependency, and removes the complex mocking codes.

Another idea is to seperate modules into 2 different types, which are functional core and imperative shell. Functional core provides logics in a isolated manner. It has few dependencies and many paths, which is suitable for unit testing. Imperative shell provides the adapter functionality wrapped around the core. It has many dependencies and few paths, which is good for integration testing.


Posted on October 6, 2013, in Conference, Ruby, Software Design. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: