OverviewObjectiveLearn how the application files are structured and how toinstall an application into the database.Requirements Installed version of ProdigyView with a database Understanding of the DEFINESEstimated Time12 minutes www.prodigyview.com
Follow Along With Code Example1. 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 toPVApplications::installApplication() like below. We will be breakingdown each field in this tutorial.
App NameThe app_name is the name of the application. It is notnecessarily required but is a good cosmetic look for otherdevelopers who will want to know the name of your work.If you application is managed by a CMS or an applicationmanagement interface, you should give the application a name.
App Unique IDThe app_unique_id is a very important field. It is used forreferencing the application when being called. Everyapplication called must have a app_unique_id.The id will be called when using pv_exec method.Example:
App DirectoryThe app directory is the directory the application resides.Use the PV_APPLICATIONS define which sets the rootlocation for the ALL applications.
App FileThe app_file is the entry file for the application. This is theonly file that will be included. From this file, all othernecessary files should either be required or included. www.prodigyview.com
App ObjectThe app_object is the object name that will be used whencreating an instance of the application. In our example, theapp_object is HelloWorld. This mean that when pv_exec iscalled, $object = new HelloWorld will be called. www.prodigyview.com
Application Admin DirectoryProdigyView places a distinction on the front-end and the admin.Referring back to the defines, we set our application admindirectory to this value: The admin file are therefore location here: www.prodigyview.com
Application AdminThe admin variables work the same way at the regularapp_ variables, except they are designed to work with theadmin section of the application. In order to called theadmin section, make sure the admin define is set to true.
App EnabledThis sets the ability to call and application, essentially it’sthe on/off switch managed by the database. For anapplication to be able to be called through pv_exec,app_enabled must be set to 1 or true. www.prodigyview.com
Application LanguageProdigyView’s intended design was for applications to bebuilt in multiple languages. Therefore yourapplication_language should be set to php. www.prodigyview.com
Other InformationThe remaining information is purely for information on theapplication and lets other developers know about theapplication. www.prodigyview.com
Installing the ApplicationThe final step is callingPVApplications::installApplication. This method hasdual functionality of both installing and updating anapplication’s information.Setting new values will the same app_unique_id willupdate the values associated with that id. www.prodigyview.com
Example 2Below is an example of another installation setup. Notice it ismissing the admin section because there no admin section forthe LinkedIn application. www.prodigyview.com
API ReferenceFor a better understanding of the applications, visit the apiby clicking on the link below.PVApplications More TutorialsFor more tutorials, please visit:http://www.prodigyview.com/tutorials www.prodigyview.com
A particular slide catching your eye?
Clipping is a handy way to collect important slides you want to go back to later.