Question

I have several maintenance tasks which I need to update / rewrite and I'm unsure of the best approach to take.

Current the maintenance tasks are flat PHP or Perl scripts and I could use the same approach but if feels a bit haphazard and not well structured with the potential for a lot of duplication and confusion.

I had though of using a micro-framework like cilex / silex as the code would be a lot more structured, run from on place rather than anywhere in the filesystem, potentially easier for other to pick up (after the initial learning curve), vendors can be included using composer so you can get access to a decent amount of pre-existing bundle rather than re-inventing the wheel. The approach feels a lot better but then if I was ever to re-write the website in Symfony2 how easy could the tasks I write on cilex/silex be to import into a full Symfony2 project.

For the above reason I also though of just using a full symfony2 project but it feels a bit overkill for what should be relatively simple maintenance tasks with no clear indicate that a site rebuild is on the cards anytime soon.

The micro framework feels like the right approach but I don't want to end up making things more difficult just of the sake of it.

Has anyone else had a similar situation and/or can provide insight into the best approach?

Was it helpful?

Solution

It entirely depends on the the work that you want to get done. As you mentioned, there are different parameters on which you will have to decide what to do.

  • Learning curve -- Does not matter if a framework is big or small, there will be initial learning curve to understand the structure. You gotta acclimatize yourself with the behaviour of the framework.

  • Performance -- You should decide on the features you require because a heavy framework like Symphony2 can be an overkill for sure if you really do not want a lot. Why would you waste your resources for the things you don't want? So go for something that is light-weight but is enough to get the job done without killing performance.

  • Planning -- Plan things for the future. May be a light-weight framework like cilex will be enough for the time being but supporting the structure might become difficult in future. Plus, if a feature is not there you might have to re-invent the wheel again to create one.

    With a bigger framework that has got a lot of features already included and a nice community support, you will save yourself from wasting your time creating something that is already there.

So keep these things in mind and then choose the right step wisely. Hope that helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top