Runescape Bits & Bytes
https://www.rsbandb.com/forums/

When is Preventing Duplicate Code a Bad Thing?
https://www.rsbandb.com/forums/viewtopic.php?f=38&t=88101
Page 1 of 1

Author:  Mr Bistro [ June 25th, 2016, 10:05 am ]
Post subject:  When is Preventing Duplicate Code a Bad Thing?

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?

Author:  Adbot [ June 25th, 2016, 10:05 am ]
Post subject:  Register and login to get these in-post ads to disappear


Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/