Setting up multiple project versions

What is the proper approach to set up multiple versions of the same project?

For example,how to set up and maintain multiple versions of the project, e.g Sales_v1, Sales_v2, etc, so that each subsequent version have additional application functionality being developed and released.

Thanks for any help.

Hi David,

i think this is not a CUBA specific question, so the normal answers from general programming apply here. You can (and probably should) set up your project so that you are using version control. With this you can use branches for different versions e.g. (Common Branching Patterns).

To release different versions you can use the gradle’s features to describe your version number in the build.gradle:


cuba {
    artifact {
        group = 'com.company.software'
        version = '1.0'
        isSnapshot = false
    }
}

Then you can use gradle’s tasks to “install” and “uploadArchives” to deploy the software artefacts to a central repository. Since you can be in different branches, you therefore can deploy different versions of the software.

Bye,
Mario

Thanks Mario. I will need to spend some time on version control approach.

I was thinking of making a copy of the Cuba project folder as a simple approach but not sure if it’s advisable (for non-team development). In my use case, i just want a copy of the project to try out some additional features to be built without messing up with the original project.

Steps to make a copy of Cuba project:

  1. Make a copy the project folder
  2. Open the project folder copy in Cuba Studio as a new project
  3. Create a copy of the DB for the project copy
  4. Test built some feature in the project copy
  5. Duplicate the feature in the original project after testing the feature in the project copy

I understand version control is the right approach but just wondering if the above will work for simple case.

Hi,

well, the described situation above will work for the “simple” case without a VCS.

Basically what a version control system like git is exactly the same but with the following different advantages:

  • Once you are ready with your changes and want to copy it over to the original directory, git will do that with a single command (merge branch from feature-branch to master)
  • If you have to additionally add features to the original directory, you have to copy them over to the new directory - git will do this as well (merge branch from master to feature-branch)
  • you can save and restore different phases of your implementation through commits

Here’s a great introduction to git that lets you give a easy start: git - the simple guide - no deep shit!

Bye,
Mario

David,
CUBA platform as well has very nice feature called "Extensions ". It is widely used for product development .
The Extensions allow customization of your product to different client’s needs without touching any line of the product code, which makes the merge much easier.
For more information please read the articles:
1 . https://doc.cuba-platform.com/manual-6.2/extension.html
2. [url=https://dzone.com/articles/how-extensible-is-your-framework]https://dzone.com/articles/how-extensible-is-your-framework[/url]
3. [url=http:// ]https://dzone.com/articles/how-to-develop-a-highly-customizable-product-1[/url]