Hi I'm writing my own high level API of Amazon's PHP SDK which is used to manipulate DynamoDB, a nosql database.
I find myself writing roughly 150 lines of code for a single function that does one operation, including error checking, request building and of course, comments. If I keep going this way the API class can easily exceed a thousand lines, which I think is a bit hard to maintain.
Thus I'm thinking of breaking my class down into several smaller classes, each handling a set of operations. Say like, table operations, item operations, and batch operations. But I'm not an expert with software design patterns, so is this really a good way to modularize? Or is there any design pattern that I should comply and make my code easier to maintain?