views:

91

answers:

1

I'm struggling with a classic legacy project: manual URL parsing and composition, manual routing etc. Knowing a bit of Catalyst I long for at least some of the concepts, for example proper (a.k.a. transparent) URL routing and parameter parsing for example. Ideally, I'd just use Catalyst and be done with it, but given it's a legacy project, I guess I only have two options:

  1. Somehow use parts of Catalyst in my project -- which I'm not sure is possible. Is it?
  2. Use single modules implementing parts of Catalyst's framework -- what are you experiences, which modules can be recommended?
+1  A: 

I have not tried this, but from what I have tried I don't think that it's really a viable option to take a legacy project and "Catalyze" it halfway. I don't think Catalyst is meant to be used in that way, and trying to do so will probably be far more effort than it is worth, especially since you'll be hitting edge cases all over the place that nobody else has any familiarity with (since they don't know about your legacy code).

It's hard enough just getting a legacy project to fit into MVC, without even considering which framework to use. So, IMHO, if you're going to do it, go for a full-assed solution:

  • If you can separate concerns in the legacy codebase, the effort from that point to getting the project fully under Catalyst is worth it.
  • If you can't separate concerns in the MVC sense, you aren't going to get any substantial benefit from using Catalyst or parts of it. Your efforts will be better spent on plain ole-fashioned refactoring.
Adam Bellaire