OOP&D
July 3rd, 2020So 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 long TSLA and TSLA options. I am not a financial advisor. Investing in anything comes with inherent risk. This is not financial advice.
Patreon Support:
Benefits Include
- Set Climate & Heat Seats from App
- Top Safety
- Lower Fuel Costs
- Mobile Service
- Autopilot
- Dashcam
- Security Monitoring System (Sentry Mode)
- Dog Mode
- Great Handling
- Acceleration
- Great looking cars
- Netflix/Youtube
- Video Games
- CARAOKE
- Full Self Driving Beta
- Super Charger Network