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 need to be able to demo our production application to prospective clients. The way I have it setup today is simple. The demo application is an exact duplicate of the production system, except that the data in the database is obfuscated to protect our current clients' data. This works great because it doesn't require any application changes.

Boss dropped a potential BOMBSHELL today and said that the demo system needs to contain a special link and that ONLY shows up on demo. He went on to explain that in the future there may be much bigger differences between the demo and production apps (e.g. an entire area of functionality). What do I do now?

Some things I have thought about doing:

  • Maintain a different branch in subversion specific to the demo system
  • Create an installation package that has the changes for demo, then revert and build a production installation package
  • Modularize the application (no idea how)
  • Say: "Screw you! I will not do it!" (LOL)
  • Use some sort of conditional logic in the app to determine if it is a demo or a production app. E.g. (if the URL contains 'demo' then show else hide).

If you haven't guessed by now, this is a web application

Anyways, I have no experience in this scenario as to which one is better or if none of these are any good. Anyone have an answer, strategy, something!?

share|improve this question
    
Don't branch the code over this if you can help it. Don't have a separate install if you can help it. Don't put "demo" in the URL - it will make the product seem fake. You should be able to make it a config parameter. Ideally you won't have if statements checking the config throughout your code, maybe a call to see if a feature is supported, and only the object implementing that knows why - depends on your application. –  psr Nov 1 '11 at 20:24
add comment

2 Answers 2

up vote 3 down vote accepted
  • Maintain a different branch in subversion specific to the demo system

    • Yes! This helps truly. But be careful in how you do it. Best is when main system evolves, you should know how to bring down your changes to as close as possible.
  • Create an installation package that has the changes for demo, then revert and build a production installation package

    • This might work - but if you are doing many demos - you will loose your good part of life on this.
  • Modularize the application (no idea how)
    • This is the best answer. See below.
  • Say: "Screw you! I will not do it!" (LOL)
    • Definitely no! Not because you should be afraid. But good engineer doesn't quit challenges.
  • Use some sort of conditional logic in the app to determine if it is a demo or a production app. E.g. (if url contains 'demo' then show else hide).
    • Definitely no! This would make your product very weak over time.

When you think of a Demo product (unless you are talking about trail versions) - don't think like a 'separate product' but think of it as a 'separate environment'. If you and me both install word-press engine in our respective sites, we will have same product but different data. You must architect your product such that installation (and usage) specific stuff - can be created like how one create different content sources. Similarly, for example - you are making a native .Net or JAVA application, the functionality remains the same - but where it get's visuals (including splash screens and buttons) from can be different folders to show them in different form. Later on - the demand will come to even alter the layouts - that's when you know you need more template stuff!

Don't jump for the modularization in one-shot. As and when requirement comes, first begin a separate branch (line of development) and give the demo! (Because all demos are typically next day morning 10:30 AM). The deviation you now created tells you what modularized should have been there to be picked up from external resources. Apply that and merge it back- next time same demo would be your standard version (with different URL).

Almost always if you end up making "separate product" as a demo - you are inviting trouble or pain or both!

Dipan.

share|improve this answer
    
I really like your answer. For a simple hiding and showing of a link I can get away with a separate branch--like you said. –  O.O Nov 1 '11 at 20:16
add comment

The best approach would be to modularize so you can turn items on or off in any app.

Your demo is a prod install, with a config that turns on different things than the actual prod app and points to a different database.

share|improve this answer
    
+1 for a simple answer to a fairly simple request from his boss. –  dodgy_coder Nov 2 '11 at 1:43
add comment

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.