Over the last few years, we've done a great job with this for a lot of our tables. WPSC_Purchase_Log, WPSC_Checkout_Form, WPSC_Checkout_Form_Data to name a few.
There are still a few tables where we don't have any helpful APIs wrapped around them. Having these abstraction layers helps us lay a unit-testable foundation for the potential of ever moving to a different database layer for these APIs, or a custom post type, or a RESTful response rather than a database layer. Lots of potential and improvements come with a properly abstracted data layer.
Looking through the current custom tables we have, we don't have abstractions for the following tables:
Custom tables we add that do have APIs (and the related classes):
Over the last few years, we've done a great job with this for a lot of our tables. WPSC_Purchase_Log, WPSC_Checkout_Form, WPSC_Checkout_Form_Data to name a few.
There are still a few tables where we don't have any helpful APIs wrapped around them. Having these abstraction layers helps us lay a unit-testable foundation for the potential of ever moving to a different database layer for these APIs, or a custom post type, or a RESTful response rather than a database layer. Lots of potential and improvements come with a properly abstracted data layer.
Looking through the current custom tables we have, we don't have abstractions for the following tables:
Custom tables we add that do have APIs (and the related classes):
WPSC_Purchase_LogWPSC_Claimed_StockWPSC_CouponWPSC_Checkout_Form_DataWPSC_Countries/WPSC_RegionWPSC_Country / WPSC_CountriesWPSC_Checkout_Form