I'm about to start working on a very ambitious project that, in my opinion, has some great potential for what concerns the basic concept and the implementation ideas (implementation as in how this ideas will be implemented, not as in programming).

The state of the code right now is unluckily subpar. It's vanilla php, no framework, no separation between application and visualization logic. It's been done mostly by amateur students (I know great amateur/student programmers, don't get me wrong: this was not the case though).

The clients are really great, and they know the system won't scale and needs a redesign. The problem is, they would like to launch a beta ASAP and then think of rebuilding.

Since just the basic functionalities are present now, I suggested it would be a great idea if we (we're a three-people shop, all very proficient) ported that code to some framework (we like CodeIgniter) before launching. We would reasonably be able to do that in < 10 days.

Problem is, they don't think php would be a valid long-term solution anyway, so they would prefer to just let it be and fix the bugs for now (there's quite a bit) and then directly switch to some ruby/python based system.

Porting to CI now will make future improvements incredibly easier, the current code more secure, changing the style - still being discussed with the designers - a breeze (reminder: there are database calls in template files right now); the biggest obstacle is the lack of trust in php as a valid, scalable technology.

So well, I need some examples of great php applications (apart from facebook) and some suggestions on how to try to convince them to port soon.

Again, they're great people - it's not like they would like ruby cause it's so hot right now; they just don't trust php since us cool programmers like bashing it, I suppose, but I'm sure going on like this for even one more day would be a mistake. Also, we have some weight in the decision process.

  • Are your programmers actually able to rewrite in another language? Or do they only know PHP? Feb 11, 2011 at 4:43
  • @Carson63000 We've mostly worked on php/js together. Two of us (me included) are very good at python (limiting this to stuff related to the web), while the other is great at C# (we've only played with it though). All of us come from solid backgrounds, and we experimented with lots of web frameworks (rails, django) so that won't actually be the problem. I'm just scared that the codebase might grow in this inordinate way before porting - I've had terrible experiences with procrastination. Feb 11, 2011 at 4:52
  • I admire your confidence, personally I wouldn't be so sure that building "a very ambitious project" with frameworks that I had only experimented with, or in a language that only some team members had done more than just play with, wouldn't cause any problems! Feb 11, 2011 at 23:59
  • @Carson63000, it's conceptually ambitious. The actual code would be pretty trivial. Feb 12, 2011 at 1:10

3 Answers 3


What's the real issue here? To me it looks like you just want to rebuild the thing today in PHP and not in Ruby / Python. You all agree on rebuilding, only not the timing and the language. PHP, Ruby and Python all have great frameworks to build great sites with. It would make sense to pick the one you guys have the most experience with. About the timing: it might be a great business opportunity to go live asap.

Oh, and in my experience a rebuild always takes more time than you think. Especially if you want to 'do it right' the second time.

  • Actually the language isn't much of an issue - it is since we all want to go live asap, and we'd like to move it to a framework first; the 10 days are a realistic estimate based on previous works. And anyway, the time for fixing bugs and adding some small new features on this codebase won't exceed the refactoring time. Feb 11, 2011 at 20:17

I think the following two articles might be worth reading in your case.

Summary: Don't throw away working code.

Don't get me wrong. I profoundly dislike PHP and I think only frameworks make it bearable. I don't know how much work has been put into the existing code base and how stable the actual application is.

The question is, how many working features are you throwing away to rewrite them. This doesn't only mean reimplementing, but also testing and fixing. Also, when you rewrite a software from scratch, you risk falling prey to the second system syndrome.
So if you feel a rewrite is the only possibility, restrain yourself. Focus on the core features instead of trying to leverage all the features of the platform+framework you use.

If you really want to drop PHP, then I think haXe is worth a try. You can target PHP, NekoVM and nodejs. Unlike all mentioned languages, it is strictly typed, which - from my experience - greatly helps writing clean and robust code. As framework, haXigniter is probably the best to use, but there's a number of alternatives.

  • I don't actually want to throw away code - just to use the existing functions; wrap them in classes; separate them from the presentation logic. Thing is, we don't want to rewrite code from scratch, but that's exactly what will happen if we go on with the existing codebase. Our clients want to move to other technologies in the near future; we think we should make our code decent before launching. Feb 11, 2011 at 20:21

Your not alone, in wanting and expecting clients to want better code, and better practices.

Will rarely ever happen in your career, most just want their features and design done now, even if it is crappy code or design....

The only way you can get them interested in doing it wisely and more professionally, is by showing financial and/or real long term pro's and con's.

For example after 1+ years with this 1 company, I still can't get them to even do basic source control. Lol :P

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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