Functional dependencies diagram

I’m searching for the correct type of diagram in which I can see all dependencies between the functions, classes and files of my Python program (multiple files). It’s for cleaning purposes.

So my question is: Which diagram should I use? I though about Class Diagram, but there are no dependencies between functions (which function uses which function, which class or file uses functions from which class or file, etc.).

1

I once participated in a Python project in which we had to employ some pretty long and confusing data processing steps. In order to maintain the minimal modularity, we developed a system in which data would flow from one class to another through a very long chain. Each chain link would only need to know the calling interface of the the “next” step of the chain. This way we could test the overall process by testing interactions between those adjacent links (classes e/or modules) and at each “link” only the necessary, specific, processing logic. Note that the “long flow” was actually a domain logic/requirement.

In no time this structure led to a very, very unmaintainable code. The problem was that the flow chain was too long, rendering the processing logic impossible to grasp from a higher perspective (i.e. the big picture). Although we could clearly understand the adjacency steps, we could not see how data was being processed/modeled throughout the chain.

We decided then to use an activity diagram, in which we tried mapping the different program flows, decisions, method calls, etcettera. We chose an activity diagram for the fact that it allows you to go from in-procedure detail level to class level or communication/interaction levels. We could abstract when we needed to and we could dive deep into algorithm logic when necessary.

We used swim lanes to represent classes/modules, and within them we depicted as much details as necessary of what that class would actually do. The lines flowing from one swim lane to another would allow us to understand how classes actually communicated, and the lines inside the swim lane itself, how that specific class would do it’s own job.

In the end it wasn’t the most formal Activity Diagram, but it was actually good enough to ensure we could grasp the process from a higher perspective. This allowed us to comprehend better how our system interacted and to improve it, specially reducing the chain length.

After refactoring code and cleaning up the chain structure, we actually had to throw away the Diagram, since it was completely different and maintaining it would cause much work without many benefits. We would rather build up a new one whenever we felt the need for it, we used diagrams as a communication tool rather than documentation.

Whether or not that original chain-like design was adequate would be another matter. Anyway, after this experience I think Activity Diagrams are a good place to start if you wan’t to have a better view of your system/code for “cleanup” purposes. The main disadvantage is that it is hard to actually have a program structure (hierarchies, relations, etcettera) of your code.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật