News for hackers. Stuff that matters.
Re:Keep Your ORM Out of my Controller by richcollins on Thursday August 26, 2010 @03:56PM (#1636989)
Now your boss has decided he wants this example search on 6 different pages (that require 6 different controllers). What do you do?

  Copy/paste the query within all 6 controllers
  Create a class with a method (or just a function) to handle it

Why is the idea that you shouldn't duplicate code novel enough to make it to the front page of HN?

There are no comments on this comment yet.