-
Notifications
You must be signed in to change notification settings - Fork 0
Sample Test
The following tutorials will teach you how to recreate the sample application used in Quickforms/Application section. Firstly, rename your existing folder of sample app (downloaded from Deploying sampleapp.zip) as a copy so you can have it as a reference when following these tutorials. If anything goes wrong while recreating the sample app you can rename your reference folder back to sample and run it again to compare. We do this because we cannot have two apps with the same names.
Note: One important aspect of Quickforms apps is that the name of the application must be the SAME as the name of the database. Quickforms automatically access the database that corresponds to the application name. For the purpose of these tutorials, sample database is provided to you, so you won't need to create the database for sample application.
Remember to add the resource code to the context.xml file of your apache tomcat to make sure that you connect to your database. The context.xml file should be at C:\Program Files\Apache Software Foundation\Tomcat 8.0\conf
. Add the following inside the tag:
<Resource driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver" maxActive="15" maxIdle="5"
maxWait="5000" name="jdbc/sample" password="segcourse" type="javax.sql.DataSource"
url="jdbc:sqlserver://137.122.93.142:1433;autoReconnect=true" username="segcourse" />
- Create your application folder in Tomcat webapps directory. Use sample as your application name.
Example: C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\Application_name
Application_name=sample
-
Inside your sample folder create the following folders:
- js
Example: C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\Aplication_name\js
- Create the following file inside js folder
- config.js - This file contains important application configuration information like application name, extra script info etc.
Example: C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\Aplication_name\js\config.js
Add following configuration info to your config.js
define(function(){
var config = {};
config.app = 'sample';
config.loginLocation = 'index.html';
config.extraScripts=['js/auth.js'];
config.dataTransferType = "text";
return config;
});
Notes:
- In the above, make sure the app name is the SAME as the folder name you created, i.e. config.app = 'Application_name' AS WELL AS the database name we use, i.e. name="jdbc/Application_name" in the code we added in the Context tag in context.xml file of Tomcat.
- Please not that the application_name = the name of the application you are working on. Therefore, for the assignment, the application_name= patientRegistration and for the project; hospital
- The config.loginLocation is the first page we see when we login into the application which is generally the index.html.
- The config.extraScripts is for any additional js files we use. In this case, for the login functionality we use an auth.js file.
- Make sure you create a resource for your application. See [Deploying sampleapp tutorial](Deploying\ sampleapp\ zip) We will be looking more into the js needed for login in the [Create a Login/Team members for your App](How\ to\ Create\ a\ Login\ Form\ for\ your\ App) tutorial.
-
Quickforms Basics
-
Tutorials
- Setup Tutorials
- App Development Tutorials
-
Assignments
-
Project
-
Applications
-
Quickforms Advanced
- Project With Database
- Advanced Setup
- HealthApp with Database
- Source Control
- Joining the Team
- Cordova Native Application
- Miscellaneous
- Project With Database
-
-
Form Controls
-
App Controls
-
Report Controls
-
Server Controls
-
Quickforms DAO
-
Email Notification
-
Migrating QuickForms3(Test Server) to QuickForms(Production-Server)