Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

This page is intended for developers who are starting to use Canvas Technology to build their first web and mobile applications.

Prerequisites

The following prerequisite software are needed to set up your development environment for Canvas Technology:

  1. Development Kit: Java 1.8 SDK
  2. Build: Apache Ant 1.10
  3. Server: Tomcat 8 or JBoss EAP 7 app server
  4. Database: Oracle 12c or MySQL 8
  5. IDE: Eclipse (any latest version)

Setup Development Environment

To setup the development environment for using Canvas Technology, perform the following steps:

  1. Contact Canvas Support or Engineering team for the Canvas setup JARs.
  2. Execute the following command from the Command Prompt:

    java -jar CTSetup.jar

    The Ant software version will be detected.



    The Canvas Development Environment Setup Wizard opens with the Verify Software Prerequisites section. The Java SDK location path that is detected appears in the Java Home field.



    By default, MySQL and Tomcat are selected in the Database Type and Server fields respectively. You can change these values if your target database and app server environment is different.

    Oracle is the supported alternative database and JBoss is the supported alternative app server. The setup assumes that your system contains the selected software.

  3. Click Next.
  4. In the Verify Canvas Prerequisites section, perform the following:
    1. Specify the application work folder in the Canvas Workfolder path field. If the folder does not exist, create the folder by clicking Select > Create new folder. Application logs, generated contents, such as reports, get stored in this folder.
    2. Specify the application name in Application Name field. The application name will be used as the WAR name and the application context.
    3. Specify a description for the application in the Short Description field. The description entered here will be added to the application manifest file.
    4. Specify your team name in the Team Name field. The team name entered here will be added to the application manifest file.
    5. Click Next.


  5. In the Build and Deployment Parameters section, perform the following:
    1. Enter the folder for generating the application WAR in the Build Folder Path field. If the folder does not exist, create the folder by clicking Select > Create new folder icon. The application WAR file generated during build is stored in this folder.
    2. Enter the application source code folder in the Application Source Code Folder field. If the folder does not exist, create the folder by clicking Select > Create new folder icon. This folder is your main development folder in which the application source code and templates are to be created.
    3. Enter the application version number in the App Version No: field. The version number entered here is added to the application manifest file.
    4. Click Next.



  6. In the Generate Project Template section, click Generate.


    The project template creation begins and and its status is shown in Summary.



  7. Once complete, click Finish.
    A new application template with the name provided in step 4b is created inside the application source code folder. For example, a new application template named SmartBank is created inside D:\SmartbankSVN as shown in the following screen shot:

    The application project template folder contains the following sub-folders and files. These folders are the placeholders for your application source code and its dependencies.

    • Dependencies - Place all the dependencies of your application here, e.g. third-party application JARs.
    • DBScripts - Place all the database scripts of your application here.
    • Lib - Place all the server-side code here, e.g. data support class, action classes, instruction classes etc.
    • Resources - Place all the resources used by your application, e.g. properties files, SQL Maps etc.
    • WebApp - Place all the web content (client-side) files here, e.g. listeners, HTML, CSS, images etc.
    • ToBeCopiedOutside - Contains the additional files needed for generating reports. The contents of this folder need to be copied to the application work folder in step 4a. For example, D:\SmartBank.
    • build.xml - File for building the application WAR file. This can be used as-is unless you are using some other folders to maintain your application code instead of the folders created by the wizard.
    • build.properties - Properties file for build process. All the required inputs for building the application (e.g. Java directory) captured in the wizard are populated in the respective properties in this file. If suppose any of those inputs changes, you can update this file accordingly.
    • MobileBuilder.properties - Properties file for mobile build process.

Setup Eclipse

To setup Eclipse, perform the following steps:

  1. Open Eclipse and create a new Java project.



  2. Delete the default src folder.
  3. Right-click on the project, click Build Path > Link Source > click Browse and select the the generated application project lib\src folder. For example, D:\SmartbankSVN\Smartbank\SmartbankLib\src.



  4. Right-click on the selected src folder, click Build Path > Remove from Build Path, choose Keep the linked folder option and click Yes.

  5. Right-click on src\main\java, click Build Path > Use as Source Folder.



  6. Right-click on the project, click Build Path > Configure Build Path > Libraries tab > Add External JARs and add the following dependencies that were provided as part of the generated application project (e.g. D:\SmartbankSVN\Smartbank\Dependencies):
    • ..\Dependencies\canvas
      • CTFull.jar
      • CTLogging-Log4j-1x.jar
      • CTLogging-Log4j-2x.jar
      • CTResources.jar
    • ..\Dependencies\SupportingJars\Javaee_Jars\ee6u3
      • javax.servlet.jar
    • ..\Dependencies\SupportingJars\Rest_Jars
      • All JARs
    • ..\Dependencies\SupportingJars\Third_Party_Jars
      • All JARs




Develop the Application and Build the Application WAR

  1. Build the application template from the application source folder (given in step 5b in Setup Development Environment section above) to create the application WAR file by using the command: Ant.
  2. Copy the application WAR file (from the folder mentioned in step 5a in Setup Development Environment section above) and deploy in the app server. Note that this is a blank application with no features.
  3. Copy the Canvas Studio WAR file and deploy in the app server. Contact CT Platform Support to get the Canvas Studio WAR and deploy it in the app server.
  4. Start the database and app servers and access Canvas Studio:
  5. Use Canvas Studio to create the forms, grids, and dashboards required for your application. All the server-side business functionalities such as instruction/action classes must be written in Java and client-side validations and listeners such as button or row clicks must be written in JavaScript. Rebuild the application WAR (step 1) and redeploy the WAR on the app server.
  6. Access the application:
  7. Report any issues identified along with their first-level analysis in iSolve.


  • No labels