|
| |
|
Business Objects are used in most modern programming languages to define what ‘things’ are used by a system and how they will store their data in and retrieve it from a database file.
|
| |
|
For Example: a business object for a Book object would have properties for the name of the book, the author, etc. Then the business object would have methods for saving the object to the database and for retrieving it from the database. Somewhere there would be a database file with a table for Books which would contain columns for each piece of data in the Books object.
|
| |
|
The business object for the book connects to the database via a data object, which contains methods which actually talk to the database either with direct database calls, or with RESTFUL web services. Both business and data objects are implemented as Classes in Python.
|
| |
|
Usually a business object project will contain some utility classes to take care of things which are not handled by other objects. The utility objects will handle logging errors, sending notifications, creating test objects, etc.
|
| |
|
The business objects classes lend themselves to easily being tested.
|
| |
|
I will be giving coded examples of actual working business and data objects in later posts.
|
| |