Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I've recently had a discussion with a coworker about versioning web applications.

I don't think you need it at all, and if you just want a sanity check to confirm your latest release is live, I think a date (YYMMDD) is probably good enough.

Am I off base? Am I missing the point? Should I use web application version numbers

share|improve this question

14 Answers 14

up vote 23 down vote accepted

If you resell the same web application to multiple customers, you absolutely should version it.

If it's a website that's only ever installed in one location, then the need is less dire, but it still likely couldn't hurt. You'd be less susceptible to timezone problems and such, too. Diagnosing an issue in a library version 1.0.2.25 is a lot nicer than hunting down the library build on November 3, 2010 11:15 a.m.

share|improve this answer
1  
If you resell the same web application to multiple customers, you absolutely should version it. 100% true! –  Tech Jerk Nov 13 '10 at 7:33
5  
I don't agree. Versioning your releases is always important, web app or not. This is a fundamental practice in any development method (cowboy coding excluded). –  Martin Wickman Nov 13 '10 at 10:57
1  
@Sri Kumar: yet being the keyword here :) –  Martin Wickman Nov 13 '10 at 11:32
2  
@sri, stacktraces are highly version dependent. If you have an error report with a stacktrace you must be able to - quickly, and with certainty - have the source code corresponding to that stacktrace, even if newer versions have been released since. Modern versions of Java logging software even present the versioning information in the stacktrace itself. –  user1249 Nov 13 '10 at 12:33
1  
@anna lear - It just occurred to me that I never did respond to you about the date thing. In YYMMDD versioning, you example of "November 3, 2010 11:15 a.m." would be versioned as 101103. So it is 'versioned' by the date. –  John MacIntyre Jun 4 '11 at 3:59

If you can automate version number on your application's DLLs, it couldn't hurt. It will help you keep track of versions.

Generally, web apps are released only at one location where you are hosting it, so it's not as important as say a desktop application. It can help with roll-backs, bug tracking (i.e. which version was this in) and keeping track of the difference between developer, staging, and production servers, if applicable.

I'd look into automating it - it's the kind of thing you can setup once and use it if/when you need it.

share|improve this answer
    
Automating including a VCS tag for each build. AFAIK most build systems can do that these days. –  JensG Nov 8 at 10:30

If you have a dev/test instances it is pretty important for project team members to able to see which build/revision they are testing.

share|improve this answer

Your users doesn't care about version numbers as they always have the latest and greatest release anyway, but you owe it to yourself (and your team) to know exactly what version is running live. Eventually your development source gets out of sync with the live code and then you definitely must know. So label your releases in your svn/git tree and mark the web app with that tag.

share|improve this answer
1  
absolutely. you can't afford to have unversioned code in the wild. even if the version is the SVN/hg/git commit #. –  Paul Nathan Nov 12 '10 at 21:58

In addition to what the others have said, I'd add that versioning is also important from a marketing perspective. A new version is something new that can be marketed to potential or existing customers. It lets customers know something is 'new' and see that things are moving forward. It provides nice groupings of new features. And it looks more professional.

share|improve this answer

You should version your web application with the build id from your build server and have that id enclosed in all bug reports.

This will allow you to go back in time in case you have to fix a bug reported on an older version not currently present in production.

share|improve this answer

I say that for anything but a trivial web application, you should version it. There are two, slightly different, notions at work here:

  1. application as a whole
  2. individual files

Regardless of the situation, I believe that files should have individual version (or revision) numbers. Ideally, this would be handled automagicaly by your version control system. As it has been stated by others, it's easier to refer to a file's version number than its date-and-time.

If you have (or may have) more than one live installation of the application, it should be versioned as a whole. This is also a good practice if you have separate dev and test environments (as you likely should). Each application (or release) version number refers to a collection of individual files at specific version numbers. While dealing with all of this is an extra burden, it is easier to check-out a specific release than individual files at specific revision numbers.


This makes me think of a notion in linguistics. It is said that if you can't express something in a language, you can't think about it (in that language). I think of the German word 'Schadenfreude.' It is much easier to think (and speak) of this notion of "feeling joy due to someone else's misfortune" by referring to that word, than its definition. That is the reason the word has crept into use in the English language.

Similarly, version numbers make it easier to speak (and think) of your application and its files at specific states. If you're a one person team, working on one application, it doesn't likely make a huge difference. However, as things get more complicated it is better for you to have these labels available for use.

share|improve this answer
  • Internal use only with limited install base?
  • Or liable to have multiple versions in the wild?

We only have the former so only use the version number for sanity checking post release. We don't have to track many versions in use at the same time.

share|improve this answer

If your web application consists of multiple modules, both in client and server, each module should be versioned. And each combination of module versions on both client and server should be given an unique id, an id that should be present in all logging and error messages.

By using that convention, it will always be possible to recreate the state the web app was in at a given moment.

In my opinion, since webapps these days are built using dynamic languages on both sides, server and client, there shouldn't be any reason for reloading an updated web app unless the user restarts the browser or manually reloads the page.

Only the updated parts or modules in the web app should be reloaded without affecting the overall state of the application.

Why you might ask? Well, by enforcing that, the web app will by its design be more roboust, correct and probably easier to maintain. If the web app always require simultaneous server/client update then it probably is not build the right way.

share|improve this answer

Yes, you should version it! And there should be a tag in your revision control system (like subversion, git, mercurial, etc.) that matches the version number.

The tag allows you to go back and make a branch. For example: the current production version has a bug, but you can't fix it because the code on your machine just isn't ready to roll out the door. If you have it tagged in your RCS though, you can branch at that tag and fix the bug in the exact version of the code that's running in production.

share|improve this answer

Personally I think you should version anyway, but one big benefit of versioning web applications that is specific to websites is that it can make changes to static content much easier to manage.

For example, let's say you have a mysite.css file which has a far future expiry date (which you generally want to do so that it's cached in the browser across each page). If you then change a style in that file no-one who has been to your site before is going to see it unless they do something to clear that file from their cache.

If you're versioning you site though you could change all the css references in your build to something like mysite.css?v=1234 which will let you keep the far future expiry date and not worry about future changes as in the next build it'll be mysite.css?v=1235.

share|improve this answer

Yes you should. For distribution reasons pointed here by other answers.

But I see, why you asking the question. Web apps approach is cost driven. Its opposite to legacy shrinkwrap approach, where costs include physical media, distribution, installation, hardcopy of documentation, training and technical support. Anything which can be excluded, should be excluded.

share|improve this answer

Just to be clear, I'm assuming that you are talking about a user-visible version number of some sort, and not giving up on version control in development. (if you think you don't need version control in development, then you are wrong, you do need version control).

For a single-hosted project it's not strictly necessary, because if any questions arise you can always look at the host and confirm what's really running. It's kind of nice, though, because it might come in handy once or twice. It's really up to you as to whether you think it will be useful or not.

For a multi-hosted project, it's not really optional. Different hosts will eventually end up with different versions and you'll need to be able to tell them apart at the user end.

share|improve this answer

From your question it is clear that you have in mind a simple web application

  • Only accessible by a Web GUI and not by a Web(-service) API. If you have users accessing the application using an API you need to version it. If you change the API you break clients, so you need to maintain different version of the API at the same time.

  • Only one instance running at the time. Even if you have only the web guy, if you have more installation you need to know which customer is running which version.

  • With acceptable down-time for upgrade of live version. There is a possibly huge problem which is the database. Important changes with newer versions come with changes in the underlying structure of the data. If you have only one version running at the time you will probably have to turn off the old version, upgrade the database, and turn on the new version. Which results in application down-time. This can be acceptable depending on the number and kind of users.

share|improve this answer
    
Agreed, creating an unversioned web api is such gross incompetence that most people wouldn't trust it. And yeah, I'm talking about one instance of the app. –  John MacIntyre Nov 8 at 9:50
    
Also consider the third point, which is still valid even for single-instance applications. –  OGrandeDiEnne Nov 9 at 14:31
    
I read that and while it's definitely important & tricky, I'm not sure that's a versioning issue. Isn't that more of a deployment issue? KWIM? –  John MacIntyre Nov 9 at 14:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.