Pros and cons of object oriented programming - digitales.com.au

Pros and cons of object oriented programming pros and cons of object oriented programming.

I want to create a Customer business entity. Should this Customer class only contain properties and simple validation or should it also contain all the business logic and CRUD functions? Should I create a separate class called CustomerService that handles logic by passing around and working with the Customer entity? What are the pros and cons of each approach? In object-oriented systems reuse is acheived by programming to an interface instead of programming to am implementation.

Software Development

Once the Sales System Domain is constructed an interface will be defined for what a Customer represents in the problem domain. This may very well be similar to the interface defined for Customer in the CRM domain but not identical, as you've mentioned.

pros and cons of object oriented programming

With polymorphism and design patterns you can reuse the Customer class in both systems, encapsulate the common logic that is relevant to a Customer in both systems and still provide the minimal interface in both situations. I still advise you to wait until you actually require this feature and not get out of your way proggamming to support it now. Experience shows it is a lot easier to accommodate unpredictable future requirements when you accept the https://digitales.com.au/blog/wp-content/custom/general-motors-and-the-affecting-factors-of/solid-phase-microextraction-fibers.php that they are unpredictable and focus on the quality of implementation of the known requirements.

pros and cons of object oriented programming

I can also advise you to try and move as much logic as you can into the Customer class and remove its exposed properties in the process, this is in order to remove duplication and coupling exposed properties entail. But one argument I hear is that these business entities should be "light" if you plan on resusing via other services.

What is Object Pascal?

Why pack them with domain specific logic if you want share them with other applications. The reason I bring this up is that I've been looking at the Microsoft PetShop v4 application and it uses this approach.

pros and cons of object oriented programming

Are you planing to reuse these business entities via other services? If the answer is "not right now" then you are over-engineering. Lets say a Customer object. The object would contain all the business logic for the CRM domain.]

One thought on “Pros and cons of object oriented programming

  1. I think, that you commit an error. I can defend the position. Write to me in PM, we will discuss.

  2. What good interlocutors :)

  3. One god knows!

Add comment

Your e-mail won't be published. Mandatory fields *