Note that there are some explanatory texts on larger screens.

plurals
  1. POQuestions about Blob anti-pattern in C++
    primarykey
    data
    text
    <p>I am developing a video player for our department using C++.</p> <p>This video player has three core modules: Reader(for reading data packets), Processor(decode the raw data), Display Handle(draw data on the screen). They are not close-coupled classes, which means they perform their jobs sort of independently. </p> <p>However, I have a GUI module that interfaces these three modules and the client. It will retrieve the commands from user, such as pause, continue, jump to a particular location in the video clip. This GUI module will then delegate the jobs to the three modules mentioned above. As a result, this GUI module grows fairly big as it contains many functions that the client will interact with. Though again, I am really careful that I don't let this GUI module do any real processing tasks(they are done on the three core modules), I am afraid this GUI module becomes a God Object or "Blob" which is an anti-pattern in Object-oriented design.</p> <p>This is the sample declaration for the GUI module here:</p> <pre><code>class CorePlayer { public: CorePlayer(); ~CorePlayer(); public: void start(); void pause(); void continue(); void jumpToFrame(int frameNum); void toggleFullScreen(); ......... private: Reader* rModule_; Processor* pModule_; DisplayHandle* dspHandle_; } </code></pre> <p>There are a lot more functions in the ........ area. They are functions people need for the media player. They don't perform the real processing, they delegate jobs to the modules. </p> <p>Can anybody help to clarify my concerns that this GUI module is a "Blob" using the design described?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload