Option 1 - Existing --> Framework
This process is non-destructive of your existing application (but make a fresh back up just in case). We will copy your existing project in to a fresh empty Framework project.
- Download the current version of the Framework and extract the files to a new location.
- Make a backup of your current application. Do your work on the copy, not your original.
- Make a backup of your current database before any migration steps.
Make a new empty Framework project
- Using the latest version of the Framework, use the Copy Project utility to make a fresh Framework-based project which will hold your migrated project.
- Include the steps to create a new database for the new Framework project, set your new Framework project to target that new database.
- The Framework has one User Defined Function named errorout (see here if the code is needed). Be sure to reproduce this in the new project. If you are familiar with Xbasic Modules, you can move the errorout function to that area.
- Publish and test this new Framework project. When you publish, check the box to 'Compile functions in to an AEX file' (assuming you did not move the errorout function to an Xbasic Module).
- Go through the relevant tasks in Getting Started to set up your new Framework-based project.
Merge in your existing project
- Using the list of Framework files that match your existing application (see Reference), determine if you made any changes to the Framework that need to be reproduced in the new update. Make a note of all important changes.
- As you go forward, it may help to have the existing application open and the new Framework-based application open at the same time. Compare pages, for example, compare the About.A5W from both existing application and the new Framework project.
- Copy the non-Framework files from your existing application in to the new Framework project folder. If any files already exist, DO NOT overwrite them. Instead, evaluate why the file already exists and make appropriate changes to the Framework file rather than overwriting.
Recreate any User Defined Functions
- Your existing application may have user defined functions that need to be recreated in the new project.
- The Framework deploys one User Defined Function, named errorout (see here if needed). Be sure to reproduce this in the new project.
- Newer versions of Alpha Anywhere might also have code entries for Node, Xbasic Modules or Classes, etc.
- The database for each version of the Framework is slightly different. You can find the schema for the current version here.
- Each developer has a different method and tools to manage their database, but the basic task is to ensure your live database schema matches the current Framework version.
- Here are some suggested methods:
- Manually compare the current schema to your live database and manually make each modification.
- Use a tool such as Navicat to "compare" your current schema to the current Framework schema, and then update your schema to match.
Publish the new project
- Publish your migrated project for testing. Be sure your initial publication goes to an empty folder rather than over any existing files. DO NOT publish directly to a live location (we don't trust our migration process to be that perfect!)
- Note - sometimes Alpha fails to publish some files or subfolders, check to make sure.
- As above, when publishing, check the box to 'Compile functions in to an AEX file' (at least once during the migration process).
- Be sure to specifically publish the new wt4.aex file.
- It is also good policy to restart your Alpha Application Server after publishing.
- Congratulations, your newly merged project should be ready to use. Once you are sure, take the required steps to replace your live application and database with your new build.
FUNCTION errorout AS C (errormsg AS C = "", severity AS N = 0 )
fldr = "\a5\logs"
logfile = fldr + "\sql_error.log"
if file.exists(fldr) = .f.
vErrorMsg = time("yyyy/MM/dd 0h:0m:0s") + "|" + ErrorMsg + crlf() + replicate("-",10) + crlf()
if severity > 4
' email or SMS code here to send a notice to an Admin