Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

A small team and I are tasked with developing a web site. The client has referenced a particular open source project (we'll call it X) when describing some of the features. Because of this, the team wants to start with X and adapt it to satisfy the client. I have looked at X and its code and, in my opinion, it would be unwise. However, my experience is limited, and could really benefit from the insights of others so that I can figure out what I should be asserting as the right direction for the team.

My red flags are going up and this is why. X was developed in the earlier days of PHP; 500 line blocks of code are the norm; global variables are abundant; giant switch cases are the norm for switching between which page is shown. There is no clear mapping between URL and where the code for that page sits. From a feature-set standpoint, X is actually software specialized for a different task and has dozens of features we don't need or have use for that come as core assumptions. We will be unable to adapt X through its plugin system.

That said, there are a few features which can be mapped, with some modification, to suit our purposes. I believe this is the attraction the team feels.

I would feel comfortable if, instead of using X directly, we lifted what is salvageable and useful to us. We can then use that code, and the same 3rd party libraries X is using, in a new code base built on top of a PHP web framework (particularly Agavi, so you understand what I mean by 'web framework'). The web framework gives us a strong MVC structure and provides the common facilities for web development, or adapters to work with 3rd party libraries that do so. We will also have a clean slate feature-wise to work from, which means we can work additively instead of subtractively. Because the code base is better structured, and contains none of what we don't need, it will be easier to document, which is a critical requirement of our client.

So to summarize, the team wants to use X, whereas I want to take the bits we can from X and use a web framework instead. I want to bounce this opinion off of other's experiences so that I can be more informed.

share|improve this question
X is Wordpress, isn't it? –  Yannis Rizos Nov 23 '12 at 18:18
No, but based on the last time I looked at Wordpress (couple years ago), the type of code quality is similar. I just didn't want to rile people up by negatively reviewing software they like, which isn't the focus of the question, so I called it X. –  erisco Nov 23 '12 at 18:22
When I first started programming, I had an "old timer" once tell me that if you have to customize something more than 20%, you would be better off writing it from scratch. Looking on the web for something to back that up... –  Walter Nov 23 '12 at 19:22
Early days of php? I'm guessing PHP-nuke or one of the derivitives. –  GrandmasterB Nov 23 '12 at 19:33
add comment

closed as too localized by Jim G., gnat, Walter, thorsten müller, Yusubov Nov 24 '12 at 16:42

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

up vote 1 down vote accepted

If you're in a decision making position, I strongly recommend not taking a project where what you feel comfortable doing and what the client is asking for are at odds. You will not consciously sabotage the project, but you are setting yourself up for frustration and unhappiness.

If you're not in a decision making position, I strongly recommend not delivering something substantially different than what was agreed to.

If you're providing inputs to someone in a decision making position, here are the key points to consider. The value in reusing existing software comes when the following are true:

  1. You do not have to write as much of your application.
  2. The structure of the tested project is better than what you could have come up with.
  3. It is easy to find plugins, documentation, etc for the existing software.
  4. The existing software is under active maintenance, so you have reason to believe that there will be future improvements that you will get fairly cheaply.
  5. There is a large community of people who have experience and familiarity with the project.

However there can be negative value in reusing existing software. It comes from the following:

  1. It saves you less work than you hoped for.
  2. The structure it pushes on you is not a good fit for your application.
  3. The project looks likely to die, forcing you to choose in the future between a big revision or being stuck with old versions of stuff.
  4. You are forced to customize the software in ways that make pulling updates difficult. (Sometimes you can prevent by contributing your changes upstream.)
  5. The software is being targeted for exploits, requiring you to keep track of security issues.

The direction that you're suggesting guarantees that you're not going to get most of the benefits, and also increases the odds that you're going to get more of the penalties. I would therefore suggest studying it for inspiration, and then if it is not a very good fit, not using it at all.

(If I was being snarky I'd also suggest not using PHP at all, but I did my best to resist. My best is not always as good as I would like...)

share|improve this answer
This is immensely useful. Thank-you. –  erisco Nov 24 '12 at 2:15
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.