17
Installing An Application

Installing Applications

Embed Size (px)

DESCRIPTION

Learn how the application files are structured and how to install an application into the database.

Citation preview

Page 1: Installing Applications

Installing An Application

Page 2: Installing Applications

OverviewObjective

Learn how the application files are structured and how to install an application into the database.

Requirements

Installed version of ProdigyView with a database

Understanding of the DEFINES

Estimated Time

12 minutes

www.prodigyview.com

Page 3: Installing Applications

Follow Along With Code Example

1. Download a copy of the example code at www.prodigyview.com/source.

2. Install the system in an environment you feel comfortable testing in.

3.Proceed to examples/interaction/HelloWorldApplicationInstaller.php

www.prodigyview.com

Page 4: Installing Applications

Install FieldsInstallation fields are set in an array and passed to PVApplications::installApplication() like below. We will be breaking down each field in this tutorial.

Page 5: Installing Applications

App Name

The app_name is the name of the application. It is not necessarily required but is a good cosmetic look for other developers who will want to know the name of your work.

If you application is managed by a CMS or an application management interface, you should give the application a name.

Page 6: Installing Applications

App Unique ID

The app_unique_id is a very important field. It is used for referencing the application when being called. Every application called must have a app_unique_id.

The id will be called when using pv_exec method.

Example:

Page 7: Installing Applications

App Directory

The app directory is the directory the application resides. Use the PV_APPLICATIONS define which sets the root location for the ALL applications.

Page 8: Installing Applications

App File

The app_file is the entry file for the application. This is the only file that will be included. From this file, all other necessary files should either be required or included.

www.prodigyview.com

Page 9: Installing Applications

App Object

The app_object is the object name that will be used when creating an instance of the application. In our example, the app_object is HelloWorld. This mean that when pv_exec is called, $object = new HelloWorld will be called.

www.prodigyview.com

Page 10: Installing Applications

Application Admin Directory

ProdigyView places a distinction on the front-end and the admin. Referring back to the defines, we set our application admin directory to this value:

The admin file are therefore location here:

www.prodigyview.com

Page 11: Installing Applications

Application Admin

The admin variables work the same way at the regular app_ variables, except they are designed to work with the admin section of the application. In order to called the admin section, make sure the admin define is set to true.

Page 12: Installing Applications

App Enabled

This sets the ability to call and application, essentially it’s the on/off switch managed by the database. For an application to be able to be called through pv_exec, app_enabled must be set to 1 or true.

www.prodigyview.com

Page 13: Installing Applications

Application Language

ProdigyView’s intended design was for applications to be built in multiple languages. Therefore your application_language should be set to php.

www.prodigyview.com

Page 14: Installing Applications

Other Information

The remaining information is purely for information on the application and lets other developers know about the application.

www.prodigyview.com

Page 15: Installing Applications

Installing the ApplicationThe final step is calling PVApplications::installApplication. This method has dual functionality of both installing and updating an application’s information.

Setting new values will the same app_unique_id will update the values associated with that id.

www.prodigyview.com

Page 16: Installing Applications

Example 2Below is an example of another installation setup. Notice it is missing the admin section because there no admin section for the LinkedIn application.

www.prodigyview.com

Page 17: Installing Applications

API ReferenceFor a better understanding of the applications, visit the api by clicking on the link below.

PVApplications

www.prodigyview.com

More Tutorials

For more tutorials, please visit:

http://www.prodigyview.com/tutorials