July 3rd, 2020

So I had this problem. I need to get 17++ variations of CSV files for price/inventory updates.

Perfect place to make a parent class with most of the common functionality and child classes where each child overrides functions:

  • loadCSVFile() //uniquely fetches inventory/price file from FTP, Email Attachment, SFTP, HTTP, etc.
  • updateProducts() //parses files specific fields, nomalize the data and store it

Parent class saves everything to the db once data is normalized.

Outcome:

Very good.

Posted In:

ABOUT THE AUTHOR:
I am TSLA Long. Model 3 Owner. Brother of a Model 3 owner. Son of a Model S owner. I have reservations for Slate Roof and Cybertruck. I am a Tesla speculator and fanboy. I am not a financial advisor. Investing in anything comes with inherent risk. This is not financial advice.