supermanzer / NDBC

Repository for housing Python code for fetching, parsing, and loading NDBC data into a local Python object for analysis.
MIT License
13 stars 4 forks source link

Review Splittng Features Across Mutliple Objects #33

Closed supermanzer closed 3 years ago

supermanzer commented 3 years ago

One of the beauties of Object Oriented Programming is multiple inheritance. Considering the number of methods and properties in the DataBuoy class, it may make maintenance and code review easier to follow. This was inspired by the time I've spent looking through the Django and Django-REST-Framework source code.

Pro

Con

Will review and either suggest splitting up functionality into multiple classes or not

supermanzer commented 3 years ago

Update

Additional Pro

Decision

Breaking up DataBuoy class is a Go.

First draft would be to split DataBuoy functionality into two more generalized classes that handle

Functionality that is inherently specific to NDBC data stations will remain in the DataBuoy class. In all three classes I will endeavor to replicate the static variable/getter function approach used throughout classes like Django Class Based Views to allow researchers to easily extend these classes for more customized functionality.