Why is an object model necessary in project?
Nothing is necessary is any project. You need to ask a more specific questions. For example - If I'm doing a X type of project, is an object model necessary, or can I do Y?
The context of your question is important and helps us to provide answers you can really use.
It isn't. For example, you could use the Transaction Script without a domain object model.
An object model is recommended for most applications because object orientation is very good at dealing with complex business logic.
Even the smallest project tends to have some business logic, which may well grow, leading to many projects using an object model from day one...
Because it helps you understand what objects are required for a given project, as well as understanding how they link with each other.
Why is any kind of planning document needed in a project? Why not just generate a file of the appropriate size filled with random numbers, select an entry point and debug from there?
Nothing is "necessary" for a project aside from some way to enter and process code. The rest is there to:
- make projects easier;
- get them out the door faster;
- allow others to more rapidly come up to speed;
- permit even you to understand it better.
There are a myriad of tools for accomplishing these aims and the object model is one of them. It permits you to more rapidly understand, through visualization, what entities there are in your problem domain and how they relate to each other. It can, of course, if used improperly (which is, sadly to say, about 99.44% of the time) instead obfuscate the design or, worse, drive it in unnecessary directions. So can if
statements, however, so I don't generally view that as a strong condemnation of them.
I think a better question to ask, for future reference, would be "when are object models useful and when do they not apply?"