T
T
tushev2014-03-25 14:07:08
PHP
tushev, 2014-03-25 14:07:08

How to organize parallel work on several versions of an application?

It is planned to develop a fairly complex web application in PHP. The peculiarity of the application is that it will be released in the form of several versions (5-10 pieces) for different clients. At 70%, the functionality of all versions will be the same, and the remaining 30% will differ (functionality, finished to specific customers). The differences are strong enough that they can simply be configured in a configuration file. Different versions are not a different set of allowed functions, but the same functions that behave differently (different code). Moreover, at the design stage it is not clear which parts of the application will differ. Theoretically, absolutely any application component may need to be completed for a specific client. And it can be PHP scripts, JS scripts, CSS....
All versions will be operated and maintained in parallel. The application will be constantly improved, acquiring new functionality. The question is, what are the techniques for developing and maintaining software with multiple versions?
There was an idea to make one basic web application. And for each client, make a separate directory, the files in which "overlap" the files in the base application. Those. first we try to read the file from the client directory (PHP, JS, CSS), and if it is not there, then we look for the file in the base one. Well, cover everything with tests so that when finalizing the base application, client versions do not fall.
Of course, there were thoughts to use extensions of the base php classes to implement the modified behavior. But, as I said, changes can affect any part of the system in general, and you don’t want to put class factories everywhere. Yes, and this will not solve problems with JS and CSS.
My question is, what are some good approaches to solve this problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill Boldyrev, 2014-03-25
@usetester

Base class extensions are really not the best approach. File-based inheritance (search in the client directory, if not - then higher) - this is not a php approach at all, but a css/js approach. The entry point is the client directory, css imports the core files and overrides/extends what is needed.
A good approach for php is dependency containers and service locators, when you can replace whatever you want from the core in the client code. At the same time, testing is simplified. In general, your task is absolutely typical for any customizable development, it would be better to take a good framework like symphony and use its architectural solutions. This is exactly the case when the invention of the bicycle is very expensive later.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question