in a book – I think it was Eric S. Raymonds “the art of unix programming” – I read sth. like that applications should be built by putting multiple small tools together.
So, I would like to know if it’s a good idea to develop a windows application, for example, by creating one small .exe for every task?
For example: You have a Document Managing System:
This could be put together like:
- an .exe for searching and displaying documents (GUI)
- an .exe for indexing document (put documents into a database)
- an .exe for deleting documents
- etc.
Do you think this would be a good idea or should it be put into one big .exe with multiple DLLs (this would be the way I saw most applications built)?
What would be the pros and cons?
In my opinion:
Yes and no. A few factors go into deciding whether or not a disparate .exe should be made. In the grand scheme of things, you have to decide whether the task that is being performed warrants its own file. A large factor is deciding this is whether or not it serves an independent purpose from your central application. Following this, you also have to decide whether your application is localized into one package or is more of a series of utilities that can be utilized independently.
From a user-perspective, people don’t like having multiple programs open at once. Going back to your example, here’s how I would do it. I would have one .exe as the main program for:
And then have a separate .exe that acts as a background indexer, performing the second functionality that you listed.
Really, it should be something evaluated on a case-by-case basis, keeping in mind intelligent UI design from multiple perspectives.
Edit: Also, you may find yourself in situations where alternative means of separation are more suitable (i.e. tabs, dialog boxes, etc.)