What is the difference between business class and domain class? What is meant by persistent classes?

A domain class is a class from the Domain Model that Martin Fowler describes as follow in Patterns of Enterprise Application Architecture: An object model of the domain that incorporates both behavior and data. At its worst business logic can be very complex. Rules and logic describe many different cases and slants of behavior, and … Read more

What good are public variables then?

By hiding the variable and adding methods now, the class designer allows for inserting arbitrary code into those methods in the future without breaking tons of code that use the attributes directly. Also note that providing a lot of accessor/mutator methods is generally a sign that your class design needs another look for possible improvement. … Read more

When is a class too big? [closed]

Step one is to adhere to the Single Responsibility Principle. If you can’t say in one sentence what your class does, then it probably does too much. Once you’ve narrowed that down, I don’t know that the number of methods really matters as long as your methods don’t do too much.