Re: Experimental "peer to peer" modular programming concept
- Posted by ryanj May 08, 2015
- 1675 views
I don't know RedyCode specifically, but in general, it's better to do the last heroic effort to move significant part of the code into generic library. Many times there is a way, although it's not obvious at all.
I wouldn't use a pattern (or tasks) unless I'm totally convinced that there is absolutely no way to create generic libraries for processing data, etc. In case that there is a way - a pattern might be not suitable.
There is nothing more modular then generic code, so it's worth a true effort.
I find that large programs have lots of GUI code mixed with data processing, and i have a difficult time making it modular, because there is always a higher layer that has to control all the modules by calling public/export routines. That higher layer grows and grows until it is 1000-2000 lines of code in a single file and i get so lost, i can't even finish adding all my planned features. This publish-subscribe design doesn't require a higher level to control modules, but instead a lower-level library that all modules include and control. Then, many small include files can handle specific parts of the GUI and/or data processing of a large program.