zimki | documentation | search
 
Zimki Documentation - CookBook.StagedDevelopment

Introduction

The recommended way to develop and maintain zimki applications involves having two realms for each application; live and development. The ''live'' realm would be the one that your users see, while ''development'' would be where you develop new features or fix bugs. We suggest using a dedicated realm for development to avoid causing interruption to service if you make a mistake during development (it happens to all of us).

How it's done

You can access the realm copy/cloning feature through the portal, by clicking on the Realm List link in the REALMS section, then clicking on the copy action for whichever realm you want to clone.

The following steps assume that you already have a live, customer-facing realm (if you don't, just create a new one).

  1. Create a clone of your live realm. You will be doing your develpment in this clone, so name it something sensible to avoid confusion with the live domain.
  2. Do the required development, be it fixing a bug or implementing a cool new feature.
  3. Test the development realm to your satisfaction.
  4. Replace the code in your live realm with the code that you just developed.

Repeat the above procedure for any new bugs or features. It's up to you whether you want to reuse the development realm or delete it and create a new one.

What is this 'code' and 'data' of which you speak?

One person's code is another person's data. Therefore it is up to you to decide what makes sense in your application. Most applications consist of:

  • files
  • classes and their instances

For example, in a simple blog application your 'data' could be defined as all instances of the 'Entry' and 'Comment' classes, leaving everything else as 'code'.

Advanced workflow

While you have developed your feature a lot of new users have registered with your site and posted comments to your entries. You want to make sure that your new code works properly with these before you push it live. What you have to do is bring the 'data' over from live to development, leaving all the 'code' intact. When you have made sure that your new code still works with these new entries, copy the 'code' from your development realm to live. Remember to change the direction of the clone call; where 'live' was your 'source', it should now be your 'destination'.

Parent

CookBook