- How do I decide what parts of my program should be based on classes?
- Is it possible to go OO crazy and needlessly complicate the program? How do I KISS?
- Are there any tools or resources that can help model a program from the onset using an OO design pattern?
- Can I write a serious program without OO or should I resign myself to staying in script kiddie land until I learn it properly?
- Should I look into another paradigm? Is my only other choice to use a functional langauge like F# or Clojure?
But this simulation concept is not particularly well adapted to the world of business and information technology. Business is highly data driven and most business objects are defined as data. The objective of business software is typically to process input data (lots of it) and produce output data. There is little real world evidence to show that this can be done easier, faster or more efficiently using OOP.
In my opinion, unless you're creating a real world simulation of some sort that will exist entirely within computer memory, binding data and code together offers little practical, real advantage. When it comes time to communicate or store business data, the OOP code/data binding actually becomes more of a hinderance.
This is not to say that OOP is not useful. It's no surprise that one of the most popular applications of OOP is building graphical user interfaces --- an on-screen simulation of a paper data form that is built and exists entirely within computer memory.
Applying OOP to problem spaces where it is not well suited often results in slower, more complex, harder to maintain applications. Instead of spaghetti code, OOP programmers all too often tend to create spaghetti objects that obfuscate more than enlighten.
I very rarely use inheritance. I can’t remember the last time I added inheritance but I sometimes come across it in code bases. Normally when there are something resembling UI widgets that have a common base.
Instead I use c# interfaces for polymorphism (which basically means working with objects you don’t know what they are, e.g. I have something that behaves like a list, so i can call addItem() )
My first advice is don’t worry - if your code works and is understandable all is good.
My second advice is post your code for code review, or get a mentor or coach to help show you if and how your code could be better with OO
Functional programming avoids the need for OO but comes with its own “what is the best way to do this” type questions to which I give the same advice.
> Can I write a serious program without OO...
Absolutely! See any program written in a functional only language, or C.
> Should I look into another paradigm?
Eventually... I'm personally a huge fan of Clojure. That said, don't give up on OOP. It's pretty unavoidable in industry.