KEMBAR78
Installing Applications | PPTX
Installing An Application
Overview
Objective

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 Fields
Installation 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 Application
The 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 2
Below 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 Reference
For a better understanding of the applications, visit the api
by clicking on the link below.

PVApplications




                 More Tutorials
For more tutorials, please visit:

http://www.prodigyview.com/tutorials


                       www.prodigyview.com

Installing Applications

  • 1.
  • 2.
    Overview Objective Learn how theapplication 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
  • 3.
    Follow Along WithCode 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
  • 4.
    Install Fields Installation fieldsare set in an array and passed to PVApplications::installApplication() like below. We will be breaking down each field in this tutorial.
  • 5.
    App Name The app_nameis 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.
  • 6.
    App Unique ID Theapp_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:
  • 7.
    App Directory The appdirectory is the directory the application resides. Use the PV_APPLICATIONS define which sets the root location for the ALL applications.
  • 8.
    App File The app_fileis 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
  • 9.
    App Object The app_objectis 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
  • 10.
    Application Admin Directory ProdigyViewplaces 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
  • 11.
    Application Admin The adminvariables 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.
  • 12.
    App Enabled This setsthe 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
  • 13.
    Application Language ProdigyView’s intendeddesign was for applications to be built in multiple languages. Therefore your application_language should be set to php. www.prodigyview.com
  • 14.
    Other Information The remaininginformation is purely for information on the application and lets other developers know about the application. www.prodigyview.com
  • 15.
    Installing the Application Thefinal 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
  • 16.
    Example 2 Below isan example of another installation setup. Notice it is missing the admin section because there no admin section for the LinkedIn application. www.prodigyview.com
  • 17.
    API Reference For abetter understanding of the applications, visit the api by clicking on the link below. PVApplications More Tutorials For more tutorials, please visit: http://www.prodigyview.com/tutorials www.prodigyview.com