What are Business Objects and what is Business Logic?

后端 未结 7 1629
失恋的感觉
失恋的感觉 2020-12-23 11:40

When reading, I keep seeing references to what they call Business Objects. I\'ve looked up on Wikipedia and such but I keep not getting what a Business Ob

7条回答
  •  一整个雨季
    2020-12-23 12:18

    Well, a Business Object is generally considered to be a class that represents an Entity, e.g. a Book or a Store. Such a class has certain properties like price, colour, width, isbn number etc. In Java or .NET, it consists of so-called setters and getters, i.e. methods that set or get those properies.

    The Business Logic on the other hand is that part of a program that works with that properties, i.e. how is this book sold. The business logic layer uses the business objects in order to access the database.

提交回复
热议问题