Publishing an Alpha Anywhere Application to the Local Webroot
A step-by-step guide to configuring a publishing profile to publish your Alpha Anywhere Application locally using the Development Server.
This tutorial is for the full Alpha Anywhere Development Environment. Community Edition only supports publishing to Alpha Cloud.
When you "publish" an application, Alpha Anywhere packages all files, components, reports, code, security files, locally defined Active Link and DBF tables, and any Alpha Anywhere Libraries used by the application into a directory that can then be copied to the webroot and data folders for the Application Server. Grid components are compiled into binaries that have removed meta data used by the Alpha Anywhere IDE. Reports and Xbasic scripts defined in the Control Panel are compiled into a workspace library.
Once all files have been prepared, the application can be copied or deployed to the Application Server. In the case of publishing to the local webroot, files are copied to a webroot directory that is defined in the Development Server settings. Data files are typically not copied or moved when publishing to the local webroot. Alpha Anywhere also does not require defining published aliases and connection strings using a local webroot publish profile.
Components in Alpha Anywhere must be embedded inside an .a5w page to view them in a web browser. Aside from the Tabbed UI Component, which generates an .a5w page automatically, you will need to create an .a5w page to embed one or more components to publish and view your application. This section explains how to create an .a5w page for a Component. If your components have their own .a5w page, you can skip to the next section, Configure the Publishing Profile.
Open the Component you wish to view after publishing for editing by double-clicking on the file name in the Web Projects Control Panel. This will open the Component Builder.
The Save Page dialog presents several options for creating the .a5w page. You can choose to style the page background separately from the Component's style settings. You can also optionally open the HTML editor to edit the .a5w page. The HTML editor is Alpha Anywhere's build-in editor for editing HTML and .a5w pages.
Select Automatically inherit page background from the Component style. Leave the option to open the HTML editor unchecked and click Save Page.
The dialog to save the new .a5w page will open. Enter the file name for the page in the File name field. Click Save when you are done. This will save the new .a5w page containing the Component.
The new .a5w page will be saved in the same directory as the Component. Open the Web Projects Control Panel and select the A5W Pages option in the left column to filter the files shown. You should see the .a5w page you just created in this list.
Now that you have an .a5w page containing the Component, the Alpha Anywhere Application can be published. The next step is configuring a Publishing Profile for publishing the application to the local webroot.
The Publishing Profile describes where web application files will be published in the Application Server's webroot, either locally or on a remote server. During the publishing process, the project files for the web application are compiled and copied to the webroot for the Application Server. This section describes how to configure a project to publish an application to the local webroot on the development machine. The publishing process to deploy an application to a web server is similar for both Alpha Anywhere Application Server for IIS and Alpha Anywhere Classic Application Server.
From the Web Projects Control Panel, open the Web menu and select Project Settings... to open the Web Project Profiles dialog.
Select the Local Webroot profile from the list of profiles listed in the left-hand column. This will display the settings for the Local Webroot publishing profile.
All files published to the local webroot will be published in the webroot. The webroot is defined in the Alpha Anywhere Development Server settings. Every Alpha Anywhere application you create will be published to the same webroot. To make it easy to disambiguate between projects for testing purposes, you can set the Target Folder property. The Target Folder is a directory inside the webroot. It's considered best practice to name the Target Folder after your project.
Enter a Target Folder for the Local Webroot profile.
You can optionally define a default page to display after publishing your application. This can be any .a5w page in your project. Define the Default Page for the Local Webroot. Open the dropdown of pages for the Default Page property and choose a default page from the list displayed.
Click OK to save the changes you made the Local Webroot publishing profile.
Now that you have configured a publishing profile, the next step is to publish your application and open it in a web browser.
Alpha Anywhere web applications are deployed using the Publish Web Project dialog. Applications can be published locally on your development machine or to a remote server. In addition to deploying your project, publishing is also a useful tool for testing your application. Testing can be done locally on the development machine or on a remote server. The following instructions explain how to publish to the local webroot on the development machine.
The Publish Web Project dialog is used to configure what is published to the destination defined by the publishing profile.
Select the Local Webroot publishing profile from the Select profile dropdown. Select the All files in project option to publish all files in the project. Check the boxes for Publish Web Project files and Publish new or modified files only. Check the option to Launch browser after files are published. For the Page to show option, select an .a5w page that will be opened when the browser is launched.
Click the Publish button to publish the project to the local webroot.
You can optionally check Save these settings as your Quick Publish settings to save the setting as your Quick Publish settings. This is useful if you are making frequent changes you want to test on the local webroot or a remote test server. You can Quick Publish your project by clicking the Quick publish project link below the left column on the Web Projects Control Panel.
The Files to be Published dialog displays the list of files that will be published. This dialog is for informational purposes only. While you can edit the text in the dialog, it does not change which files are published to the webroot.
Click OK to continue.
If the destination folder does not exist, you will be prompted to create the folder. Click Yes to create the destination folder.
When Alpha Anywhere finishes publishing the application, it will display a message. Click OK.
Next, your default web browser will launch and open the .a5w page you selected in the Publish Web Project dialog.
The URL for this page will contain 3 components: "localhost" followed by the port number used to communicate with the Development Server, the folder that was created in the webroot where the project was published, and the .a5w page. You can view other pages in your project by typing the file location relative to the webroot in the address bar. For example, if you have a page named "TabbedUI_Admin.a5w" in the ExampleProject directory in the webroot, you could view this page by typing the following into the address bar:
Full Alpha Anywhere Development Environment Only