installing applications
Post on 05-Dec-2014
887 Views
Preview:
DESCRIPTION
TRANSCRIPT
Installing An Application
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
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
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.
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.
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:
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.
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
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
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
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.
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
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
Other Information
The remaining information is purely for information on the application and lets other developers know about the application.
www.prodigyview.com
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
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
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
top related