Yes and no...I'm a real stickler for organization and so it's only natural I follow a divide and conquer approach with software development. If I found something was requiring tons of direct calls - it's highly likley I could refactor and abstract that code into it's own higher level class.For more complex queries (which you seem to be avoiding for now), this could be several lines of query code to get to the stuff you want
How so? Unless...I'm guessing we not on the same level here as I just said they will likley be wrapped when complexity sneaks in...just not as a Data Wrapper or ORM in the strictest sense.Sooner or later you'll spend more energy organizing these direct database calls than if you reorganized into wrappers.
Thats obvious. But you need to understand your requirements (ie: target audience & feature requests, etc) to understand when abstraction is needed and/or dependency management becomes an issue. I am confident, at this level, the technique I am using is the best approach considering all factors.Okay, here's the thing: sometimes there are required dependencies. It makes no sense for a clock widget not to have a dependency on some time mechanism. It makes no sense for a FruitMapper not to have a dependency on the Fruit object, which it creates. You can't "remove" the dependencies, but you can make them easier to move around by using a separated interface
I wanted to start a disscussion on using this approach not an argument on what someone thinks is a better approach. I've been in the game long enough I think I'm capable of making an executive decision like this...
Oiee...sorry man...long day and I'm frustrated...perhaps I have already exhausted all pros and cons of this approach...and thus left no one with anything left to say, other than to turn this topic into a disscussion of ORM and/or Data Mappers.
I'm interested in hearing comments like:
"Sooner or later you spend more time managing direct SQL calls then you would dealing with an Data Mapper"
That was good, made me think twice...although I seen that coming...it never hurts to hear the truth more than once.
Anything else?
Cheers