O'Reilly logo

Software Architecture with Python by Anand Balachandran Pillai

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Exploring strategies for modifiability

Now that we have seen some examples of good and bad coupling and cohesion, let's get to the strategies and approaches that a software architect can adopt to improve the modifiability of the software system.

Providing explicit interfaces

A module should mark a set of functions, classes, or methods as the interface it provides to external code. This can be thought of as the API of this module. Any external code that uses this API would become a client to the module.

Methods or functions that the module considers internal to its function, and which do not make up its API, should either be explicitly made private to the module or should be documented as such.

In Python, which doesn't provide variable access scope ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required