Web Projects, Profiles, and Publishing

Description

A web project is a collection of pages, images, and files that compose a web application that is published to a web server. Every web application workspace contains at least one web project (the default web project is called "Default"), but can have as many web projects as necessary. Each web project is stored in a separate folder in the workspace.

Creating a New Web Project

A web project is a container that organizes all of the files (web components, HTML pages, images, etc.) that are part of one or more related web pages.

  1. Select New Project from the File menu.

  2. Choose to Start a new empty Project, Create Project from a template, or Create Project from a GitHub Repository. (See Git Integration for more information about creating projects from a GitHub repository.)

  3. If creating a new empty Project or project from a GitHub Repository, enter the project name and any additional information to configure the Git repository. Then, click OK.

    images/newProject1.png
  4. If creating a project from a template, select the template to copy and click OK. Then, configure the settings for the new project when prompted and click OK.

    images/newProject2.png

Web Projects Directory Structure

Files are referenced in an application relative to the WebProject folder. For example, an image folder located inside the Order_Processing.WebProject would be referenced as \images.

A workspace can have as many project as desired.

Alpha Anywhere creates a separate folder for each web project in the workspace directory. When files are added to a project, they are placed in the folder for the active web project.

Profiles

Files are can be located in the application's webroot or in totally separate directories. Path aliases can be created that define folder locations in both the development and published application environment. The Profile provides the alias definitions for the published file locations. The virtue of this design approach is that the application can always refer to files without naming absolute directory paths or disk drives. This makes the application easily portable to other servers.

Multiple publishing profiles can be created as needed.

Publishing

Publishing is the process of copying the files in a project to a location specified by a profile. The Web Projects Control Panel will publish projects locally to the webroot, over a the network using Windows File services, or remotely using FTP (File Transfer Protocol) or HTTP. If the application is hosted locally, publishing can be done to localhost or over the Local Area Network (LAN). For application hosted on a remote server external to the network, publishing can be done using FTP or HTTP.

When publishing an Alpha Anywhere web project, both the web pages and any supporting DBF database files are published to the server. Web and database files are typically published in separate web and data folders.

  • Web Pages, Components, CSS, JavaScript, Images - These files are published in the webroot folder that is web accessible.
  • Database Files - DBF files are typically published to a folder that is outside the webroot and cannot be accessed over the web.

When an application is published, all folders and files in the web project are copied to the webroot on the server. Aliases, named AlphaDAO connection strings, name resource providers, etc, are resolved to their published values and directory paths are inserted into components.

A published component cannot be edited with Alpha Anywhere. Because published files cannot be edited, it is important to periodically backup the workspace so that it can be restored in the event of system failure.

You cannot download published files from a web server and open them in a web project. It is recommended that the Development Environment is periodically backed up and stored in a safe location.

Publishing Data

When an application is published to a server, any Alpha Anywhere DBF or Microsoft Access files that are part of the application are also published to the data folder. If any additional folders containing data are also published to the data folder on the server.

The publishing process automatically creates required subfolders in the data folder on the server.

Virtual Hosting

The Alpha Anywhere Application Server for IIS supports virtual hosting of multiple web sites on a single server. Bindings can be created that map individual host names to a published applications. The webroot for each site can be published to any folder on the server. See the IIS Getting Started Guide to learn more.

The Alpha Anywhere Classic Application Server does not support virtual hosting. To support two separate domains (e.g. http://www.mysite1.com/ and http://www.mysite2.com/), the server must have multiple instances of the application server mapped to separate IP addresses. See Running Multiple Instances of the Alpha Anywhere Application Server for more information.

See Also