We are using ORM with bunch of database models and those ORM database queries (and models, of course) - are literally all over application from top to bottom.

And when change in model structure happens it wreaks havoc. Changes are expensive, difficult and stressful.

My suggestion is to surround database schema with nice, clear and consistent API.

It won't solve all of model change related problems, but it will contain most of them.

Furthermore, I think that it makes code more readable as well.

They won't even hear about it. I did tried to approach it very carefully with quotations, examples, still no avail.

Now, I'm starting to doubt my self. Maybe we should have database queries in every single part of application.

What do you think?

  • The database layer is just an implication of the actual problem: aligning your interests with those of your other team members. workplace.stackexchange.com may be a more suitable place to address this issue. – Frank Jun 21 '16 at 13:47
  • Ok, so, is database layer good idea or not? I'm not eve sure any more... – vbilopav Jun 21 '16 at 13:59
  • I don't think that is issue of aligning our interests. We all share same interest - make great software. What it differs our vision how to achieve it. – vbilopav Jun 21 '16 at 14:18
  • Yes, but we're not ConvinceMyCoworkers.com. – Robert Harvey Jun 21 '16 at 14:29
  • So, it is good idea after all and I should try to convince them? Or.... – vbilopav Jun 21 '16 at 14:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.