Help get this topic noticed by sharing it on Twitter, Facebook, or email.

Cloning or replicating an application - what is the correct method

I have found a couple of articles in the forum, one was over 12 months old and the other several years. I would like to confirm the best way to clone | replicate | copy an application. I am using unlimited TouchUI.
The aim of this is to produce a standalone demo application with no connection whatsoever to the original application.
What I have done so far:
1. Replicated the original database which I will call School to a new database called SchoolDemo
2. Replicated the data from the School database into the new SchoolDemo database
3. Gone to my COT repo folder and created a new folder called SchoolDemo
4. Copied all of the files and folders from the School repo folder and pasted them into the new SchoolDemo folder.
5. I then renamed the solution file from School.sln to SchoolDemo.sln
This is where I have stopped as I want to make sure nothing is going to impact my original project (School) and I am doing this correctly.

I opened up COT and in the list of projects I see a new one but it is still named School not SchoolDemo. I know its the new one I just created because it is date and time stamped and if I remove the new SchoolDemo folder from my repos the new School one in my COT list disappears.
So what else needs to be done?

1. I know I will need to open the SchoolDemo project in COT and change its database connection string so that the application is pointing to the SchoolDemo database.
2. Is there a need to change the port number and if so why?
3. Do I keep the namespace the same or change it in the COT settings and if I do change it will a refresh update all of the code in my SchoolDemo project including any custom code?
4. Is there anything else that needs to be done/changed or considered.
Steve
1 person has
this question
+1
Reply
  • Hi

    The answer to some of this would depend on the database that you are using ?

    2. Is there a need to change the port number and if so why? The port number in your connection strng, no unless you are going to run two instances of the database server

    3. Do I keep the namespace the same or change it in the COT settings and if I do change it will a refresh update all of the code in my SchoolDemo project including any custom code? Keep it the same as it won't go and update your existing code base

    4.Depends on the DB, out of interest why do you want to have a second seperate code base ?

    Hope that helps

    Finbar
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned sad, anxious, confused, frustrated

  • Hi Finbar
    Thanks for your input, much appreciated.
    Its one instance of MSSQL but with two databases, one named Schools, the other named SchoolsDemo. The reason for the separate code base is that I don't want to manage a trial version of my application with data going into a production system then the potential customer decides that the application is not for them. The demo application will have one login so a potential customer can check out the functionality that the application offers and make their decision from that. Once a night I am executing some code that basically resets the SchoolDemo database back to its original state i.e. deleting any data that was entered into in the past 24 hours.
    Steve
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned sad, anxious, confused, frustrated

  • Ok I understand, I use MySQL and run one code base with multiple databases, but instead of messing about with Code On Time which i think would be a can of worms, I run two instances of MySQL and just modify the connection string in the web.config to point two the right database. So if you have control of the server and can run two instances I would suggest that you do that. Its fairly easy to setup a second instance of MySQL.

    My cheat notes below

    Copy an existing MySQL directory
    Edit the my.ini file to point the data to the new directory and change the port numbers

    Run this from a command line
    C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld" --install MYSQLG --defaults-file=C:\Gloucs\my.ini

    Where MYSQLG is the name of this SQL Instance
    and C:\Gloucs\my.ini is the new sql config file

    Go To Services Start the new named service MYSQLG

    Edit the web.config file in your COT project and you are done

    I install two copies of my app on the server, in IIS one pointing to each sql instance

    Hope that helps

    FIn
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned sad, anxious, confused, frustrated

  • Hi Finbar

    Thank you for the cheat notes. In the past (not with COT) I created identical databases but with different names and deployed both to the same MSSQL instance. I have then published the same application code to an IIS web server and simply changed the connection string so that they each connect to their own databases. Like you said, its a really simple way to get two identical applications running but connected to different backend databases. For these I never worried about port numbers as such - I am not sure but maybe the port numbers are something that needs to be considered for MySQL as with MSSQL I have never worried about them.

    The only thing that I came across which was a pain was that I wanted one application to be clearly marked "Demo" but I guess I could look at some of the external files like the Web.Sitemap.en-AU.txt and updating those files after I have published the demo version.

    Changing one connection string is certainly a quick and viable option.
    Steve
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned sad, anxious, confused, frustrated

  • Hi yes I think the apporach you are talking about won't work with MySQL and COT because of how they implement Schemas and the database commands in COT

    We use some CSS styling that is linked to the URL of the site to show that the sites are different, so one will have a differeet background and some banner text. We use Classic UI but the same approach should work with Touch.

    Hope that helps

    Finbar
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned sad, anxious, confused, frustrated