[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Managing branches

From: Brad Appleton <brad.appleton_at_gmail.com>
Date: 2006-01-09 08:49:03 CET

Evert | Collab wrote:
> Brad Appleton wrote:
>> My first question/advice would be, are you sure that using separate
>> branches is the way to go in this case?
>> My experience has usually been that functional and platform variants
>> (e.g., slight variations in functional behavior, or in operating
>> environment) are usually best handled in the code-structure than in
>> the branching-structure.
> I have the same problem, the main problem doing it in code is, that I'm
> developing php; and I'm distributing the source files, as there is no
> such thing as compiled code..
> Any suggestions on how to deal with this?

So you are writing raw PHP code and then distributing the files, except
you end up having to distribute slighly different versiosn of the files
for different customers? Is that correct?

If so, then would it be possible to auto-generate the PHP code with a
more capable scripting langauge such as Perl, Python or Ruby? They each
have some libraries that are capable of doing some nice things with text
templates. For example, there is Text::Template in Perl, and also the
text-template toolkit <<http://www.template-toolkit.org/>>

With such a template toolkit, much of your PHP code could be the content
of the template, and then you could use some of the higher-level
encapsulation constructs of Perl/Python/Ruby to deal with the
customer-specific portions of the template. This would give you full
access to using design patterns like strategy, template-method,
decorator, and others, to create a well modularized and encpasulated
script + template that, when executed, can generate any/all of the
appropriate customer-specific variants of PHP code.

Brad Appleton <brad_at_bradapp.net> http://www.bradapp.net/
   Software CM Patterns (www.scmpatterns.com)
     Effective Teamwork, Practical Integration
"And miles to go before I sleep" --Robert Frost
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Jan 9 08:52:52 2006

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.