Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: When is Preventing Duplicate Code a Bad Thing?
PostPosted: June 25th, 2016, 10:05 am 
Mithril Member
User avatar

Joined: July 10th, 2012, 9:20 am
Posts: 134 us
RS Name: Mr Bistro
RS Status: P2P
One thing that I have been really working on is preventing duplicate code in a websites codebase. This helps reduce the overall size of the codebase as well as make sure everything is centralized. But can to much of this be a bad thing?
I would say for the most part no. But there are situations where duplicate code should be acceptable. If the code base is being run from two different servers, and this really pertains to legacy websites with their front end and back end sites, should have duplicate code. The site should not have to ask for something from a different server in order to run a sanitize method or a clean up phone number format method.

I work heavy in php and the site that I develop has a 16 year old code base so it's riddled with all sorts of coupled together crap. The talks are that the files that are being shared should be put onto a third server so they are stand alone and I disagree with this. The code base for front and back end features should only be on two servers and they best method to decouple them would be to duplicate the files that are being required from both and make sure the front end has its own copy and the backend has it's own copy. This will help ensure that there will be no coupling issues and reduces technical debt.

What do you guys think?

 Post subject: Register and login to get these in-post ads to disappear
PostPosted: June 25th, 2016, 10:05 am 
Mithril Member

Joined: September 9th, 2004, 1:47am
Posts: 9047
Location: In your web browserz

Display posts from previous:  Sort by  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to: