Sign in

E-mail *, (xx@domain.com)
Password *

Register | Forgot password

Blogs

Recent blogs

RSS - Blogs
March 9, 2010
State of OSGi in the Java world
March 4, 2010
Reach more people with Google Translate
March 3, 2010
Get My Advice
February 26, 2010
What? Where!?!
February 11, 2010
Split it!

All Blogs...


Like A Version

December 9, 2008

Very handy. At least, that is what I would classify versions like. I mean, apart from the occasional "OMG! I didn't know version 0.0.9 still existed!", it allows you to pinpoint fixes, features and changes that you would want to have. Newer means better, right?

When you start out building your own WCBs, all of a sudden you are on the other side of this versioning story. Now you are in control of the version number and people expect you to enlighten them on the subject of fixes, features and changes. Even GX WebManager expects it from you, proudly displaying your WCB's version number in the WCB management console. So let us focus on this WCB version number. What is it and how can we do sane stuff with it?

First of all, the version number of your WCB is defined in the file "pom.xml". I did not have a WCB lying around, so I just opened the WCB Development - Quick start document, looked up my favorite archetype - I felt like a panel today ;-) - and executed the Maven command to create the WCB source directory. Now, my fresh "pom.xml" looked like this:


<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>nl.gx.webmanager.wcbs</groupId>
        <artifactId>webmanager-wcbs</artifactId>
        <version>9.6.1</version>
    </parent>
    <groupId>nl.gx.product</groupId>
    <artifactId>helloworldpanel</artifactId>
    <version>1.0.0</version>
    <packaging>osgi-bundle</packaging>
    <dependencies>
        <dependency>
            <groupId>nl.gx.product</groupId>
            <artifactId>wmponlinehelp</artifactId>
            <scope>provided</scope>
            <version>9.6.1</version>
        </dependency>
        <dependency>
            <groupId>nl.gx.webmanager.bundles</groupId>
            <artifactId>webmanager-entitydomain-bundle</artifactId>
            <scope>provided</scope>
            <version>9.6.1</version>
        </dependency>
        <dependency>
            <groupId>nl.gx.webmanager.bundles</groupId>
            <artifactId>webmanager-entitymanager-bundle</artifactId>
            <scope>provided</scope>
            <version>9.6.1</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix.plugins</groupId>
                <artifactId>maven-osgi-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <osgiManifest>
                        <bundleActivator>nl.gx.product.helloworldpanel.Activator</bundleActivator>
                        <bundleSymbolicName>nl.gx.product.helloworldpanel</bundleSymbolicName>
                        <bundleName>Panel helloworldpanel</bundleName>
                        <bundleDescription>Panel helloworldpanel</bundleDescription>
                        <bundleVendor>My Company</bundleVendor>
                    </osgiManifest>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

There are quite a few versions in there, mostly for dependencies. The one <version> we are interested in, the version of our own WCB, is the one just below the <artifactId> with version "1.0.0".



About version numbers

Version numbers consist of three parts: "X.Y.Z". People often ask in what case to change what number. While this is not set in stone, there are some general rules of thumb:

  • The first number, X, is the major version number. If this changes, it means there were big, structural changes to the WCB.
  • The second number,Y, is the minor version number. Changes to this number indicate new or changed functionality.
  • The third number, Z, is the patch release. If it goes up, there were hardly any changes, except for bug fixes.
  • Each of the numbers lives its own life and can grow larger than 10.
  • The first release is always dubbed "1.0.0".

Here are some examples to illustrate these rules:

  • "0.9.4": This WCB is still not ready.
  • "1.2.17": This WCB has been stable at version 1.2 for a while now.
  • "3.0.0": Version 2 of this WCB just got a big overhaul.

Daily use

So now that we have established version number rules, how do we use them in daily practice?

At GX, we do not tamper with version numbers during WCB development. We use Subversion to manage local development versions of the software. In the early stages of development I like to choose a number under "1.0.0" to indicate the code is not production ready yet.

We use the WCB version number to mark a release to a production environment (for all you curious types: yes, we also tag the release in SVN). This way we can keep track of the changes in a WCB and monitor what versions are up and running in the production environment.

Conclusion

I hope to have demonstrated that version numbers are really easy to maintain and they can convey a lot of information to users of the WCB. So be sure to use them to your advantage!

Before I sign out, a clip from Like A Version, for all you country lovers out there. ;-)



Till next time!

Greetings,

Patrick




Cthulhu | 14-05-2009 14:43

Just wanted to post to add some comments to this (old) post.

* In the WCB Development Tutorial, chapter 9.2 (at this time) is a bit more 'official' chapter on version numbers, which explains the versioning a bit differently from this post:

- Micro versions contain bugfixes only. No methods will be added, renamed, or anything.

- Minor versions contain bugfixes and added behavior. Minor versions are always compatible with the major versions, i.e. no existing behavior will be removed or altered (unless the existing behavior was a bug)

- Major versions are free-for-all, change, remove, add, refactor away.

Advice for software developers: Stay strict when it comes to versioning and checking stuff into your source control system.


About the Author

Return to all blogs

 

Patrick Atoon

Patrick Atoon has gained nuff respect as one of the most experienced web architects in the GX Webmanager community or even the global hip hop community for that matter.

Read all Patricks blog entries

Other blog entries:

February 26, 2010
What? Where!?!
September 3, 2009
Do the Right Thing
June 18, 2009
wm:link secrets
March 2, 2009
Server side represent! (Part 2)
February 4, 2009
Server side represent!
January 15, 2009
Making cache
August 19, 2008
Stop making sense
August 4, 2008
Namaste!
July 7, 2008
Japanese encore (日本のアンコール)
May 20, 2008
All amped up


Share:

del.icio.us
digg
Technorati
Slashdot
Reddit
YahooMyWeb
NewsVine
ekudos
© 2010 GX creative online development B.V.

Disclaimer

This website (GXdeveloperweb.com) may discuss or contain opinions, (sample) coding, software or other information that does not include GX official interfaces, instructions or guidelines and therefore is not supported by GX. Changes made based on this information are not supported.  GX will not be held liable for any damages caused by using or misusing the information, software, instructions, code or methods suggested on this website, and anyone using these methods does so at his/her own risk. GX offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this website, including any liability resulting from incompatibility between the content of this website and the materials and services offered by GX. By using this website you will not hold, or seek to hold, GX responsible or liable with respect to the content of this website.