views:

56

answers:

1

Hello,

I have written a simple framework (actually collection of libraries) and a number of applications based on that framework. These framework and applications both have their own mercurial repositories. When I update the framework repository, I copy all framework files to application folders one by one. This work flow causes me some headaches, such as I do not know the last time I have updated the framework in application and which version it is.

I have two ideas about better work flows and wanted to know your opinion.

  • A build tool can update the version text in a text file in framework folder and export it to application folders.

  • I may use sub repositories in application repositories (I don't know how to do that)

Thanks!

Note: My codebase is PHP

A: 

Sounds like you need to "versionize" your framework better. If you're developing an application at the same time as your framework, and especially if you're developing MULTIPLE applications, then you're sort of asking for a headache.

What you should do is limit your applications to just each use a specific version of your framework. When you want to implement a new feature into your framework, you add it into a new version. Afterwards, you can decide what applications you want to upgrade to the new version, and do this as an entirely separate process.

Whatever you do, DO NOT modify the core framework code of an existing framework implementation unless you are going to completely upgrade it to the next version. Also, make sure that each new version is building on the most recent version-- you don't want to have multiple development versions with varying features as your codebase (and maintenance requirements) will increase exponentially!

EDIT: Reading your question again, I feel I should also mention that automating any sort of upgrade process is not a good idea. Upgrade your framework trunk in one repository, then if you need to, you can manually upgrade to a new version in an application repository. But only if you need features or optimization unavailable in the current version.

Daniel
Also, make sure to keep a changelog of *everything* that you change in each new version. This will make post-upgrade debugging a simple matter of going through the log and checking your application for areas that would be affected by the change.
Daniel